Change the coordinate system for drawing

craf <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <1319162561.4371.153.camel@cristian-desktop>
Hi Everyone

I apologize if my questions are very simple, I searched the list
archives, but I've found questions similar to mine.
The English is not my first language, so try to make myself understood
with some drawings.

As I understand it, the point (0,0) is located in the upper left of the
control gtk.drawinarea.

 
 ___________________________
| 0, 1, 3, 4, ...x          |
| 1                         |
| 2                         |
| 3                         | 
| 4      gtk.DrawingArea    |  
| .                         | 
| .                         | 
| y                         |
|                           |  
|___________________________|

First Question
--------------

Is it possible to change the coordinate system only to gtk.DrawingArea,
such as?

 ___________________________
|                          |
|                          |
| y                        |
| .                        | 
| .      gtk.DrawingArea   |  
| 3                        | 
| 2                        | 
| 1                        |
| 0 1 2 3 4 ... x          |  
|__________________________|

Second Question
---------------

If you can not do gtk.DrawingArea control, you can do with a context?

Example.

. Creating a Context

context = self.drawingarea.window.cairo_create

and then change the coordinate system to the context.

 
 ___________________________
|        gtk.DrawingArea    |
|   ______________________  |
|  |                     |  |
|  | y                   |  |
|  | .                   |  | 
|  | .                   |  | 
|  | 3        context    |  | 
|  | 2                   |  | 
|  | 1                   |  |
|  | 0 1 2 3 4 ... x     |  |  
|  |_____________________|  |
|___________________________|

Conclusion
----------
I tried to use the methods, translated, rotated, transformed, but only
take effect what I want to draw, for example a curve or a line.

I appreciate any help that I may have to clarify these concepts, and I
hope to have made me understand

Best Regards.

Cristian

--
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.