bleh Posted May 24, 2014 Posted May 24, 2014 Hello I want to draw a circle on a background picture but i want transparency in it. Is there an easy way to do it? #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <GDIPlus.au3> $Form1 = GUICreate("Form1", 735, 121, 192, 124) GUISetState(@SW_SHOW) _GDIPlus_Startup() $hBitmap = _GDIPlus_BitmapCreateFromFile(@ScriptDir & "\shit.bmp") $hGraphic = _GDIPlus_GraphicsCreateFromHWND($Form1) _GDIPlus_GraphicsDrawImage($hGraphic, $hBitmap, 0, 0) $ellipse = _GDIPlus_GraphicsCreateFromHWND($Form1) $hBrush = _GDIPlus_BrushCreateSolid(0xFFE0A0FF) _GDIPlus_GraphicsSetSmoothingMode($ellipse, $GDIP_SMOOTHINGMODE_HIGHQUALITY) _GDIPlus_GraphicsFillEllipse($ellipse, 10, 10, 40, 40, $hBrush)
bleh Posted May 24, 2014 Author Posted May 24, 2014 I could also use a colored rectangle picture instead of _GDIPlus_GraphicsFillEllipse if that would be easier.
UEZ Posted May 24, 2014 Posted May 24, 2014 Use $hBrush = _GDIPlus_BrushCreateSolid(0x80E0A0FF) to enable alpha channel transparency. Br, UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ
bleh Posted May 24, 2014 Author Posted May 24, 2014 Oh god.... I didnt even realize there was an alpha channel in it. That's what happens when you copy from the examples without looking for every detail. Shame on me. Thank you.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now