Graphics.hx 2.8 KB

1234567891011121314151617181920212223242526272829
  1. package flash.display;
  2. extern final class Graphics {
  3. function new() : Void;
  4. function beginBitmapFill(bitmap : BitmapData, ?matrix : flash.geom.Matrix, repeat : Bool = true, smooth : Bool = false) : Void;
  5. function beginFill(color : UInt, alpha : Float = 1) : Void;
  6. function beginGradientFill(type : GradientType, colors : Array<UInt>, alphas : Array<Dynamic>, ratios : Array<Dynamic>, ?matrix : flash.geom.Matrix, ?spreadMethod : SpreadMethod, ?interpolationMethod : InterpolationMethod, focalPointRatio : Float = 0) : Void;
  7. @:require(flash10) function beginShaderFill(shader : Shader, ?matrix : flash.geom.Matrix) : Void;
  8. function clear() : Void;
  9. @:require(flash10) function copyFrom(sourceGraphics : Graphics) : Void;
  10. @:require(flash11) function cubicCurveTo(controlX1 : Float, controlY1 : Float, controlX2 : Float, controlY2 : Float, anchorX : Float, anchorY : Float) : Void;
  11. function curveTo(controlX : Float, controlY : Float, anchorX : Float, anchorY : Float) : Void;
  12. function drawCircle(x : Float, y : Float, radius : Float) : Void;
  13. function drawEllipse(x : Float, y : Float, width : Float, height : Float) : Void;
  14. @:require(flash10) function drawGraphicsData(graphicsData : flash.Vector<IGraphicsData>) : Void;
  15. @:require(flash10) function drawPath(commands : flash.Vector<Int>, data : flash.Vector<Float>, ?winding : GraphicsPathWinding) : Void;
  16. function drawRect(x : Float, y : Float, width : Float, height : Float) : Void;
  17. function drawRoundRect(x : Float, y : Float, width : Float, height : Float, ellipseWidth : Float, ellipseHeight : Null<Float> = 0) : Void;
  18. function drawRoundRectComplex(x : Float, y : Float, width : Float, height : Float, topLeftRadius : Float, topRightRadius : Float, bottomLeftRadius : Float, bottomRightRadius : Float) : Void;
  19. @:require(flash10) function drawTriangles(vertices : flash.Vector<Float>, ?indices : flash.Vector<Int>, ?uvtData : flash.Vector<Float>, ?culling : TriangleCulling) : Void;
  20. function endFill() : Void;
  21. @:require(flash10) function lineBitmapStyle(bitmap : BitmapData, ?matrix : flash.geom.Matrix, repeat : Bool = true, smooth : Bool = false) : Void;
  22. function lineGradientStyle(type : GradientType, colors : Array<UInt>, alphas : Array<Dynamic>, ratios : Array<Dynamic>, ?matrix : flash.geom.Matrix, ?spreadMethod : SpreadMethod, ?interpolationMethod : InterpolationMethod, focalPointRatio : Float = 0) : Void;
  23. @:require(flash10) function lineShaderStyle(shader : Shader, ?matrix : flash.geom.Matrix) : Void;
  24. function lineStyle(thickness : Null<Float> = 0, color : UInt = 0, alpha : Float = 1, pixelHinting : Bool = false, ?scaleMode : LineScaleMode, ?caps : CapsStyle, ?joints : JointStyle, miterLimit : Float = 3) : Void;
  25. function lineTo(x : Float, y : Float) : Void;
  26. function moveTo(x : Float, y : Float) : Void;
  27. @:require(flash11_6) function readGraphicsData(recurse : Bool = true) : flash.Vector<IGraphicsData>;
  28. }