i have a picturebox with an image loaded..and i want that when i click a button an alpha rectangle is drawn into that picturebox making the image a slight darker(or lighter)..any examples around there plz?
Printable View
i have a picturebox with an image loaded..and i want that when i click a button an alpha rectangle is drawn into that picturebox making the image a slight darker(or lighter)..any examples around there plz?
anyone?
Just set the color to be drawn from the FromARGB() method. Set the A to the desired transparency. I think RGB values would be 0 to darken the image and 255 to brighten it.
From there, you just draw a rectangle with this color onto the image.
yea but rectangles only support brushes :p and brushes dont have fromArgb() :p
BTW you could combine line 1 and 3 if you needed.PHP Code:// Create the transparent color
transparentFillColor = Color.FromArgb(transparency,fillColor);
...
Graphics g = e.Graphics;
// Draw the transparent rectangle on the graphics object
g.FillRectangle(new SolidBrush(transparentFillColor), (Rectangle)rectangleList[Index]);
yea i know u rule i suck
:confused: :confused:
i suck
u rule
explicit enough? lolol