|
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
.lua Expert Cheater Reputation: 1
Joined: 13 Sep 2018 Posts: 189
|
Posted: Sat Apr 16, 2022 9:51 am Post subject: How canvas fills colors based on shape areas |
|
|
How to fill a triangle or draw a solid triangle Code: | if f then f.Destroy() end
f=createForm()
f.OnPaint=function()
f.Canvas.Pen.Color=0x123456
f.Canvas.MoveTo(100,100)
f.Canvas.LineTo(200,200)
f.Canvas.LineTo(150,220)
f.Canvas.LineTo(100,100)
f.Canvas.FloodFill(0,0,0x123456,fsSurface)--fsSurface fsBorder
f.Canvas.Brush.Color=0x00ff00
f.Canvas.ellipse(10,10,100,100)
end
f.Repaint() |
Description: |
|
Filesize: |
7.06 KB |
Viewed: |
1287 Time(s) |
|
|
|
Back to top |
|
|
Corroder Grandmaster Cheater Supreme Reputation: 75
Joined: 10 Apr 2015 Posts: 1667
|
Posted: Sat Apr 16, 2022 10:35 pm Post subject: |
|
|
Code: | if f then f.Destroy() end
f=createForm()
f.OnPaint=function()
f.Canvas.Pen.Color=0x123456
f.Canvas.MoveTo(100,100)
f.Canvas.LineTo(200,200)
f.Canvas.LineTo(150,220)
f.Canvas.LineTo(100,100)
f.Canvas.Brush.Color=0x00ff00
f.Canvas.ellipse(10,10,100,100)
end
f.Repaint()
f.OnClick=function(sender,x,y) ---- ONLY click on triangle
local x,y = f.ScreenToClient(getMousePos())
local TempColor = f.Canvas.getPixel(x, y)
f.Canvas.Brush.Style = 0
f.Canvas.Brush.Color = 0x0000ff --- red
f.Canvas.FloodFill(x, y, TempColor, 'fsSurface')
f.Canvas.Brush.Style = 1
end |
_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL |
|
Back to top |
|
|
.lua Expert Cheater Reputation: 1
Joined: 13 Sep 2018 Posts: 189
|
Posted: Sun Apr 17, 2022 9:51 am Post subject: |
|
|
Great. Besides filling triangles, are other shapes the same?
|
|
Back to top |
|
|
Corroder Grandmaster Cheater Supreme Reputation: 75
Joined: 10 Apr 2015 Posts: 1667
|
Posted: Sun Apr 17, 2022 9:00 pm Post subject: |
|
|
.lua wrote: | Great. Besides filling triangles, are other shapes the same? |
Yes, it this
_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|