Aurigma Forums
»
Graphics Mill
»
Discussions – Graphics Mill
»
Transparent filled EllipseVObject (with a glow effect)
Rank: Member
Groups: Guest
Joined: 8/21/2007(UTC) Posts: 4
|
I am trying to create the effect of adding a "light bulb" at the location of where a user clicks their mouse within a MultiLayerViewer Control. (For instance, the user clicks the mouse at a certain location and it appears that there is an elluminated light at that location). I would like for the user to be able to later move this "light bulb" around on the canvas. I initially implemented this by simply drawing an Ellipse on the canvas, but would like to spruse this up a bit. The idea behind the transparency fill and a glow effect is to simulate intensity. Is this possible on an Ellipse object? If not, do you have any ideas on how to simluate this effect? Your help and insight would greatly be appreciated. thanks...
|
|
|
|
Rank: Advanced Member
Groups: Guest
Joined: 1/31/2005(UTC) Posts: 458
Was thanked: 5 time(s) in 5 post(s)
|
Hi Dustin, Hm... I've played a little with brushes and can suggest you the following code to create "light bulb": Code: System.Drawing.RectangleF objBorders = obj.GetVObjectBounds(); //where obj is EllipseVObject
[code=c#] System.Drawing.Drawing2D.GraphicsPath bulbPath = new System.Drawing.Drawing2D.GraphicsPath();
bulbPath.AddEllipse(objBorders.X, objBorders.Y, objBorders.Width, objBorders.Height);
System.Drawing.Drawing2D.PathGradientBrush bulbBrush = new System.Drawing.Drawing2D.PathGradientBrush(bulbPath);
bulbBrush.CenterColor = System.Drawing.Color.FromArgb(192, System.Drawing.Color.Yellow);
bulbBrush.SurroundColors = new System.Drawing.Color[] { System.Drawing.Color.Transparent };
obj.Brush = bulbBrush;
obj.Pen = null;
Feel free to contact me if you intended to get something else :) Edited by user Monday, December 17, 2007 12:55:00 PM(UTC)
| Reason: Not specified |
|
|
|
|
Rank: Member
Groups: Guest
Joined: 8/21/2007(UTC) Posts: 4
|
That worked perfectly Alex! Thank you for your time. Dustin
|
|
|
|
Rank: Advanced Member
Groups: Guest
Joined: 1/31/2005(UTC) Posts: 458
Was thanked: 5 time(s) in 5 post(s)
|
Great! :) I'm pleased to help you. |
|
|
|
|
Aurigma Forums
»
Graphics Mill
»
Discussions – Graphics Mill
»
Transparent filled EllipseVObject (with a glow effect)
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.