Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
GDI+ transparent imgCanvas
Message
From
21/06/2012 07:08:40
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
19/06/2012 08:02:35
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Pictures and Image processing
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2003
Database:
MS SQL Server
Miscellaneous
Thread ID:
01546322
Message ID:
01546500
Views:
53
>There seems to be a lot of confusion around the context in which word "transparent" applies to an imgCanvas (using gdiPlusX).
>
>It seems that the transparency means "the amount of the previously rendered pixels on the canvas that will seep through any new drawing on that same canvas". I need the canvas itself to be transparent, so I can have two or three canvases overlaid, made visible/invisible at will, and if need be, show some VFP controls beneath them (maybe a label or a background shape, nothing clickable, of course).
>
>After googling this for hours, I'm at the end of my wits.

The solution is to not use imgcanvas at all (at least that was my solution). Instead, have an image object ready,

oBMP = .BITMAP.New(toImg.WIDTH, toImg.HEIGHT)
oGFX = .Graphics.FromImage(oBMP)
...do your drawing here in oGfX
oBMP.SAVE(toImg,.Imaging.ImageFormat.png)

The trick here is that oBmp can save to an image object, which I discovered accidentally, while looking for something else in system.drawing.prg.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform