logic problem



I only get to work on gtk for a few hours a week.
Here's my problem.

My test data consists of rectangles.
I need to scale this data to make it larger and smaller
and to pan around.

So, to the data I apply a scale. starting scale is to make
all data fit within the screen.
I apply a shiftX and a shiftY, for panning.

To each coord I apply a scale,shiftX/Y

The Y value has to be inverted to the 0,0 is in left lower corner.


I'm using gtk2.0.6 on a solaris 7 box, with gcc 2.8.1

I have the following functions to assist me with
gc2wc  -> graphics to world coords
wc2gc  -> world to graphics coords


Any assistance with the logic would be appreciated :)

Any source examples would be helpful.
I'm not a student, I'm a perl person by trade :)




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]