r3uimage

r3uimage

Class

real/code/r3uimage.h

Library

r3code

Description:

UserImage Class

See Also

real/code/r3ttag.h

Super Class

r3Ttag

R3CLID_TTAG

JavaScript

r3Userimage

Class Identifier

R3CLID_USERIMAGE - 538

Methods

LOADIMAGE, UNLOADIMAGE, ENUMCHANNELS, ENUMCB, RELOADIMAGE, AUTOINDEXRANGE,

Attributes

ImageFile, Image, Frame, AlsoChangesObj, AlsoChangesMethod, TextureAnimation, Type, BaseName, BaseIndex, TileAnimation, FlipAnimation, ReverseAnimation, NumFrames, Format, FormatType, FormatDigits, FormatName, PixelAspect,

Registration

int R3RegisterUserImageClass(R3APP *app);

R3UIMGM_LOADIMAGE

Method

LOADIMAGE

Identifier

R3UIMGM_LOADIMAGE

Return

R3OBJ*, address of R3CLID_RAWIMAGE datatype object

JavaScript

rc = obj.LOADIMAGE();

Description

reads the image data into ram memory. The returned image remains valid only while the image library is locked.

R3UIMGM_UNLOADIMAGE

Method

UNLOADIMAGE

Identifier

R3UIMGM_UNLOADIMAGE

JavaScript

obj.UNLOADIMAGE();

Description

Ends use of the loaded RAM image. Image will be freed in the next image cache flush unless it is used by other systems.

R3UIMGM_ENUMCHANNELS

Method

ENUMCHANNELS

Identifier

R3UIMGM_ENUMCHANNELS

JavaScript

obj.ENUMCHANNELS();

Description

Enumerates associated channel names as successive calls: * R3DoA3(cbobj, cbmth, void *callback_context, char *name)

R3UIMGM_ENUMCB

Method

ENUMCB

Identifier

R3UIMGM_ENUMCB

JavaScript

obj.ENUMCB();

Description

R3UIMGM_RELOADIMAGE

Method

RELOADIMAGE

Identifier

R3UIMGM_RELOADIMAGE

Return

R3OBJ*, new image or NULL if loading failed

Param 1:

R3BOOL, disable R3MM_CHANGED

JavaScript

rc = obj.RELOADIMAGE(p1, 0);

Description

Ask system to reload the image.

R3UIMGM_AUTOINDEXRANGE

Method

AUTOINDEXRANGE

Identifier

R3UIMGM_AUTOINDEXRANGE

JavaScript

obj.AUTOINDEXRANGE();

Description

Find image animation index range automatically

ImageFile

Attribute

ImageFile

Identifier

R3UIMGA_ImageFile

JavaScript type

String

C type

char[]

Description

name of the image file. Note: RM_GET copies to the given buffer of R3PATH_LENGTH chars. It does not return the address of the name string.

Syntax


jsobj.SetImageFile(value);
value = jsobj.GetImageFile();


char[] value = ...;
R3SetAttrs(r3obj, R3UIMGA_ImageFile, value, R3TAG_END);
char[] value;
R3GetAttrs(r3obj, R3UIMGA_ImageFile, &value, R3TAG_END);

Image

Attribute

Image

Identifier

R3UIMGA_Image

JavaScript type

Object

C type

R3OBJ*

Description

image object

Syntax


value = jsobj.GetImage();


R3OBJ* value;
R3GetAttrs(r3obj, R3UIMGA_Image, &value, R3TAG_END);

Frame

Attribute

Frame

Identifier

R3UIMGA_Frame

JavaScript type

Integer

C type

R3INT

Description

frame index

Syntax


jsobj.SetFrame(value);
value = jsobj.GetFrame();


R3INT value = ...;
R3SetAttrs(r3obj, R3UIMGA_Frame, value, R3TAG_END);
R3INT value;
R3GetAttrs(r3obj, R3UIMGA_Frame, &value, R3TAG_END);

AlsoChangesObj

Attribute

AlsoChangesObj

Identifier

