Documentation for graphex.ew v0.10.0
Table of Contents

Sprite

  • var COMPASS_*    Compass point directions for (currently faulty) gfxSpriteOverlap
  • func gfxPointInSprite(point_x, point_y, sprite)    Call to determine whether point_x, point_y is within a sprite (which is a shape data with location coordinates in the form of {x, y, {shape_data}}. Not to be confused with gfxPointInRect which determines if a point is in a rectangular area.
  • func gfxShapeExtent(sequence shape)   Finds the actual bounding rectangle coordinates of a sprite
  • func gfxSpriteOverlap(sprite1, sprite2)   Find out how, if at all, sprite1 overlaps sprite2.

    Documentation for graphex.ew v0.10.0
    Table of Contents

    [var]
    COMPASS_*

    Compass point directions for (currently faulty) gfxSpriteOverlap

    Category: Sprite

    Returned from gfxSpriteOverlap is one of these constants indicating the approximate direction a sprite overlaps another sprite from.
    nIn clockwise order of appearance:
    nCOMPASS_NORTH
    COMPASS_NOREAST
    COMPASS_EAST
    COMPASS_SOUEAST
    COMPASS_SOUTH
    COMPASS_SOUWEST
    COMPASS_NORWEST
    COMPASS_WEST
    COMPASS_INSIDE -- The sprite is completely inside the bounds of the other sprite

    See Also: gfxPointInSprite, gfxShapeExtent, gfxSpriteOverlap


    Documentation for graphex.ew v0.10.0
    Table of Contents

    [func]
    gfxPointInSprite
    (point_x, point_y, sprite)

    Call to determine whether point_x, point_y is within a sprite (which is a shape data with location coordinates in the form of {x, y, {shape_data}}. Not to be confused with gfxPointInRect which determines if a point is in a rectangular area.

    Returns: True or False

    Category: Sprite


    Currently gfxPointInSprite only determines if the point is inside the rectangular outline of the whole Sprite, not whether it falls within the outline of the sprite's irregular shape.

    See Also: COMPASS_*, gfxShapeExtent, gfxSpriteOverlap


    Documentation for graphex.ew v0.10.0
    Table of Contents

    [func]
    gfxShapeExtent
    (sequence shape)

    Finds the actual bounding rectangle coordinates of a sprite

    Returns: the bounding rectangle coordinates of the sprite

    Category: Sprite

    See Also: COMPASS_*, gfxPointInSprite, gfxSpriteOverlap


    Documentation for graphex.ew v0.10.0
    Table of Contents

    [func]
    gfxSpriteOverlap
    (sprite1, sprite2)

    Find out how, if at all, sprite1 overlaps sprite2.

    Returns: One of the COMPASS_* constants or 0 for no overlap. Which only just seems to work.

    Category: Sprite

    Like gfxPointInSprite only works with rectangles of shape outlines.
    Also a bit dodgy. It is meant to return one of the COMPASS_* constants to give you an idea of how, approximately, the sprites overlap (relative to sprite1). This does not seem to work though.

    See Also: COMPASS_*, gfxPointInSprite, gfxShapeExtent