PatternBrush from a section of an Image

Windows specific forum
PolyVector
Enthusiast
Enthusiast
Posts: 499
Joined: Wed Sep 17, 2003 9:17 pm
Location: Southern California
Contact:

PatternBrush from a section of an Image

Post 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:
PolyVector
Enthusiast
Enthusiast
Posts: 499
Joined: Wed Sep 17, 2003 9:17 pm
Location: Southern California
Contact:

Post 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
Dare2
Moderator
Moderator
Posts: 3321
Joined: Sat Dec 27, 2003 3:55 am
Location: Great Southern Land

Post by Dare2 »

NP. It was nothing, really. :)
@}--`--,-- A rose by any other name ..
PolyVector
Enthusiast
Enthusiast
Posts: 499
Joined: Wed Sep 17, 2003 9:17 pm
Location: Southern California
Contact:

Post 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:
GPI
PureBasic Expert
PureBasic Expert
Posts: 1394
Joined: Fri Apr 25, 2003 6:41 pm

Post by GPI »

Sometimes the solution is so easy:

First of all: It is impossible, BUT you can create a image-part with GrabImage....
PolyVector
Enthusiast
Enthusiast
Posts: 499
Joined: Wed Sep 17, 2003 9:17 pm
Location: Southern California
Contact:

Post by PolyVector »

There's no way of doing it with the API only?
Well I'll try GrabImage... Thanks GPI
PolyVector
Enthusiast
Enthusiast
Posts: 499
Joined: Wed Sep 17, 2003 9:17 pm
Location: Southern California
Contact:

Post by PolyVector »

I created a function that should have been in the API using GrabImage... thanks again GPI...
Post Reply