R3UIMGA_AlsoChangesObj

JavaScript type

Object

C type

R3OBJ*

Description

callback, private

Syntax


jsobj.SetAlsoChangesObj(value);
value = jsobj.GetAlsoChangesObj();


R3OBJ* value = ...;
R3SetAttrs(r3obj, R3UIMGA_AlsoChangesObj, value, R3TAG_END);
R3OBJ* value;
R3GetAttrs(r3obj, R3UIMGA_AlsoChangesObj, &value, R3TAG_END);

AlsoChangesMethod

Attribute

AlsoChangesMethod

Identifier

R3UIMGA_AlsoChangesMethod

JavaScript type

Integer

C type

R3INT

Description

callback method, private

Syntax


jsobj.SetAlsoChangesMethod(value);
value = jsobj.GetAlsoChangesMethod();


R3INT value = ...;
R3SetAttrs(r3obj, R3UIMGA_AlsoChangesMethod, value, R3TAG_END);
R3INT value;
R3GetAttrs(r3obj, R3UIMGA_AlsoChangesMethod, &value, R3TAG_END);

TextureAnimation

Attribute

TextureAnimation

Identifier

R3UIMGA_TextureAnimation

JavaScript type

Integer

C type

R3INT

Description

see texture animation methods below

Syntax


jsobj.SetTextureAnimation(value);
value = jsobj.GetTextureAnimation();


R3INT value = ...;
R3SetAttrs(r3obj, R3UIMGA_TextureAnimation, value, R3TAG_END);
R3INT value;
R3GetAttrs(r3obj, R3UIMGA_TextureAnimation, &value, R3TAG_END);

Type

Attribute

Type

Identifier

R3UIMGA_Type

JavaScript type

Integer

C type

R3INT

Description

read only, see animation file types below

Syntax


value = jsobj.GetType();


R3INT value;
R3GetAttrs(r3obj, R3UIMGA_Type, &value, R3TAG_END);

BaseName

Attribute

BaseName

Identifier

R3UIMGA_BaseName

JavaScript type

String

C type

char[]

Description

unformatted file name. Note: RM_GET copies to given buffer

Syntax


jsobj.SetBaseName(value);
value = jsobj.GetBaseName();


char[] value = ...;
R3SetAttrs(r3obj, R3UIMGA_BaseName, value, R3TAG_END);
char[] value;
R3GetAttrs(r3obj, R3UIMGA_BaseName, &value, R3TAG_END);

BaseIndex

Attribute

BaseIndex

Identifier

R3UIMGA_BaseIndex

JavaScript type

Integer

C type

R3INT

Description

base index for texture animation

Syntax


jsobj.SetBaseIndex(value);
value = jsobj.GetBaseIndex();


R3INT value = ...;
R3SetAttrs(r3obj, R3UIMGA_BaseIndex, value, R3TAG_END);
R3INT value;
R3GetAttrs(r3obj, R3UIMGA_BaseIndex, &value, R3TAG_END);

TileAnimation

Attribute

TileAnimation

Identifier

R3UIMGA_TileAnimation

JavaScript type

Boolean

C type

R3BOOL

Description

tile animation to be used as a texture map

Syntax


jsobj.SetTileAnimation(value);
value = jsobj.GetTileAnimation();


R3BOOL value = ...;
R3SetAttrs(r3obj, R3UIMGA_TileAnimation, value, R3TAG_END);
R3BOOL value;
R3GetAttrs(r3obj, R3UIMGA_TileAnimation, &value, R3TAG_END);

FlipAnimation

Attribute

FlipAnimation

Identifier

R3UIMGA_FlipAnimation

JavaScript type

Boolean

C type

R3BOOL

Description

if tiling, flip every odd sequence

Syntax


jsobj.SetFlipAnimation(value);
value = jsobj.GetFlipAnimation();


R3BOOL value = ...;
R3SetAttrs(r3obj, R3UIMGA_FlipAnimation, value, R3TAG_END);
R3BOOL value;
R3GetAttrs(r3obj, R3UIMGA_FlipAnimation, &value, R3TAG_END);

ReverseAnimation

Attribute

ReverseAnimation

Identifier

R3UIMGA_ReverseAnimation

JavaScript type

Boolean

C type

R3BOOL

Description

play texture animation in reversed order

Syntax


jsobj.SetReverseAnimation(value);
value = jsobj.GetReverseAnimation();


R3BOOL value = ...;
R3SetAttrs(r3obj, R3UIMGA_ReverseAnimation, value, R3TAG_END);
R3BOOL value;
R3GetAttrs(r3obj, R3UIMGA_ReverseAnimation, &value, R3TAG_END);

NumFrames

Attribute

NumFrames

Identifier

R3UIMGA_NumFrames

JavaScript type

Integer

C type

R3INT

Description

number of frames in the texture animation

Syntax


jsobj.SetNumFrames(value);
value = jsobj.GetNumFrames();


R3INT value = ...;
R3SetAttrs(r3obj, R3UIMGA_NumFrames, value, R3TAG_END);
R3INT value;
R3GetAttrs(r3obj, R3UIMGA_NumFrames, &value, R3TAG_END);

Format

Attribute

Format

Identifier

R3UIMGA_Format

JavaScript type

String

C type

char[]

Description

indexing format string. Note: RM_GET copies to buffer of LEN_STRBUF chars

Syntax


jsobj.SetFormat(value);
value = jsobj.GetFormat();


char[] value = ...;
R3SetAttrs(r3obj, R3UIMGA_Format, value, R3TAG_END);
char[] value;
R3GetAttrs(r3obj, R3UIMGA_Format, &value, R3TAG_END);

FormatType

Attribute

FormatType

Identifier

R3UIMGA_FormatType

JavaScript type

Integer

C type

R3INT

Description

see format types below

Syntax


jsobj.SetFormatType(value);
value = jsobj.GetFormatType();


R3INT value = ...;
R3SetAttrs(r3obj, R3UIMGA_FormatType, value, R3TAG_END);
R3INT value;
R3GetAttrs(r3obj, R3UIMGA_FormatType, &value, R3TAG_END);

FormatDigits

Attribute

FormatDigits

Identifier

R3UIMGA_FormatDigits

JavaScript type

Integer

C type

R3INT

Description

number of digits

Syntax


jsobj.SetFormatDigits(value);
value = jsobj.GetFormatDigits();


R3INT value = ...;
R3SetAttrs(r3obj, R3UIMGA_FormatDigits, value, R3TAG_END);
R3INT value;
R3GetAttrs(r3obj, R3UIMGA_FormatDigits, &value, R3TAG_END);

FormatName

Attribute

FormatName

Identifier

R3UIMGA_FormatName

JavaScript type

String

C type

char*

Description

read only. ImageFile = sprintf(buf, FormatName, frameindex)

Syntax


value = jsobj.GetFormatName();


char* value;
R3GetAttrs(r3obj, R3UIMGA_FormatName, &value, R3TAG_END);

PixelAspect

Attribute

PixelAspect

Identifier

R3UIMGA_PixelAspect

JavaScript type

Number

C type

R3FLOAT

Description

aspect ration defined as h/w

Syntax


jsobj.SetPixelAspect(value);
value = jsobj.GetPixelAspect();


R3FLOAT value = ...;
R3SetAttrs(r3obj, R3UIMGA_PixelAspect, value, R3TAG_END);
R3FLOAT value;
R3GetAttrs(r3obj, R3UIMGA_PixelAspect, &value, R3TAG_END);

animation types

R3UIMGTYPE_UNKNOWN
R3UIMGTYPE_ANIMATIONFILE
R3UIMGTYPE_SEPARATEIMAGES

R3UIMGANIM_NONE
R3UIMGANIM_AUTOMATIC
R3UIMGANIM_KEYFRAME

Format types

R3UIMGFORMAT_AUTO
R3UIMGFORMAT_CUSTOM


r3appobj *

Tags

Tags

R3UIMGA_ImageContents