ADC Home > Reference Library > Reference > Apple Applications > Final Cut Pro/Final Cut Express > FxPlug Reference

 


FxBitmap

Superclass:
Declared In:

Introduction

RAM-based image for software rendering.

Discussion

This subclass of FxImage is defined by an FxImageInfo structure.



Methods

-dataPtr
Returns a pointer to the pixel buffer for FxBitmap.
-dataPtrForPositionX:Y:
Returns a pointer to the pixel at the given {X,Y} position.
-initWithCopy:
Initializes with a copy of the given FxImage. This can be either an FxBitmap or an FxTexture.
-initWithInfo:
Initializes with the given FxImageInfo.
-initWithInfo:andData:
Initalizes with the given FxImageInfo and pixel buffer.
-initWithInfo:andRowBytes:andData:
Initalizes with the given FxImageInfo and pixel buffer.
-rowBytes
Returns the offset in bytes between the start of two rows
-setDataPtr:
Assigns the given pixel buffer to the FxBitmap.
-setRowBytes:
Sets the given FxBitmap's rowBytes value

dataPtr


Returns a pointer to the pixel buffer for FxBitmap.

- (void *)dataPtr; 
Return Value

The data pointer.


dataPtrForPositionX:Y:


Returns a pointer to the pixel at the given {X,Y} position.

- (void *)dataPtrForPositionX:(UInt32)x Y:(UInt32)y; 
Parameters
x
The X position.
y
The Y position.
Return Value

The pointer to the specified pixel.

Discussion

This method does no bounds checking and may return an invalid pointer if the position lies outside the bounds of the image. This method only works for 32-bpp (8-bit integer ARGB) images.


initWithCopy:


Initializes with a copy of the given FxImage. This can be either an FxBitmap or an FxTexture.

- (id)initWithCopy:(FxImage *)otherImage; 
Parameters
otherImage
The FxImage to be copied.
Return Value

The initialized FxBitmap.

Discussion

When initialized with this method, the FxBitmap owns the pixel buffer and is responsible for deallocating it.


NOTE: This method does not actually copy the pixels; it merely makes a new FxBitmap with the same FxImageInfo as the original.


initWithInfo:


Initializes with the given FxImageInfo.

- (id)initWithInfo:(FxImageInfo)imageInfo; 
Parameters
imageInfo
The FxImageInfo that defines the image.
Return Value

The initialized FxBitmap.

Discussion

When initialized with this method, the FxBitmap owns the the pixel buffer and is responsible for deallocating it.


initWithInfo:andData:


Initalizes with the given FxImageInfo and pixel buffer.

- (id)initWithInfo:(FxImageInfo)imageInfo andData:(void *)data; 
Parameters
imageInfo
The FxImageInfo that defines the image.
data
A pointer to the pixel buffer.
Return Value

The initialized FxBitmap.

Discussion

When initialized with this method, the sender owns the pixel buffer and is responsible for deallocating it.


initWithInfo:andRowBytes:andData:


Initalizes with the given FxImageInfo and pixel buffer.

- (id)initWithInfo:(FxImageInfo)imageInfo andRowBytes:(UInt32)rowBytes andData:(void *)data; 
Parameters
imageInfo
The FxImageInfo that defines the image.
rowBytes
bytes per row, including any padding
data
A pointer to the pixel buffer.
Return Value

The initialized FxBitmap.

Discussion

When initialized with this method, the sender owns the pixel buffer and is responsible for deallocating it.


NOTE: A bitmap created with this method will only be given to a plug-in whose properties dictionary has a value of [NSNumber numberWithBool:YES] for the kFxPropertyKey_SupportsRowBytes key.


rowBytes


Returns the offset in bytes between the start of two rows

- (UInt32)rowBytes; 
Return Value

The offset in bytes between pixel[x,y] and pixel[x,y+1].

Discussion

Effects should avoid overwriting padded scanlines created by Final Cut.


setDataPtr:


Assigns the given pixel buffer to the FxBitmap.

- (void)setDataPtr:(void *)data; 
Parameters
data
A pointer to a pixel buffer.
Discussion

If the current pixel buffer is owned by the FxBitmap, this method deallocates it.


setRowBytes:


Sets the given FxBitmap's rowBytes value

- (void)setRowBytes:(UInt32)rowBytes; 
Parameters
rowBytes
The offset in bytes between pixel[x,y] and pixel[x,y+1]


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.
Last Updated: 2008-06-05