• Bu site çerezler kullanır. Bu siteyi kullanmaya devam ederek çerez kullanımımızı kabul etmiş olursunuz. Daha fazla bilgi edin.
  • Editör alımları başladı! Hemen başvur ve kadroya gir! [ Konuya git ]
  • Destek Adayı alımları başladı! Hemen başvur ve kadroya gir! [ Konuya git ]

Cheat Engine Lua Canvas Test

Zahtt

Aktif Üye
Aktif Üye
Katılım
2 Tem 2019
Mesajlar
26
Beğeniler
0
Puanları
1
#1
You do not have permission to view link Giriş yap veya üye ol.


C++:
function FormClose(sender)
  object_destroy(MyForm)
  MyForm = nil
  return caFree --Possible options: caHide, caFree, caMinimize, caNone
end

FormClose()

MyForm = createForm(false)
  control_setSize(MyForm, 400,400)
  control_setCaption(MyForm,'Canvas Test')
  setProperty(MyForm, 'BorderStyle', 'bsSizeable')
  form_onClose(MyForm, FormClose)
  form_show(MyForm)

MyPanel = createPanel(MyForm)
  control_setPosition(MyPanel, 10,10)
  control_setSize(MyPanel, 380,380)
  setProperty(MyPanel, 'Anchors','akTop,akLeft,akRight,akBottom')

MyImage = createImage(MyPanel)
  control_setAlign(MyImage, alClient)
  setProperty(MyImage, 'Anchors','akTop,akLeft,akRight,akBottom')
  --setProperty(MyImage, 'Proportional','true')
  image_stretch(MyImage, true)

canvas = image_getCanvas(MyImage)

brush = canvas_getBrush(canvas)
  brush_setColor(brush, 0xff00ff) --pink  BBGGRR

pen = canvas_getPen(canvas)
  pen_setWidth(pen, 1)

canvas_line(canvas, 0,0,90,90)

pen_setColor(pen, 0x00ffff)  --yellow  BBGGRR

-- house
canvas_setPenPosition(canvas, 80, 100)
  canvas_lineTo(canvas,120,140)
  canvas_lineTo(canvas,120,190)
  canvas_lineTo(canvas,40,190)
  canvas_lineTo(canvas,40,140)
  canvas_lineTo(canvas,80,100)

-- door
pen_setColor(pen, 0x00ff00)  --green  BBGGRR
canvas_setPenPosition(canvas, 100, 190)
  canvas_lineTo(canvas,100,170)
  canvas_lineTo(canvas,90,170)
  canvas_lineTo(canvas,90,190)

-- ground
pen_setColor(pen, 0x888888)  --gray BBGGRR
pen_setWidth(pen, 5)
canvas_setPenPosition(canvas, 0, 193)
  canvas_lineTo(canvas,240,193)

--begin tree
pen_setWidth(pen, 12)
pen_setColor(pen, 0xeeeeee)  --gray BBGGRR
canvas_setPenPosition(canvas, 170, 185)
  canvas_lineTo(canvas,170,170)

pen_setWidth(pen, 1)
pen_setColor(pen, 0x00ff00)  --green  BBGGRR

for index=0,80,10 do
  canvas_setPenPosition(canvas, 170, 170)
  canvas_lineTo(canvas,170 - index + 40,120)
end
-- unix cheat
-- end tree

canvas_rect(canvas,20,50,50,80) --yes it's filled
canvas_textOut(canvas,20,110,'text')

collectgarbage ("collect")