Skip to content

Geometry

Andrew Williams edited this page Mar 1, 2018 · 3 revisions

Fyne apps are based on 1 canvas per window. Each canvas has a root CanvasObject which can be a single widget or a Container for many sub-objects who's size and position are controlled by a Layout.

Each canvas has it's origin at the top,left (0, 0) every element of the UI may be scaled depending on the output device and so the API does not describe pixels or exact measurements. The Position(10, 10) may be 10 pixels right and down from the origin on, for example, a 96DPI monitor but on a HDPI (or "Retina") display this will probably be 15 pixels or more. As Fyne is based entirely on vector graphics this should never be an issue - but if you start loading bitmaps you should bear this in mind. To get "pixel perfect" rendering you need to multiply CanvasObject.Size by Canvas.Scale.

Welcome to the Fyne wiki.

Project documentation

Getting involved

Platform details

Clone this wiki locally