[cairo] Drawing a recurring pattern
cool-rr at cool-rr.com
Fri May 21 14:59:22 PDT 2010
I am new to cairo and I'm using wxcairo to draw custom widgets in my
I am making a Game of Life simulation. I want to draw a 2D grid of squares.
(I'm interested just in the wireframe of the grid now: The cells I've drawn
Can you suggest what would be a good way to draw the grid?
What I figured, as a total noob, is to make a `Pattern`, let's says with a
size of (5, 5), assuming that's the cell size I'm using for my grid, and
then draw two grey lines, one from (0, 0) to (0, 4) and one from (0, 0) to
Then I use the needed extend style to draw this on my actual context.
Is this a good way?
Question: How will I set the position of the grid?
Also: What class of `Pattern` should I use for it?
(P.S. Please put me in the `to` field if you send a message on this thread.)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cairo