Fuze Arena Logo
  • Forum
  • Creations
    Catalogue Showcase
  • Help

createStar()

Purpose

Creates a star to be drawn with drawShape()

Description

Creates a star with centre origin to be drawn at the specified x and y location with the specified dimensions and number of points

Syntax

shape = createStar( x, y, innerRadius, outerRadius, numPoints )

Arguments

shape Handle which stores the newly created shape

x Horizontal screen position in pixels

y Vertical screen position in pixels

width Radius of the inside section of the star

height Radius of the outside section of the star

Example

// draw a multicoloured 7-pointed star on the screen
shape_1 = createStar( gwidth() / 2, gheight() / 2, 100, 300, 7  )

points = [
    red,
    orange,
    yellow,
    green,
    blue,
    indigo,
    violet
]

for i = 0 to len( points ) loop
    setVertexColour( shape_1, i, points[i] )
repeat

for i = len( points ) to 0 step -1 loop
    setVertexColour( shape_1, i + 7, points[i - 1] )
repeat

drawShape( shape_1 )
update()
sleep( 3 )

Associated Commands

copyShape(), createBox(), createCircle(), createCurve(), createLine(), createLineStrip(), createPoly(), createTriangle(), deleteShape(), drawShape(), getShapeBounds(), getShapeLocation(), getShapeRotation(), getShapeScale(), getShapeTint(), getVertex(), getVertexColour(), getVertexLineColour(), getVertexLineThickness(), joinShapes(), moveShape(), numVerts(), rotateShape(), scaleShape(), setShapeColour(), setShapeLineStyle(), setShapeRotation(), setShapeScale(), setShapeScaleModeLocal(), setShapeTint(), setVertex(), setVertexColour(), setVertexLineStyle()

logo

©2019 FUZE Technologies Ltd. FUZE is a registered trademark of FUZE Technologies Ltd. All rights reserved.

Useful links

  • Fuze Main Site
  • Fuze Arena on Twitter
  • Fuze Arena on Youtube
  • Download Buyer

Contact Information

  • FUZE Technologies Ltd
    15 Clearfields Farm
    Wotton Underwood
    Aylesbury, Buckinghamshire
    ​England, HP18 0RS

  • +44 (0) 1844 239 432

  • contact@fuze.co.uk

© Copyright FUZE Technologies Ltd. All rights reserved.