ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> image-sig
image-sig
[Image-SIG] Re: pattern fill
by Fredrik Lundh other posts by this author
Aug 23 2004 2:29PM messages near this date
Re: [Image-SIG] pattern fill | [Image-SIG] Error compiling PIL
<sdahlbac@[...].fi>  wrote:

>  Have I overlooked something simple or is some kind of pattern fill not
>  supported in the ImageDraw module.
> 
>  I'd like to draw some sort of striped pattern(s) but haven't found a
>  (built in) way to do it, of course it is possible to implement such
>  functionality by drawing the stripes myself, but I wanted to check if I
>  missed something simpler first.

ImageDraw only supports solid fills.

as a workaround, you can create a patterned image, draw the graphics
in a separate image memory (the mask), and use

    im.paste(pattern, (0, 0), mask)

to render the patterned object.

</F>  



_______________________________________________
Image-SIG maillist  -  Image-SIG@[...].org
http://mail.python.org/mailman/listinfo/image-sig
Thread:

Andre Kuehne
Fredrik Lundh

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved