Canvas questions lazarus / 39-Graphics ---------------------------------------------------------------------- Blestan · 2013-04-02 20:27 hi! i have 2 questions about canvas 1/ how to get update rect on overiding paint method in multiplatform way... 2/ how to set viewport org to offset all draw operations on the canvas... thanks ---------------------------------------------------------------------- Blaazen · 2013-04-02 21:22 I don't understand the questions very well. To 1) I think you are looking for InvalidateRect, it means that only part of component's canvas is repainted. It works well on Qt and GTk2. ---------------------------------------------------------------------- Blestan · 2013-04-03 05:37 hummmm.... 1. updaterect structure must me available during paint. invalidaterect just add another rect to list of invalid regions... 2. setviewport allows to set an origin to all drawing operations,  so you can for example draw at negative coordinates and still view the drawing on the control. ---------------------------------------------------------------------- User137 · 2013-04-03 09:36 There is no origin property on TCanvas. You can make your own TPoint variable for origin, and decrease it from every coordinate you use for drawing. Example, origin:=point(100, 100). Draw picture to (120-origin.x, 120-origin.y) So now picture is drawn to (20, 20), relatively to origin.