SophiaFramework UNIVERSE 5.3 |
BREW 2.0 | BREW 2.1 | BREW 3.1 | BREW 4.0 |
---|---|---|---|
O | O | O | O |
Public Functions | |
---|---|
SFCError |
BltIn(
SInt32 xDest
, SInt32 yDest
, SInt32 dx
, SInt32 dy
, SFBBitmapSmpConstRef bmpSrc
, SInt32 xSrc
, SInt32 ySrc
, AEERasterOp rop = AEE_RO_COPY
)
Perform a bit-block transfer of the data corresponding to a rectangle of pixels from the specified source bitmap into this bitmap.
|
SFCError |
BltIn(
SFXRectangleConstRef rcDest
, SFBBitmapSmpConstRef bmpSrc
, SFXGridConstRef gridSrc
, AEERasterOp rop = AEE_RO_COPY
)
Perform a bit-block transfer of the data corresponding to a rectangle of pixels from the specified source bitmap into this bitmap.
|
SFCError |
BltIn(
SFXGridConstRef gridDest
, SFXSizeConstRef sizeDest
, SFBBitmapSmpConstRef bmpSrc
, SFXGridConstRef gridSrc
, AEERasterOp rop = AEE_RO_COPY
)
Perform a bit-block transfer of the data corresponding to a rectangle of pixels from the specified source bitmap into this bitmap.
|
SFCError |
BltOut(
SInt32 xDest
, SInt32 yDest
, SInt32 dx
, SInt32 dy
, SFBBitmapSmpConstRef bmpDest
, SInt32 xSrc
, SInt32 ySrc
, AEERasterOp rop = AEE_RO_COPY
)
Perform a bit-block transfer from this bitmap into the specified destination bitmap.
|
SFCError |
BltOut(
SFXRectangleConstRef rcDest
, SFBBitmapSmpConstRef bmpDest
, SFXGridConstRef gridSrc
, AEERasterOp rop = AEE_RO_COPY
)
Perform a bit-block transfer from this bitmap into the specified destination bitmap.
|
SFCError |
BltOut(
SFXGridConstRef gridDest
, SFXSizeConstRef sizeDest
, SFBBitmapSmpConstRef bmpDest
, SFXGridConstRef gridSrc
, AEERasterOp rop = AEE_RO_COPY
)
Perform a bit-block transfer from this bitmap into the specified destination bitmap.
|
NativeColor |
ColorToNative(
SFXRGBColorConstRef color
)
Convert RGB value into Native value.
|
SFCError |
CreateCompatibleBitmap(
SFBBitmapSmpPtr cloneBmp
, UInt16 width
, UInt16 height
)
Create a new bitmap compatible with this bitmap interface.
|
SFBBitmapSmp |
CreateCompatibleBitmap(
SFXSizeConstRef size
)
Create a new bitmap compatible with this bitmap interface.
|
SFCError |
DrawHScanline(
UInt32 y
, UInt32 xMin
, UInt32 xMax
, NativeColor color
, AEERasterOp rop = AEE_RO_COPY
)
Draw horizon scan line.
|
SFCError |
DrawPixel(
UInt32 x
, UInt32 y
, NativeColor color
, AEERasterOp rop = AEE_RO_COPY
)
Draws a single pixel in the bitamp.
|
SFCError |
DrawPixel(
SFXPixelConstRef pixel
, NativeColor color
, AEERasterOp rop = AEE_RO_COPY
)
Draws a single pixel in the bitamp.
|
SFCError |
FillRect(
SFXRectangleConstRef rect
, NativeColor color
, AEERasterOp rop = AEE_RO_COPY
)
Draw a solid rectangle of the specified color.
|
SFCError |
GetInfo(
AEEBitmapInfo* bmpInfo
, SInt32 size = sizeof(AEEBitmapInfo)
)
Retrieve the dimension of the bitmap.
|
SFCError |
GetPixel(
UInt32 x
, UInt32 y
, NativeColor* color
)
Retrieves the value of the specified pixel.
|
SFCError |
GetPixel(
SFXPixelConstRef pixel
, NativeColor* color
)
Retrieves the value of the specified pixel.
|
NativeColor |
GetPixel(
SFXPixelConstRef pixel
)
Retrieves the value of the specified pixel.
|
SFCError |
GetTransparencyColor(
NativeColor* color
)
Get the current transparency color of the bitmap. This is used when this bitmap is the source bitmap of a transparent bit blit operation.
|
NativeColor |
GetTransparencyColor( Void )
Get the current transparency color of the bitmap. This is used when this bitmap is the source bitmap of a transparent bit blit operation.
|
SFCError |
Invalidate(
SFXRectangleConstRef rect
)
Expand the bitmap's dirty rectangle to include the rectangle passed in the rect parameter.
|
Void |
NativeToColor(
NativeColor nativeColor
, SFXRGBColorPtr sfxColor
)
Convert Native value into the RGB value.
|
SFXRGBColor |
NativeToColor(
NativeColor color
)
Convert Native value into the RGB value.
|
RGBVAL |
NativeToRGB(
NativeColor color
)
Convert Native color into RGB color.
|
SFBBitmapRotSmp |
QueryBitmapRotation( Void ) Query a SFBBitmapRot instance (This function is SophiaFramework Extension).
|
NativeColor |
RGBToNative(
RGBVAL color
)
Convert RGB color into Native color.
|
SFCError |
SetPixels(
UInt32 count
, SFXPixelPtr pixels
, NativeColor color
, AEERasterOp rop = AEE_RO_COPY
)
Draws multiple pixels with the same color.
|
SFCError |
SetTransparencyColor(
NativeColor color
)
Set the transparency color of the bitmap.
|
SFCError |
QueryInterface(
AEECLSID clsid
, VoidHandle handle
)
(inherits from SFBQuery)
Ask an object for another API contract from the object in question.
|
SFCError |
QueryInterface(
AEECLSID clsid
, SFBBaseSmpPtr handle
)
(inherits from SFBQuery)
Ask an object for another API contract from the object in question.
|
SFBBaseSmp |
QueryInterface(
AEECLSID clsid
)
(inherits from SFBQuery)
Ask an object for another API contract from the object in question.
|
Void |
Self(
AEECLSID clsidReq
, SFBQuerySmpPtr clone
, AEECLSID clsidImp
)
(inherits from SFBQuery)
Helper macro for those implementing an object with a single interface.
|
SFBQuerySmp |
Self(
AEECLSID clsidReq
, AEECLSID clsidImp
)
(inherits from SFBQuery)
Helper macro for those implementing an object with a single interface.
|
Protected Functions | |
---|---|
static SFBBaseSmp |
FactoryByCreate(
AEECLSID id
, SFCErrorPtr exception = null
)
(inherits from SFBBase)
Create the instance for the specified ClassID's interface.
|
static SFBBaseSmp |
FactoryByQuery(
SFBQuerySmpConstRef query
, AEECLSID id
, SFCErrorPtr exception = null
)
(inherits from SFBBase)
Create the instance for the specified ClassID's interface using the SFBQuery instance.
|
[ public ] SFCError BltIn( SInt32 xDest // specifies the X coordinates of the upper left corner of the destination rectangular area SInt32 yDest // specifies the Y coordinates of the upper left corner of the destination rectangular area SInt32 dx // specifies the width of the destination and source rectangles. Negative values will be treated as zero. SInt32 dy // specifies the height of the destination and source rectangles. Negative values will be treated as zero. SFBBitmapSmpConstRef bmpSrc // specifies the Source bitmap SInt32 xSrc // specifies the X coordinate of the upper left corner of the source bitmap from where the bit-block transfer must begin SInt32 ySrc // specifies the Y coordinate of the upper left corner of the source bitmap from where the bit-block transfer must begin AEERasterOp rop = AEE_RO_COPY // specifies the raster operation that will be used while doing the bit-block transfer );
[ public ] SFCError BltIn( SFXRectangleConstRef rcDest // specifies the destination rectangular area SFBBitmapSmpConstRef bmpSrc // specifies the Source bitmap SFXGridConstRef gridSrc // specifies the coordinate of the upper left corner of the source bitmap from where the bit-block transfer must begin AEERasterOp rop = AEE_RO_COPY // specifies the raster operation that will be used while doing the bit-block transfer );
[ public ] SFCError BltIn( SFXGridConstRef gridDest // specifies the grid of the upper left corner of the destination rectangular area SFXSizeConstRef sizeDest // specifies the size of the upper left corner of the source bitmap from where the bit-block transfer must begin SFBBitmapSmpConstRef bmpSrc // specifies the Source bitmap SFXGridConstRef gridSrc // specifies the size of the upper left corner of the source bitmap from where the bit-block transfer must begin AEERasterOp rop = AEE_RO_COPY // specifies the raster operation that will be used while doing the bit-block transfer );
Draw the bitmap which is read from the resource file to the screen of device.
// resource ID of reading bitmap from resourse file. #define IDB_MY_PICTURE 0x0001 SFBShellSmp shell = SFBShell::GetInstance(); SFBDisplaySmp display = SFBDisplay::NewInstance(); SFBBitmapSmp bmp; SFBBitmapSmp dst; // get bitmap from the resource file bmp = shell->LoadResBitmap(MYRESOURCE_RES_FILE, IDB_MY_PICTURE); if (bmp != null) { // get the destination bitmap to darw. dst = display->GetDestination(); // draw the bitmap which read from the resource file to the destination bitmap dst->BltIn( SFXRectangle(0, 0, 100, 100), // destination rectangle bmp, // source bitmap SFXGrid(0, 0) // source starting grid ); // update screen display->Update(); }
[ public ] SFCError BltOut( SInt32 xDest // specifies the X coordinates of the upper left corner of the destination rectangular area SInt32 yDest // specifies the Y coordinates of the upper left corner of the destination rectangular area SInt32 dx // specifies the width of the destination rectangle SInt32 dy // specifies the height of the destination rectangle SFBBitmapSmpConstRef bmpDest // specifies the destination bitmap SInt32 xSrc // specifies the X coordinate of the upper left corner of the source bitmap from where the bit-block transfer must begin SInt32 ySrc // specifies the Y coordinate of the upper left corner of the source bitmap from where the bit-block transfer must begin AEERasterOp rop = AEE_RO_COPY // specifies the raster operation that will be used while doing the bit-block transfer );
[ public ] SFCError BltOut( SFXRectangleConstRef rcDest // specifies the destination rectangle SFBBitmapSmpConstRef bmpDest // specifies the destination bitmap SFXGridConstRef gridSrc // specifies the grid of the upper left corner of the source bitmap from where the bit-block transfer must begin AEERasterOp rop = AEE_RO_COPY // specifies the raster operation that will be used while doing the bit-block transfer );
[ public ] SFCError BltOut( SFXGridConstRef gridDest // specifies the X coordinates of the upper left corner of the destination rectangular area SFXSizeConstRef sizeDest // specifies the size of the destination rectangular area SFBBitmapSmpConstRef bmpDest // specifies the destination bitmap SFXGridConstRef gridSrc // specifies the grid of the upper left corner of the source bitmap from where the bit-block transfer must begin AEERasterOp rop = AEE_RO_COPY // specifies the raster operation that will be used while doing the bit-block transfer );
[ public ] NativeColor ColorToNative( SFXRGBColorConstRef color // RGB Color );
Return the converted Native value.
Convert RGB value into Native value. The Native value contains the pixels matrix. if a Native color corresponding a certain RGBVAL value is not exist, it returns the nearest Native color This function does not always return the nearest Native color, sometimes it return another Native color for permorance.
BREW API IBITMAP_RGBToNative | SFXRGBColor | SFBBitmap::NativeToRGB
[ public ] SFCError CreateCompatibleBitmap( SFBBitmapSmpPtr cloneBmp // pointer to new SFBBitmap interface of the new bitmap UInt16 width // width of new bitmap UInt16 height // height of new bitmap );
[ public ] SFBBitmapSmp CreateCompatibleBitmap( SFXSizeConstRef size // size of new bitmap );
Creates a new bitmap compatible with this bitmap interface.
SFXGraphicsPtr graphic = SFXGraphics::NewInstance(); SFBBitmapSmp dst; SFBBitmapSmp tmpDst; // get destination bitmap. dst = graphic->GetDestination(); // creates a new bitmap compatible with this bitmap interface. tmpDst = dst->CreateCompatibleBitmap(SFXSize(100, 100));
[ public ] SFCError DrawHScanline( UInt32 y // Y coordinates UInt32 xMin // X coordinates of start point UInt32 xMax // X coordinates of end point NativeColor color // specifies the color to be used to draw the line. This is a native color, which can be obtained with SFBBitmap::ColorToNative() AEERasterOp rop = AEE_RO_COPY // specifies the raster operation that will be used while doing the bit-block transfer );
[ public ] SFCError DrawPixel( UInt32 x // X coordinate of pixel UInt32 y // Y coordinate of pixel NativeColor color // specifies the color to be used to draw the pixel. This is a native color, which can be obtained with SFBBitmap::ColorToNative() AEERasterOp rop = AEE_RO_COPY // specifies the raster operation that will be used while doing the bit-block transfer );
[ public ] SFCError DrawPixel( SFXPixelConstRef pixel // coordinate of pixel NativeColor color // specifies the color to be used to draw the pixel. This is a native color, which can be obtained with SFBBitmap::ColorToNative() AEERasterOp rop = AEE_RO_COPY // specifies the raster operation that will be used while doing the bit-block transfer );
If the pixel is drawn succfully, it returns SFERR_NO_ERROR.
BREW API IBITMAP_DrawPixel | AEERasterOp | SFBBitmap::GetPixel
[ public ] SFCError FillRect( SFXRectangleConstRef rect // rectangle NativeColor color // specifies the color to be used to draw the rectangle. This is a native color, which can be obtained with SFBBitmap::ColorToNative() AEERasterOp rop = AEE_RO_COPY // specifies the raster operation that will be used while doing the bit-block transfer );
If the rectangle is drawn succfully, it returns SFERR_NO_ERROR.
Draw a solid rectangle in red.
SFXGraphicsSmp graphic = SFXGraphics::NewInstance(); SFBBitmapSmp dst; NativeColor nativeColor; // get destination bitmap dst = graphic->GetDestination(); // convert RGB Color into Native Color. nativeColor = dst->RGBToNative(SFXRGBColor(0xFF, 0x00, 0x00)); // draw a rectangle in red to destination bitmap. dst->FillRect(SFXRectangle(0, 0, 100, 100), nativeColor);
[ public ] SFCError GetInfo( AEEBitmapInfo* bmpInfo // pointer to AEEBitmapInfo result SInt32 size = sizeof(AEEBitmapInfo) // the size of AEEBitmapInfo in the current version. AEEBitmapInfo STRUCT may grow over time. This field will allow backward compatibility );
Retrieves the dimension of the bitmap.
// resource ID of reading bitmap from resourse file. #define IDB_MY_PICTURE 0x0001 SFBShellSmp shell = SFBShell::GetInstance(); SFBBitmapSmp bmp; AEEBitmapInfo bmpInfo = {0}; // get bitmap from the resource file bmp = shell->LoadResBitmap(MYRESOURCE_RES_FILE, IDB_MY_PICTURE); // get the size of bitmap bmp->GetInfo(&bmpInfo);
[ public ] SFCError GetPixel( UInt32 x // X coordinate of pixel UInt32 y // Y coordinate of pixel NativeColor* color // color of specified pixel );
[ public ] SFCError GetPixel( SFXPixelConstRef pixel // coordinate of pixel NativeColor* color // pointer to the receiving bound of Native color );
[ public ] NativeColor GetPixel( SFXPixelConstRef pixel // coordinate of pixel );
If the value of pixel is get succfully, it returns SFERR_NO_ERROR.
[ public ] SFCError GetTransparencyColor( NativeColor* color // pointer to the receiving space of Native color );
[ public ] NativeColor GetTransparencyColor(Void);
BREW API IBITMAP_GetTransparencyColor | SFBBitmap::BltIn | SFBBitmap::BltOut | SFBBitmap::SetTransparencyColor
[ public ] SFCError Invalidate( SFXRectangleConstRef rect // rectangle that should be included in the dirty region );
[ public ] Void NativeToColor( NativeColor nativeColor // native color SFXRGBColorPtr sfxColor // pointer to the receiving space of RGB color );
[ public ] SFXRGBColor NativeToColor( NativeColor color // native color );
If color is get succfully, it returns SFERR_NO_ERROR.
BREW API IBITMAP_NativeToRGB | NativeColor | RGBVAL | SFBBitmap::RGBToNative
[ public ] RGBVAL NativeToRGB( NativeColor color // value of Native color );
Convert Native color into RGB color.
SFXGraphicsSmp graphic = SFXGraphics::NewInstance(); SFBBitmapSmp dst; NativeColor nativeColor; SFXRGBColor rgbColor; // get destination bitmap. dst = graphic->GetDestination(); // get the value of pixel. nativeColor = dst->GetPixel(SFXGrid(0, 0)); // convert Native color into RGB color. rgbColor = dst->NativeToRGB(nativeColor);
BREW API IBITMAP_NativeToRGB | SFBBitmap::NativeToColor | NativeColor | RGBVAL | SFBBitmap::RGBToNative
[ public ] SFBBitmapRotSmp QueryBitmapRotation(Void);
Introduced BREW Client 3.1.5 or 4.0.3
[ public ] NativeColor RGBToNative( RGBVAL color // source RGB value. // true RGB value is supported. // the index of ColorTable is not supported );
Convert RGB color into Native color, and draw a red-filled rectangle.
SFXGraphicsSmp graphic = SFXGraphics::NewInstance(); SFBBitmapSmp dst; NativeColor nativeColor; // get destination bitmap. dst = graphic->GetDestination(); // convert RGB color into Native color. nativeColor = dst->RGBToNative(SFXRGBColor(0xFF, 0x00, 0x00)); // draw a red-filled rectangle to destination bitmap. dst->FillRect(SFXRectangle(0, 0, 100, 100), nativeColor);
BREW API IBITMAP_RGBToNative | RGBVAL | SFBBitmap::ColorToNative | SFBBitmap::NativeToRGB | SFBBitmap::NativeToColor
[ public ] SFCError SetPixels( UInt32 count // number of pixels SFXPixelPtr pixels // header pointer to the array of 2D points NativeColor color // specifies the color to be used to draw the pixel. This is a native color, which can be obtained with SFBBitmap::ColorToNative() AEERasterOp rop = AEE_RO_COPY // specifies the raster operation that will be used to draw the pixel );
If the pixels are drawn succfully, it returns SFERR_NO_ERROR.
BREW API IBITMAP_SetPixels | AEERasterOp | SFBBitmap::GetPixel
[ public ] SFCError SetTransparencyColor( NativeColor color // color to make transparent );
Copyright(c) 2002 - 2024 Sophia Cradle Incorporated All Rights Reserved. |