OpenSpace3D libs
OpenSpace 3D libraries for plugITs and OS3D developer
Functions

Functions

 G2DcreateAlphaBitmap (alphabmp, x, y, left, right, ww, hh, w, h)
 Create a resized alpha bitmap.
 
 G2DcreateAlphaBitmapRollover (alphabmp, x, y, left, right, ww, hh, w, h)
 Create a resized alpha bitmap rollover (5 states)
 
 G2DloadPngToBmpFile (chan, file)
 Load an alpha bitmap file (png) to a bitmap.
 
 G2DloadPngToBmp (chan, path)
 Load an alpha bitmap file (png) to a bitmap.
 
 G2DloadBmpFile (chan, file)
 Load an bitmap (bmp, jpg, tga) or alphabitmap (png) file to a bitmap.
 
 G2DloadBmp (chan, path)
 Load an bitmap (bmp, jpg, tga) or alphabitmap (png) file to a bitmap.
 
 G2DloadAlphaBmpFile (chan, file)
 Load an bitmap (bmp, jpg, tga) or alphabitmap (png) file to a AlphaBitmap.
 
 G2DloadAlphaBmp (chan, path)
 Load an bitmap (bmp, jpg, tga) or alphabitmap (png) file to a AlphaBitmap.
 
 G2DconvertBmpToAlphaBmp (chan, bmp)
 Convert a bitmap to a AlphaBitmap.
 
 G2DstrechBitmap (chan, bmp, width, height, bcolor)
 Strech a bitmap to a new size and keep ratio.
 
 G2DstrechBitmapToMaxSize (chan, bmp, width, height)
 Strech a bitmap to a new size and keep ratio without borders.
 
 G2DstrechAlphaBitmap (chan, bmp, width, height, keepratio, bcolor)
 Strech an alpha bitmap to a new size and keep ratio.
 
 G2DstrechAlphaBitmapExt (chan, abmp, width, height, keepratio, bcolor, mode)
 Strech an alpha bitmap to a new size and keep ratio.
 
 G2DstrechAlphaBitmapToBackground (chan, abmp, width, height)
 Strech an alpha by it's center to create a new background image.
 
 G2DstrechAlphaBitmapToBackgroundBitmap (abmp, dabmp)
 Strech an alpha by it's center to the destination background image.
 
 G2DstrechAlphaBitmapRectToBackgroundBitmap (abmp, rect, dabmp, mode)
 Strech an alpha to the destination background image with flags.
 
 G2DstrechAlphaBitmapRectToBlendBitmap (abmp, rect, dabmp, mode, blending)
 Strech an alpha to the destination background image with flags and blending.
 
 G2DcopyAlphaBitmap (chan, bmp, px, py, pw, ph)
 Copy an alpha bitmap rectangle to a new alpha bitmap.
 
 G2DfilterBitmap (bmp, filter)
 Apply a filter on a bitmap bitmap.
 
 G2DcreateLayer (chan, w, h, border, bcolor, color, opacity)
 Create an AlphaBitmap with border, backcolor and opacity.
 
 G2DsetLayer (chan, alphabmp, w, h, border, bcolor, color, opacity)
 Modify an AlphaBitmap with border, backcolor and opacity.
 

Detailed Description

Bitmap manipulation

Function Documentation

◆ G2DcreateAlphaBitmap()

G2DcreateAlphaBitmap ( alphabmp  ,
,
,
left  ,
right  ,
ww  ,
hh  ,
,
 
)

Create a resized alpha bitmap.

Prototype: fun [AlphaBitmap I I I I I I I I] AlphaBitmap

Parameters
AlphaBitmap: source alpha bitmap
I: x decal
I: y decal
I: left marge
I: right marge
I: fixed width
I: fixed height
I: final width
I: final height
Returns
AlphaBitmap : the resized alpha bitmap

◆ G2DcreateAlphaBitmapRollover()

G2DcreateAlphaBitmapRollover ( alphabmp  ,
,
,
left  ,
right  ,
ww  ,
hh  ,
,
 
)

Create a resized alpha bitmap rollover (5 states)

Prototype: fun [AlphaBitmap I I I I I I I I] AlphaBitmap

Parameters
AlphaBitmap: source alpha bitmap
I: x decal
I: y decal
I: left marge
I: right marge
I: fixed width
I: fixed height
I: final width
I: final height
Returns
AlphaBitmap : the resized alpha bitmap rollover (5 states)

◆ G2DloadPngToBmpFile()

G2DloadPngToBmpFile ( chan  ,
file   
)

