Can I fill the image area with the specified color?

This forum is for eXpress++ general support.
Post Reply
Message
Author
User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

Can I fill the image area with the specified color?

#1 Post by Eugene Lutsenko »

whether there is in Alaska or Express ++ opportunity to fill a limited area of the image with the specified color?

User avatar
Auge_Ohr
Posts: 1428
Joined: Wed Feb 24, 2010 3:44 pm

Re: Can I fill the image area with the specified color?

#2 Post by Auge_Ohr »

Eugene Lutsenko wrote:whether there is in Alaska or Express ++ opportunity to fill a limited area of the image with the specified color?
is it the same Question like http://bb.donnay-software.com/donnay/vi ... f=2&t=1323

if yes try API Function "ExtFloodFill" http://msdn.microsoft.com/en-us/library ... 85%29.aspx
greetings by OHR
Jimmy

User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

Re: Can I fill the image area with the specified color?

#3 Post by Eugene Lutsenko »

Auge_Ohr wrote:
Eugene Lutsenko wrote:whether there is in Alaska or Express ++ opportunity to fill a limited area of the image with the specified color?
is it the same Question like http://bb.donnay-software.com/donnay/vi ... f=2&t=1323

if yes try API Function "ExtFloodFill" http://msdn.microsoft.com/en-us/library ... 85%29.aspx
Jimmy!

You gave a very good demo program in Alaska, which proves that it is possible. But it does not help me to do it on your system. I did, in principle, to understand how you did it. But I can not do it.

User avatar
Auge_Ohr
Posts: 1428
Joined: Wed Feb 24, 2010 3:44 pm

Re: Can I fill the image area with the specified color?

#4 Post by Auge_Ohr »

Eugene Lutsenko wrote:You gave a very good demo program in Alaska, which proves that it is possible. But it does not help me to do it on your system. I did, in principle, to understand how you did it. But I can not do it.
as i say i used XOANON Lib from Simon Burford ...
XOANON use Windows API with "Pen","Brush" and Windows "DC" to paint so it is total different to Xbase++ "GRA" which use "PresSpace".

here some DllCall i have to use for the Demo

Code: Select all

DllCall("Gdi32.dll"   ,DLL_STDCALL,"MoveToEx"                ,;
DllCall("Gdi32.dll"   ,DLL_STDCALL,"LineTo"                  ,;
DllCall("Gdi32.dll"   ,DLL_STDCALL,"ExtFloodFill"            ,;
DllCall("Gdi32.dll"   ,DLL_STDCALL,"SelectObject"            ,;
DllCall("Gdi32.dll"   ,DLL_STDCALL,"GetStockObject"          ,;
DllCall("Gdi32.dll"   ,DLL_STDCALL,"BitBlt"                  ,;
DllCall("Gdi32.dll"   ,DLL_STDCALL,"DeleteObject"            ,;
DllCall("Gdi32.dll"   ,DLL_STDCALL,"ExtCreatePen"            ,;
DllCall("Gdi32.dll"   ,DLL_STDCALL,"CreateHatchBrush"        ,;
DllCall("Gdi32.dll"   ,DLL_STDCALL,"CreatePatternBrush"      ,;
DllCall("Gdi32.dll"   ,DLL_STDCALL,"CreateSolidBrush"        ,;
DllCall("Gdi32.dll"   ,DLL_STDCALL,"CreateBrushIndirect"     ,;
DllCall("User32.dll"  ,DLL_STDCALL,"GetSysColorBrush"        ,;
DllCall("Gdi32.dll"   ,DLL_STDCALL,"CreateDIBPatternBrushPt" ,;
DllCall("Gdi32.dll"   ,DLL_STDCALL,"CreateCompatibleBitmap"  ,;
DllCall("Gdi32.dll"   ,DLL_STDCALL,"CreateBitmap"            ,;
DllCall("Gdi32.dll"   ,DLL_STDCALL,"GetBitmapDimensionEx"    ,;
DllCall("Gdi32.dll"   ,DLL_STDCALL,"SetBitmapDimensionEx"    ,;
DllCall("Gdi32.dll"   ,DLL_STDCALL,"CreateDIBSection"        ,;
DllCall("Kernel32.dll",DLL_STDCALL,"RtlMoveMemory"           ,;
most of those DllCall does not have a "GRA" Equivalent so it is hard to rewrite it in "pure" Xbase++
greetings by OHR
Jimmy

User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

Re: Can I fill the image area with the specified color?

#5 Post by Eugene Lutsenko »

Now to me, with a noticeable delay it realized that for this purpose it is possible to successfully use a gradient fill, which Jimmy said:
http://bb.donnay-software.com/donnay/vi ... 8&start=20

Post Reply