[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: Set Origin for Draw Operations?
- From: Havoc Pennington <rhp zirx pair com>
- To: gtk-app-devel-list redhat com
- Subject: Re: Set Origin for Draw Operations?
- Date: Sat, 5 Jun 1999 18:10:42 -0400 (EDT)
On Sat, 5 Jun 1999, SEGV wrote:
>
> I want to set the origin of a drawingarea widget so that when I draw, my
> operations are offset by that amount.
>
> For example, I am drawing a line from (32,32) to (64,64). If I set the
> origin to (32,32) then I want that line to draw from (0,0) to (32,32).
>
> How do I do this? Is it a widget operation, or a GC operation? Thanks.
>
I don't think there's a way to do this; the best approximation I can think
of would be to draw to a pixmap buffer, then copy the pixmap to 32,32.
I would suggest writing your own little interface to do this with;
something like:
translate_point(gint* x, gint* y);
then call that on points before you pass them in to the drawing functions.
Of course you could get more elaborate and write a GdkGC wrapper with this
feature, etc. but that seems like overkill.
Havoc
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]