c# - How do I draw a rectangle onto an image with transparency and text -
this first graphics based project , begin need able draw rectangle onto bitmap transparency , text.
i'm not sure begin this. i've done little research can't seem find article allow me add semi transparent rectangle image.
what have image stream need able manipulate.
can please point me in right direction this?
a site source great have never done gdi work before.
you can try this:
// load image (probably stream) image image = image.fromfile( imagepath ); using (graphics g = graphics.fromimage(image)) { // modify image using g here... // create brush alpha value , use g.fillrectangle function } image.save( imagenewpath );
edit: code create semi transparency gray brush
color customcolor = color.fromargb(50, color.gray); solidbrush shadowbrush = new solidbrush(customcolor); g.fillrectangles(shadowbrush, new rectanglef[]{rectftofill});
Comments
Post a Comment