Cairo drawing within a rectangle or another path

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Cairo drawing within a rectangle or another path

Maarten Mostert-2

Hi,

 

I have this problem in Cairo that I only want to show what is within a rectangle.

 

I used to do these things within a seperate surface after which I showed this as a source on the cairoContext.

 

As I want to make a fully vectorised PDF file (without any images) I want to avoid these, so I am looking for the operators that allow me to define a rectangular path (or any other shape) and then draw within this path.

 

The enclosed image shows what kinf of effect I want. You can imagine thet the black liner are smaller and that the elips was partly drawn outide the greenish rectangle.

 

Anyone having a code snippit on this ?

 

Thanks in adavance,

 

Maarten,


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

mask or patern.png (7K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Cairo drawing within a rectangle or another path

Randy Coulman
Maarten,

This is what #clip and #clipPreserve are for:

cr rectangle: (100@200 extent: 300@200);
    clip.

"draw other shapes"

Randy


On Tue, Sep 17, 2013 at 5:48 AM, Maarten MOSTERT <[hidden email]> wrote:

Hi,

 

I have this problem in Cairo that I only want to show what is within a rectangle.

 

I used to do these things within a seperate surface after which I showed this as a source on the cairoContext.

 

As I want to make a fully vectorised PDF file (without any images) I want to avoid these, so I am looking for the operators that allow me to define a rectangular path (or any other shape) and then draw within this path.

 

The enclosed image shows what kinf of effect I want. You can imagine thet the black liner are smaller and that the elips was partly drawn outide the greenish rectangle.

 

Anyone having a code snippit on this ?

 

Thanks in adavance,

 

Maarten,


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc




--
Randy Coulman
Email: [hidden email]
Home: http://randycoulman.com
Twitter: @randycoulman      GitHub: randycoulman

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Cairo drawing within a rectangle or another path

Maarten Mostert

Thank you Randy,

I knew I was looking over something simple

Regards,

@+Maarten,

 

 

> "Randy Coulman" <[hidden email]> |

Maarten,
This is what #clip and #clipPreserve are for:
cr rectangle: (100@200 extent: 300@200);
clip.
"draw other shapes"
Randy


On Tue, Sep 17, 2013 at 5:48 AM, Maarten MOSTERT <[hidden email]> wrote:

Hi,

 

I have this problem in Cairo that I only want to show what is within a rectangle.

 

I used to do these things within a seperate surface after which I showed this as a source on the cairoContext.

 

As I want to make a fully vectorised PDF file (without any images) I want to avoid these, so I am looking for the operators that allow me to define a rectangular path (or any other shape) and then draw within this path.

 

The enclosed image shows what kinf of effect I want. You can imagine thet the black liner are smaller and that the elips was partly drawn outide the greenish rectangle.

 

Anyone having a code snippit on this ?

 

Thanks in adavance,

 

Maarten,


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc



--
Randy Coulman
Email: [hidden email]
Home: http://randycoulman.com
Twitter: @randycoulman      GitHub: randycoulman

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc