[Bf-python] Patch: Draw.Image() -- new method.

joeedh joeeagar at prodigy.net
Mon Nov 8 04:16:28 CET 2004


Jonathan Merritt wrote:

> joeedh wrote:
>
>> Jonathan Merritt wrote:
>>
>>> Blender.Draw.Image(image, x, y, zoomx=1.0, zoomy=1.0, clipx=0, 
>>> clipy=0, clipw=-1, cliph=-1):
>>>
>>>   Draws a Blender.Image on the screen using raster operations.
>>>
>>>   (image) - Blender.Image to draw.
>>>   (x, y) - Raster coordinates of the lower-left corner of the image 
>>> (can be negative).
>>>   (zoomx, zoomy) - Horizontal and vertical zoom factors.
>>>   (clipx, clipy, clipw, cliph) - Image space clipping rectangle.
>>
>>
>> You beat me to it!  I was just about to play around with that.  Cool.
>
>
>
> Thanks. :-)
>
> Does my method signature cover all the options you would have wanted 
> to implement?  I wanted to have a set of options that would be 
> straightforward for OpenGL raster ops, so:
>    - position
>    - zoom
>    - clipping
> Other sorts of transformations (rotations, shear, color space 
> operations, etc.) I think should be done elsewhere first and would 
> probably be excessive for the final draw method.  What do you think?
>
> Also, people have talked a lot about drawing images by texture-mapping 
> them on to polygons.  I know that texture mapping on my graphics card 
> (an Intel card in a Toshiba A10 laptop) is a bit dodgy, and I wanted 
> to keep the drawing as precise as possible for my camera calibration 
> script.  I chose raster operations for that purpose.  Is that adequate 
> for what you need?
>
> Jonathan Merritt.
>
I have to admit, all I intended to do was to modify the Image module to 
have a getGLBuffer method.  My knowledge of OpenGL doesn't include 
texture-mapping as yet, although as I understand it Image.glBindCode (or 
whatever it was) was supposed to allow this, but unfortunately required 
the image to be active and visible inside the UV image editer window.

joeedh




More information about the Bf-python mailing list