DrawingArea.setContentWidth

Sets the desired width of the contents of the drawing area.

Note that because widgets may be allocated larger sizes than they requested, it is possible that the actual width passed to your draw function is larger than the width set here. You can use [method@Gtk.Widget.set_halign] to avoid that.

If the width is set to 0 (the default), the drawing area may disappear.

class DrawingArea
void
setContentWidth
(
int width
)

Parameters

width int

the width of contents

Meta