Page 1 of 1

PatternBrush from a section of an Image

Posted: Sat Jun 12, 2004 5:23 am
by PolyVector
I need help with this problem...
I'm not sure how I would go about using a specified section of an Image as a PaternBrush...

Here's how I use the entire image:

Code: Select all

ImgNum=LoadImage(#PB_Any,"BackGround.bmp")
Brush=CreatePatternBrush_(ImageID())
But say I wanted to use (10,10)-(25,25) of BackGround.bmp
I can't figure it oot :(

And don't paste that RTFM gif at me! :twisted:

Posted: Sat Jun 12, 2004 5:29 am
by PolyVector
Nevermind, I just noticed Patterns can't use transparencies...so I'll just write my own fill code using my transparent routine :/.... oh well :)
Thanks anyways, for nothing! :)
Image

Posted: Sat Jun 12, 2004 7:10 am
by Dare2
NP. It was nothing, really. :)

Posted: Fri Jun 18, 2004 9:01 pm
by PolyVector
Well, it turns out in some instances I do need to be able to do this... grrr If anyone knows how to turn a section of an image into a patternbrush I'd love to hear it :oops:

Posted: Fri Jun 18, 2004 9:46 pm
by GPI
Sometimes the solution is so easy:

First of all: It is impossible, BUT you can create a image-part with GrabImage....

Posted: Fri Jun 18, 2004 10:20 pm
by PolyVector
There's no way of doing it with the API only?
Well I'll try GrabImage... Thanks GPI

Posted: Fri Jun 18, 2004 10:35 pm
by PolyVector
I created a function that should have been in the API using GrabImage... thanks again GPI...