Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Supported Methods

Description of Methods

Integer GetX()

Returns the x coordinate of the region.

Integer GetY()

Returns the y coordinate of the region.

Integer GetWidth()

Returns the width of the region.

Integer GetHeight()

Returns the height of the region.

Integer GetTime()

Returns the time or "frame hold time" in milliseconds.

Boolean GetWrap()

Returns true if the region will wrap to the other side of the screen when scrolled.

Object GetBitmap()

Returns the roBitmap object of the bitmap this region refers to. A region is always a section of a bitmap.

Integer GetPretranslationX()

  • Returns the pretranslation x value.

Integer GetPretranslationY()

Returns the pretranslation y value.

Integer GetScaleMode()

Returns the scaling mode.

Void Set(Object srcRegion)

Takes an roRegion object as input

Initializes the fields of this region to the values of the fields in the srcRegion.

Void SetTime(Integer time)

Set the time or "frame hold time" in milliseconds.

Void SetPretranslation(Integer x, Integer y)

Set the pretranslation for drawobject,drawrotatedobject, drawscaledobject

Void SetScaleMode(Integer mode)

Set the scalemode used for DrawScaledObject

  • 0 = fast scaling operation (may have jaggies)
  • 1 = smooth scaling operation (may be slow)

Void SetWrap(Boolean wrap)

If wrap is specified as true, a region that is partial displayed (for example, the right half falls "off" the roCompositor drawto surface), then the region "wraps" to the other side of the roCompositor surface.

Void OffSet(Integer x, Integer y, Integer w, Integer w, Integer h)

Adds the passed parameters x,y, w, and h to the values of those roRegion fields

Respects the wrap setting when adjusting the fields by the offsets.

Object Copy()

Returns a newly created copy of the region as a new roRegion object.

Integer GetCollisionType()

Returns the value of collision type variable.

The default value is 0.

Void SetCollisionType(Integer collisiontype)

Sets the type of region to be used for collision tests with this sprite.

  • Type 0– Use the entire defined region of the sprite. Type 0 is the default.
  • Type 1 – Use the defined rectangular region specified by the SetCollisionRectangle() method.
  • Type 2 – Use a circular region specified by the SetCollisionCircle() method.

Void SetCollisionRectangle(Integer xOffset, yOffset, XWidth, XHeight)

Sets the collision rectangle used for type 1 collision tests. The offset is added to the (x,y) position of the sprite and the resulting rectangle is used for collision tests.

Void SetCollisionCircle(Integer xOffset, yOffset, Radius)

Sets the collision circle used for type 2 collision tests. The offset is added to the (x,y) position of the sprite and a circle is created around that point for collision tests.

  • No labels