View previous topic :: View next topic |
Author |
Message |
.lua Expert Cheater
Reputation: 1
Joined: 13 Sep 2018 Posts: 202
|
Posted: Wed Nov 27, 2019 4:12 am Post subject: How to set shape as rounded rectangle |
|
|
I can only set it to inverted triangle, but this is not the real fillet.
Addpolygon to generate the fillet
Code: | if f then f.destroy() end
vv=5
vx=200
vy=200
f=createForm()
f.BorderStyle=bsNone
f.color=0xff
r=createRegion()
r.addRectangle(vv,vv,vx-vv,vy-vv)
r.addPolygon({{0,vv},{0,vx-vv},{vx-vv,0},{vv,0}})--Top left corner
r.addPolygon({{vv,0},{vx-vv,0},{vx,vv},{vx,vx-vv}})--Upper right corner
r.addPolygon({{0,vv},{0,vy-vv},{vv,vy},{vx-vv,vy}})--Lower left quarter
r.addPolygon({{vv,vy},{vx-vv,vy},{vy,vx-vv},{vx,vv}})--Lower right corner
f.setShape(r)
f.OnMouseDown=function() f.dragNow() end |
Description: |
|
Filesize: |
33.4 KB |
Viewed: |
4483 Time(s) |

|
|
|
Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25792 Location: The netherlands
|
Posted: Wed Nov 27, 2019 5:14 am Post subject: |
|
|
I am assuming you're on ce 7.0 which added roundRect to the canvas methods
Code: |
if f then f.destroy() end
f=createForm()
f.BorderStyle=bsNone
f.Width=200
f.Height=200
f.Color=0xff
bm=createBitmap()
bm.Width=f.Width
bm.Height=f.Height
bm.Canvas.Pen.Color=0xff0000 --back/0 is invisible
bm.Canvas.Pen.Width=5
bm.Canvas.Brush.Color=0xff0000
bm.Canvas.roundRect(0,0,200,200,100,100)
f.setShape(bm)
f.OnMouseDown=function() f.dragNow() end
|
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
 |
.lua Expert Cheater
Reputation: 1
Joined: 13 Sep 2018 Posts: 202
|
Posted: Thu Nov 28, 2019 12:15 am Post subject: |
|
|
Dark Byte wrote: | I am assuming you're on ce 7.0 which added roundRect to the canvas methods | Unfortunately, I used the cheating engine 6.8.3Is this all right?
|
|
Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25792 Location: The netherlands
|
Posted: Thu Nov 28, 2019 12:53 am Post subject: |
|
|
fillRect is a square so not that usefull
ellipse might be better
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
 |
.lua Expert Cheater
Reputation: 1
Joined: 13 Sep 2018 Posts: 202
|
Posted: Thu Nov 28, 2019 1:01 am Post subject: |
|
|
Dark Byte wrote: | fillRect is a square so not that usefull
ellipse might be better | You mean this? But can he draw four rounded corners
What if you want to add borders to a drawing Code: | Canvas.Brush.Style=1 |
Description: |
|
Filesize: |
35.64 KB |
Viewed: |
4436 Time(s) |

|
|
|
Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25792 Location: The netherlands
|
Posted: Thu Nov 28, 2019 3:14 am Post subject: |
|
|
You can also just place an image on the form in the background and then use setLayeredAttributes to mark a specific color as see through
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
 |
.lua Expert Cheater
Reputation: 1
Joined: 13 Sep 2018 Posts: 202
|
Posted: Thu Nov 28, 2019 3:17 am Post subject: |
|
|
Dark Byte wrote: | You can also just place an image on the form in the background and then use setLayeredAttributes to mark a specific color as see through | I use setlayeredattributes now, but it's only effective if the computer turns on Aero
|
|
Back to top |
|
 |
|