简体   繁体   English

Flash动画上的图像仍然不可见

[英]Image over Flash Animation remains invisible

Good Morning all, 大家早上好,

I have a Delphi Application with a Shockwave Flash Animation (Align = alClient). 我有一个带有Shockwave Flash动画的Delphi应用程序(Align = alClient)。 I would like to display a logo over the flash (Image). 我想在闪光灯上显示徽标(图片)。 However, the image always move to the background, under the flash and remains invisible. 但是,图像始终会移到闪光灯下的背景,并保持不可见。 I tried to draw the picture using Form1.Canvas.Draw which did not work eighter. 我试图使用Form1.Canvas.Draw来绘制图片,但没有成功。 There is the option to use a Panel over the flash and add my Image into that but it is not soo optical. 可以选择在闪光灯上使用面板,然后将“我的图像”添加到其中,但是光学效果不佳。 My Logo is round and I cut of the white borders around it with the property transparent. 我的徽标是圆形的,我用透明的属性切掉了它周围的白色边框。 That would not with a Panel which I cannot make transparent (or round). 对于我无法透明化(或四舍五入)的小组而言,这是不会的。

Thank you for help 谢谢你的帮助

You can make your panel a circle with the following command: 您可以使用以下命令使面板成圆形:

procedure MakePanelCircle(MyPanel: TPanel; Diameter: integer);
var
  region1 : hrgn;
begin
  region1 := CreateRoundRectRgn(0, 0, Diameter, Diameter, Diameter, Diameter);
  SetWindowRgn(MyPanel.Handle, region1, True);
end;

Look at the documentation of CreateRoundRectRgn because it's normally used to create a rectangle with rounded edges. 请查看CreateRoundRectRgn的文档,因为它通常用于创建具有圆角的矩形。 If you dig a bit further you'll find a guide to make a region based upon your bitmap. 如果进一步深入,您会发现根据位图制作区域的指南。

If you look at the following example Shaping a Form around a Bitmap 如果您看下面的示例, 围绕位图塑造表单

you will learn how to make a region from a bitmap. 您将学习如何从位图制作区域。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM