Fork me on GitHub
View source

package com.haxepunk.graphics

class PreRotation


extends Image

Creates a pre-rotated Image strip to increase runtime performance for rotating graphics.

Constructor

View source

new (source : String, frameCount : Int = 36, smooth : Bool = false) : Void

Constructor.


Parameters:
source   

The source image to be rotated.

frameCount   

How many frames to use. More frames result in smoother rotations.

smooth   

Make the rotated graphic appear less pixelly.

Variables

frameAngle : Float

Current angle to fetch the pre-rotated frame from.