GTKD - Get the size of the context
Mike Wey via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sat Dec 26 03:59:21 PST 2015
On 12/25/2015 11:55 AM, TheDGuy wrote:
> Hello,
>
> i want to draw something to a GTKD context and i need the size of the
> context in pixel but i don't know how i can get the pixel height and
> width? Any ideas?
>
> With best regards
You could try getting the size of the widget the context is referring to
with getAllocation.
GtkAllocation size;
widget.getAllocation(size);
and then use size.width and size.height.
--
Mike Wey
More information about the Digitalmars-d-learn
mailing list