Load an alpha bitmap file (png) to a bitmap.

Prototype: fun [Chn P] ObjBitmap

Parameters
Chn: channel
P: file
Returns
ObjBitmap : the loaded bitmap

◆ G2DloadPngToBmp()

G2DloadPngToBmp ( chan  ,
path   
)

Load an alpha bitmap file (png) to a bitmap.

Prototype: fun [Chn S] ObjBitmap

Parameters
Chn: channel
S: file path in scol partition
Returns
ObjBitmap : the loaded bitmap

◆ G2DloadBmpFile()

G2DloadBmpFile ( chan  ,
file   
)

Load an bitmap (bmp, jpg, tga) or alphabitmap (png) file to a bitmap.

Prototype: fun [Chn P] ObjBitmap

Parameters
Chn: channel
S: file path
Returns
ObjBitmap : the loaded bitmap

◆ G2DloadBmp()

G2DloadBmp ( chan  ,
path   
)

Load an bitmap (bmp, jpg, tga) or alphabitmap (png) file to a bitmap.

Prototype: fun [Chn S] ObjBitmap

Parameters
Chn: channel
S: file path in scol partition
Returns
ObjBitmap : the loaded bitmap

◆ G2DloadAlphaBmpFile()

G2DloadAlphaBmpFile ( chan  ,
file   
)

Load an bitmap (bmp, jpg, tga) or alphabitmap (png) file to a AlphaBitmap.

Prototype: fun [Chn P] AlphaBitmap

Parameters
Chn: channel
P: file path
Returns
AlphaBitmap : the loaded AlphaBitmap

◆ G2DloadAlphaBmp()

G2DloadAlphaBmp ( chan  ,
path   
)

Load an bitmap (bmp, jpg, tga) or alphabitmap (png) file to a AlphaBitmap.

Prototype: fun [Chn S] AlphaBitmap

Parameters
Chn: channel
S: file path in scol partition
Returns
AlphaBitmap : the loaded AlphaBitmap

◆ G2DconvertBmpToAlphaBmp()

G2DconvertBmpToAlphaBmp ( chan  ,
bmp   
)

Convert a bitmap to a AlphaBitmap.

Prototype: fun [Chn ObjBitmap] AlphaBitmap

Parameters
Chn: channel
ObjBitmap: bitmap to convert
Returns
AlphaBitmap : the AlphaBitmap

◆ G2DstrechBitmap()

G2DstrechBitmap ( chan  ,
bmp  ,
width  ,
height  ,
bcolor   
)

Strech a bitmap to a new size and keep ratio.

Prototype: fun [Chn ObjBitmap I I I] ObjBitmap

Parameters
Chn: channel
ObjBitmap: source bitmap
I: destination width
I: destination height
I: background color
Returns
ObjBitmap : the bitmap in new size

◆ G2DstrechBitmapToMaxSize()

G2DstrechBitmapToMaxSize ( chan  ,
bmp  ,
width  ,
height   
)

Strech a bitmap to a new size and keep ratio without borders.

Prototype: fun [Chn ObjBitmap I I] ObjBitmap

Parameters
Chn: channel
ObjBitmap: source bitmap
I: destination max width
I: destination max height
Returns
ObjBitmap : the bitmap in new size

◆ G2DstrechAlphaBitmap()

G2DstrechAlphaBitmap ( chan  ,
bmp  ,
width  ,
height  ,
keepratio  ,
bcolor   
)

Strech an alpha bitmap to a new size and keep ratio.

Prototype: fun [Chn ObjAlphaBitmap I I I I] ObjAlphaBitmap

Parameters
Chn: channel
ObjAlphaBitmap: source alpha bitmap
I: destination width
I: destination height
I: keep ratio (1 to enable, 0 otherwise)
I: background color
Returns
ObjAlphaBitmap : the alpha bitmap in new size

◆ G2DstrechAlphaBitmapExt()

G2DstrechAlphaBitmapExt ( chan  ,
abmp  ,
width  ,
height  ,
keepratio  ,
bcolor  ,
mode   
)

Strech an alpha bitmap to a new size and keep ratio.

Prototype: fun [Chn ObjAlphaBitmap I I I I] ObjAlphaBitmap

Parameters
Chn: channel
ObjAlphaBitmap: source alpha bitmap
I: destination width
I: destination height
I: keep ratio (1 to enable, 0 otherwise)
I: background color
I: strech mode, 0 strech, 1 split, 2 fit, 3 inside
Returns
ObjAlphaBitmap : the alpha bitmap in new size

◆ G2DstrechAlphaBitmapToBackground()

