Noviceatthis Posted November 8, 2014 Share Posted November 8, 2014 Hello all, So basically i'm playing around with GDI plus in an effort to understand it better, and i've hit a bit of a problem: #include <GDIPlus.au3> _GDIPlus_Startup() $hBitmap = _GDIPlus_BitmapCreateFromScan0(500, 80) $hContext = _GDIPlus_ImageGetGraphicsContext($hBitmap) _GDIPlus_GraphicsClear($hContext, 0xFFFFFFFF) $hBrush1 = _GDIPlus_BrushCreateSolid(0xFF8090F0) $hBrush2 = _GDIPlus_BrushCreateSolid(0xFFCC00FF) _GDIPlus_GraphicsFillRect($hContext, 0, 0, 250, 80, $hBrush1) _GDIPlus_GraphicsFillRect($hContext, 250, 0, 250, 80, $hBrush2) _GDIPlus_ImageSaveToFile($hBitmap, @ScriptDir & "\Test.jpg") _GDIPlus_BrushDispose($hBrush1) _GDIPlus_BitmapDispose($hBitmap) _GDIPlus_GraphicsDispose($hContext) _GDIPlus_Shutdown() ShellExecute(@ScriptDir & "\Test.jpg") So it does what I want, to an extent. The transition zone between the two colours has (if you zoom in) several other intermediary colours. I was just wondering whether it was possible to have the the one colour transitioning to the other without these intermediaries, meaning there are only two colours in this picture. Thanks in advance. Link to comment Share on other sites More sharing options...
Solution eukalyptus Posted November 8, 2014 Solution Share Posted November 8, 2014 Replace "jpg" by "bmp" DirectSound UDF Direct2D UDF AutoIt ScreenSaver Collection BASS UDF v10 download Link to comment Share on other sites More sharing options...
Noviceatthis Posted November 8, 2014 Author Share Posted November 8, 2014 Thanks eukalyptus, works perfectly Link to comment Share on other sites More sharing options...
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