Apache Flex (FlexJS) 0.7.0 API Reference | All Packages | All Classes | Index | Frames No Frames |
SolidBorderUtil

Package | org.apache.flex.utils
Class | public class SolidBorderUtil
Inheritance | SolidBorderUtil Object

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

The SolidBorderUtil class is a utility class that draws a solid color border of a specified color, thickness and alpha. This class is used to composite Flash equivalents of JS entities and has no JS equivalent.

Public Methods

| Method | Defined By
--- | --- | ---
|  | drawBorder(g:Graphics, x:Number, y:Number, width:Number, height:Number, color:uint, backgroundColor:Object = null, thickness:int = 1, alpha:Number = 1.0, ellipseWidth:Number, ellipseHeight:Number):void [static] Draw a solid color border as specified. | SolidBorderUtil
|  | drawDetailedBorder(g:Graphics, x:Number, y:Number, width:Number, height:Number, colorTop:uint, colorRight:uint, colorBottom:uint, colorLeft:uint, thicknessTop:int = 0, thicknessRight:int = 0, thicknessBottom:int = 0, thicknessLeft:int = 0):void [static] Draw a solid color border as specified. | SolidBorderUtil

Method Detail

drawBorder | () | method

`public static function drawBorder(g:Graphics, x:Number, y:Number, width:Number, height:Number, color:uint, backgroundColor:Object = null, thickness:int = 1, alpha:Number = 1.0, ellipseWidth:Number, ellipseHeight:Number):void`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Draw a solid color border as specified. Will fill with the backgroundColor if specified. The border draws inside with given width/height.

Parameters

| `g:Graphics` — The flash.display.DisplayObject#graphics
| `x:Number` — The x position
| `y:Number` — The y position
| `width:Number` — The width
| `height:Number` — The height
| `color:uint` — The color
| `backgroundColor:Object` (default = `null`)`` — The optional fill color
| `thickness:int` (default = `1`)`` — The thickness of the border
| `alpha:Number` (default = `1.0`)`` — The alpha
| `ellipseWidth:Number` (default = `NaN`)``
| `ellipseHeight:Number` (default = `NaN`)``

drawDetailedBorder | () | method |

`public static function drawDetailedBorder(g:Graphics, x:Number, y:Number, width:Number, height:Number, colorTop:uint, colorRight:uint, colorBottom:uint, colorLeft:uint, thicknessTop:int = 0, thicknessRight:int = 0, thicknessBottom:int = 0, thicknessLeft:int = 0):void`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Draw a solid color border as specified. Only square corners are supported as the real usage for this is to handle CSS triangles. The border is drawn around the given width and height.

Parameters

| `g:Graphics` — The flash.display.DisplayObject#graphics
| `x:Number` — The x position
| `y:Number` — The y position
| `width:Number` — The width
| `height:Number` — The height
| `colorTop:uint` — The rgba color (alpha is in highest order byte)
| `colorRight:uint` — The rgba color
| `colorBottom:uint` — The rgba color
| `colorLeft:uint` — The rgba color
| `thicknessTop:int` (default = `0`)`` — The optional fill color
| `thicknessRight:int` (default = `0`)`` — The thickness of the border
| `thicknessBottom:int` (default = `0`)`` — The thickness of the border
| `thicknessLeft:int` (default = `0`)`` — The thickness of the border

Mon Sep 5 2016, 07:19 AM -07:00