G2DstrechAlphaBitmapToBackground ( chan  ,
abmp  ,
width  ,
height   
)

Strech an alpha by it's center to create a new background image.

Prototype: fun [Chn ObjAlphaBitmap I I] ObjAlphaBitmap

Parameters
Chn: channel
ObjAlphaBitmap: source alpha bitmap
I: destination width
I: destination height
Returns
ObjAlphaBitmap : a new alpha bitmap in new size

◆ G2DstrechAlphaBitmapToBackgroundBitmap()

G2DstrechAlphaBitmapToBackgroundBitmap ( abmp  ,
dabmp   
)

Strech an alpha by it's center to the destination background image.

Prototype: fun [ObjAlphaBitmap ObjAlphaBitmap] ObjAlphaBitmap

Parameters
ObjAlphaBitmap: source alpha bitmap
ObjAlphaBitmap: dest alpha bitmap
Returns
ObjAlphaBitmap : the destination alpha bitmap

◆ G2DstrechAlphaBitmapRectToBackgroundBitmap()

G2DstrechAlphaBitmapRectToBackgroundBitmap ( abmp  ,
rect  ,
dabmp  ,
mode   
)

Strech an alpha to the destination background image with flags.

Prototype: fun [ObjAlphaBitmap [I I I I] ObjAlphaBitmap I] ObjAlphaBitmap

Parameters
ObjAlphaBitmap: source alpha bitmap
[II I I] : source rect
ObjAlphaBitmap: dest alpha bitmap
I: 0 strech all, 1 strech borders / split, 2 fill
Returns
ObjAlphaBitmap : the destination alpha bitmap

◆ G2DstrechAlphaBitmapRectToBlendBitmap()

G2DstrechAlphaBitmapRectToBlendBitmap ( abmp  ,
rect  ,
dabmp  ,
mode  ,
blending   
)

Strech an alpha to the destination background image with flags and blending.

Prototype: fun [ObjAlphaBitmap [I I I I] ObjAlphaBitmap I F] ObjAlphaBitmap

Parameters
ObjAlphaBitmap: source alpha bitmap
[II I I] : source rect
ObjAlphaBitmap: dest alpha bitmap
I: 0 strech all, 1 strech borders / split, 2 fill
F: blending coef
Returns
ObjAlphaBitmap : the destination alpha bitmap

◆ G2DcopyAlphaBitmap()

G2DcopyAlphaBitmap ( chan  ,
bmp  ,
px  ,
py  ,
pw  ,
ph   
)

Copy an alpha bitmap rectangle to a new alpha bitmap.

Prototype: fun [Chn ObjAlphaBitmap I I I I] ObjAlphaBitmap

Parameters
Chn: channel
ObjAlphaBitmap: source alpha bitmap
I: rectangle pos x
I: rectangle pos y
I: rectangle width
I: rectangle height
Returns
ObjAlphaBitmap : the new alpha bitmap

◆ G2DfilterBitmap()

G2DfilterBitmap ( bmp  ,
filter   
)

Apply a filter on a bitmap bitmap.

Prototype: fun [ObjBitmap I] ObjBitmap

Parameters
Chn: channel
ObjBitmap: source bitmap
I: filter type, selected bellow
iFILTER_SHARPEN, iFILTER_UNSHAR_MASK, iFILTER_EMBOSS, iFILTER_BOX_BLUR, iFILTER_GAUSSIAN_BLUR, iFILTER_EDGE0, iFILTER_EDGE1, iFILTER_EDGE2
Returns
ObjAlphaBitmap : the same bitmap

◆ G2DcreateLayer()

G2DcreateLayer ( chan  ,
,
,
border  ,
bcolor  ,
color  ,
opacity   
)

Create an AlphaBitmap with border, backcolor and opacity.

Prototype: fun [Chn I I I I I I] AlphaBitmap

Parameters
Chn: channel
I: width
I: height
I: size
I: border color
I: background color
I: opacity 0 to 100
Returns
AlphaBitmap : AlphaBitmap for using as layer

◆ G2DsetLayer()

G2DsetLayer ( chan  ,
alphabmp  ,
,
,
border  ,
bcolor  ,
color  ,
opacity   
)

Modify an AlphaBitmap with border, backcolor and opacity.

Prototype: fun [Chn AlphaBitmap I I I I I I] AlphaBitmap

Parameters
Chn: channel
AlphaBitmap: alpha bitmap to modify
I: width
I: height
I: size
I: border color
I: background color
I: opacity 0 to 100
Returns
AlphaBitmap : AlphaBitmap for using as layer