Page 2 of 2

Posted: Thu Aug 27, 2009 2:52 pm
by Trond
A better request would be ClipDrawing() or something. It will make coding a procedure like this much easier and also have other uses.

Posted: Thu Aug 27, 2009 2:56 pm
by Seymour Clufley
How would it work? What other uses would it have?

Posted: Thu Aug 27, 2009 6:08 pm
by wilbert
It would make more sense to me in this case if all 2d drawing functions would support the ability to use a texture as a fill. That way you could simply draw a box and use your image as a texture. But with this kind of a more general feature you would also be able to use it for circles and ellipses.

Posted: Thu Aug 27, 2009 7:58 pm
by Kaeru Gaman
those are called "pattern" not "texture".
is this still avaliable on modern systems?

Posted: Thu Aug 27, 2009 8:40 pm
by wilbert
You are right it is called a pattern. I mentioned it wrong.
I don't know if there are api functions like this. I use ActionScript quite a lot for Flash movies and that language has a nice function called BeginBitmapFill that accepts a bitmap and a transform matrix to rotate, scale and translate this bitmap fill.

Posted: Fri Aug 28, 2009 11:44 am
by Trond
They are called "brushes" in Windows API.

Posted: Fri Aug 28, 2009 12:50 pm
by Seymour Clufley
I think this is a good idea for a feature request.

Code: Select all

tileimg = LoadImage(#PB_Any,"a_file.bmp")
DrawingMode(#PB_2DDrawing_Texture)
DrawingTextureImage(ImageID(tileimg))
Ellipse(50,50,200,100)