|  | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!-- saved from url=(0014)about:internet --><html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link rel="stylesheet" href="../../style.css" type="text/css" media="screen"><link rel="stylesheet" href="../../print.css" type="text/css" media="print"><link rel="stylesheet" href="../../override.css" type="text/css"><meta name="keywords" content="Stroke,mx.graphics.Stroke"><title>mx.graphics.Stroke</title></head><body><script language="javascript" type="text/javascript" src="../../asdoc.js"></script><script language="javascript" type="text/javascript" src="../../help.js"></script><script language="javascript" type="text/javascript" src="../../cookies.js"></script><script language="javascript" type="text/javascript"><!-- | 
|  | asdocTitle = 'Stroke - ApacheFlex API Reference'; | 
|  | var baseRef = '../../'; | 
|  | window.onload = configPage; | 
|  | --></script> | 
|  | <script type="text/javascript"> | 
|  | scrollToNameAnchor(); | 
|  | </script><table class="titleTable" cellpadding="0" cellspacing="0" id="titleTable" style="display:none"><tr><td class="titleTableTitle" align="left">Apache Flex 4.16.1 API Reference </td><td class="titleTableTopNav" align="right"><a href="../../package-summary.html" onclick="loadClassListFrame('../../all-classes.html')">All Packages</a> | <a href="../../class-summary.html" onclick="loadClassListFrame('../../all-classes.html')">All Classes</a> | <a href="../../all-index-A.html" onclick="loadClassListFrame('../../index-list.html')">Index</a> | <a id="framesLink1" href="../../index.html?mx/graphics/Stroke.html&mx/graphics/class-list.html">Frames</a><a id="noFramesLink1" style="display:none" href="" onclick="parent.location=document.location"> No Frames </a></td><td class="titleTableLogo" align="right" rowspan="3"><img src="../../images/logo.jpg" class="logoImage" alt="AdobeLogo" title="AdobeLogo"></td></tr><tr class="titleTableRow2"><td class="titleTableSubTitle" id="subTitle" align="left">Stroke</td><td class="titleTableSubNav" id="subNav" align="right"><a href="#propertySummary">Properties</a> | <a href="#methodSummary">Methods</a></td></tr><tr class="titleTableRow3"><td colspan="3"> </td></tr></table><script language="javascript" type="text/javascript" xml:space="preserve"> | 
|  | <!-- | 
|  |  | 
|  | if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("Stroke"); titleBar_setSubNav(false,true,false,false,false,false,false,false,true,false,false	,false,false,false,false,false);} | 
|  | --> | 
|  | </script><div xmlns:fn="http://www.w3.org/2005/xpath-functions" class="MainContent"><table class="classHeaderTable" cellpadding="0" cellspacing="0"><tr><td class="classHeaderTableLabel">Package</td><td><a href="package-detail.html" onclick="javascript:loadClassListFrame('class-list.html')">mx.graphics</a></td></tr><tr><td class="classHeaderTableLabel">Class</td><td class="classSignature">public  class  Stroke</td></tr><tr><td class="classHeaderTableLabel">Inheritance</td><td class="inheritanceList">Stroke  <img src="../../images/inherit-arrow.gif" title="Inheritance" alt="Inheritance" class="inheritArrow"> <a href="../../mx/graphics/SolidColorStroke.html">SolidColorStroke</a> <img src="../../images/inherit-arrow.gif" title="Inheritance" alt="Inheritance" class="inheritArrow"> flash.events.EventDispatcher</td></tr></table><div style="white-space:nowrap" valign="top"><b>Deprecated Since</b> 4.0: Please Use <A href="SolidColorStroke.html">SolidColorStroke</A></div><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version : </b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version : </b></td><td>Flex 3</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions : </b></td><td>Flash Player  9, AIR 1.1</td></tr></table><p></p><p></p><p></p><p></p> | 
|  | The Stroke class defines the properties for a line. | 
|  |  | 
|  | You can define a Stroke object in MXML, but you must attach that Stroke to | 
|  | another object for it to appear in your application. The following example | 
|  | defines two Stroke objects and then uses them in the horizontalAxisRenderer | 
|  | of a LineChart control: | 
|  |  | 
|  | <pre> | 
|  | ... | 
|  | <mx:Stroke id="ticks" color="0xFF0000" weight="1"/> | 
|  | <mx:Stroke id="mticks" color="0x0000FF" weight="1"/> | 
|  |  | 
|  | <mx:LineChart id="mychart" dataProvider="{ndxa}"> | 
|  | <mx:horizontalAxisRenderer> | 
|  | <mx:AxisRenderer placement="bottom" canDropLabels="true"> | 
|  | <mx:tickStroke>{ticks}</mx:tickStroke> | 
|  | <mx:minorTickStroke>{mticks}</mx:minorTickStroke> | 
|  | </mx:AxisRenderer> | 
|  | </mx:horizontalAxisRenderer> | 
|  | </LineChart> | 
|  | ... | 
|  | </pre> | 
|  |  | 
|  | <p></p><a name="mxmlSyntaxSummary"></a><span class="classHeaderTableLabel">MXML Syntax</span><span id="showMxmlLink" style="display:none"><a href="#mxmlSyntaxSummary" onclick="toggleMXMLOnly();"><img src="../../images/collapsed.gif" title="collapsed" alt="collapsed" class="collapsedImage">Show MXML Syntax</a><br/></span><span id="hideMxmlLink"><a href="#mxmlSyntaxSummary" onclick="toggleMXMLOnly();"><img src="../../images/expanded.gif" title="expanded" alt="expanded" class="expandedImage">Hide MXML Syntax</a></span><div id="mxmlSyntax" class="mxmlSyntax">  <p>The <code><mx:Stroke></code> tag inherits all the tag attributes | 
|  | of its superclass, and adds the following tag attributes:</p> | 
|  | <pre> | 
|  | <mx:Stroke | 
|  | <b>Properties</b> | 
|  | alpha="1.0" | 
|  | caps="null|none|round|square" | 
|  | color="0x000000" | 
|  | joints="null|bevel|miter|round" | 
|  | miterLimit="1" | 
|  | pixelHinting="false|true" | 
|  | scaleMode="normal|none|horizontal|vertical" | 
|  | weight="1 (<i>in most cases</i>)" | 
|  | /> | 
|  | </pre> | 
|  | </div><script language="javascript" type="text/javascript"><!-- | 
|  | setMXMLOnly(); | 
|  | --></script><p><span class="classHeaderTableLabel">See also</span></p><div class="seeAlso">flash.display.Graphics</div><br/><hr></div><a name="propertySummary"></a><div class="summarySection"><div class="summaryTableTitle">Public Properties</div><div class="showHideLinks"><div id="hideInheritedProperty" class="hideInheritedProperty"><a class="showHideLink" href="#propertySummary" onclick="javascript:setInheritedVisible(false,'Property');"><img class="showHideLinkImage" src="../../images/expanded.gif"> Hide Inherited Public Properties</a></div><div id="showInheritedProperty" class="showInheritedProperty"><a class="showHideLink" href="#propertySummary" onclick="javascript:setInheritedVisible(true,'Property');"><img class="showHideLinkImage" src="../../images/collapsed.gif"> Show Inherited Public Properties</a></div></div><table cellspacing="0" cellpadding="3" class="summaryTable hideInheritedProperty" id="summaryTableProperty"><tr><th> </th><th colspan="2">Property</th><th class="summaryTableOwnerCol">Defined By</th></tr><tr class="hideInheritedProperty"><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"><img src="../../images/inheritedSummary.gif" alt="Inherited" title="Inherited" class="inheritedSummaryImage"></td><td class="summaryTableSignatureCol"><a href="../../mx/graphics/SolidColorStroke.html#alpha" class="signatureLink">alpha</a> : Number<div class="summaryTableDescription"> | 
|  | The transparency of a line.</div></td><td class="summaryTableOwnerCol"><a href="../../mx/graphics/SolidColorStroke.html">SolidColorStroke</a></td></tr><tr class="hideInheritedProperty"><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"><img src="../../images/inheritedSummary.gif" alt="Inherited" title="Inherited" class="inheritedSummaryImage"></td><td class="summaryTableSignatureCol"><a href="../../mx/graphics/SolidColorStroke.html#caps" class="signatureLink">caps</a> : String<div class="summaryTableDescription"> | 
|  | Specifies the type of caps at the end of lines.</div></td><td class="summaryTableOwnerCol"><a href="../../mx/graphics/SolidColorStroke.html">SolidColorStroke</a></td></tr><tr class="hideInheritedProperty"><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"><img src="../../images/inheritedSummary.gif" alt="Inherited" title="Inherited" class="inheritedSummaryImage"></td><td class="summaryTableSignatureCol"><a href="../../mx/graphics/SolidColorStroke.html#color" class="signatureLink">color</a> : uint<div class="summaryTableDescription"> | 
|  | The line color.</div></td><td class="summaryTableOwnerCol"><a href="../../mx/graphics/SolidColorStroke.html">SolidColorStroke</a></td></tr><tr class="hideInheritedProperty"><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"><img src="../../images/inheritedSummary.gif" alt="Inherited" title="Inherited" class="inheritedSummaryImage"></td><td class="summaryTableSignatureCol"><a href="../../mx/graphics/SolidColorStroke.html#joints" class="signatureLink">joints</a> : String<div class="summaryTableDescription"> | 
|  | Specifies the type of joint appearance used at angles.</div></td><td class="summaryTableOwnerCol"><a href="../../mx/graphics/SolidColorStroke.html">SolidColorStroke</a></td></tr><tr class="hideInheritedProperty"><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"><img src="../../images/inheritedSummary.gif" alt="Inherited" title="Inherited" class="inheritedSummaryImage"></td><td class="summaryTableSignatureCol"><a href="../../mx/graphics/SolidColorStroke.html#miterLimit" class="signatureLink">miterLimit</a> : Number<div class="summaryTableDescription"> | 
|  | Indicates the limit at which a miter is cut off.</div></td><td class="summaryTableOwnerCol"><a href="../../mx/graphics/SolidColorStroke.html">SolidColorStroke</a></td></tr><tr class="hideInheritedProperty"><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"><img src="../../images/inheritedSummary.gif" alt="Inherited" title="Inherited" class="inheritedSummaryImage"></td><td class="summaryTableSignatureCol"><a href="../../mx/graphics/SolidColorStroke.html#pixelHinting" class="signatureLink">pixelHinting</a> : Boolean<div class="summaryTableDescription"> | 
|  | Specifies whether to hint strokes to full pixels.</div></td><td class="summaryTableOwnerCol"><a href="../../mx/graphics/SolidColorStroke.html">SolidColorStroke</a></td></tr><tr class="hideInheritedProperty"><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"><img src="../../images/inheritedSummary.gif" alt="Inherited" title="Inherited" class="inheritedSummaryImage"></td><td class="summaryTableSignatureCol"><a href="../../mx/graphics/SolidColorStroke.html#scaleMode" class="signatureLink">scaleMode</a> : String<div class="summaryTableDescription"> | 
|  | A value from the LineScaleMode class | 
|  | that  specifies which scale mode to use.</div></td><td class="summaryTableOwnerCol"><a href="../../mx/graphics/SolidColorStroke.html">SolidColorStroke</a></td></tr><tr class="hideInheritedProperty"><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"><img src="../../images/inheritedSummary.gif" alt="Inherited" title="Inherited" class="inheritedSummaryImage"></td><td class="summaryTableSignatureCol"><a href="../../mx/graphics/SolidColorStroke.html#weight" class="signatureLink">weight</a> : Number<div class="summaryTableDescription"> | 
|  | The line weight, in pixels.</div></td><td class="summaryTableOwnerCol"><a href="../../mx/graphics/SolidColorStroke.html">SolidColorStroke</a></td></tr></table></div><a name="methodSummary"></a><div class="summarySection"><div class="summaryTableTitle">Public Methods </div><div class="showHideLinks"><div id="hideInheritedMethod" class="hideInheritedMethod"><a class="showHideLink" href="#methodSummary" onclick="javascript:setInheritedVisible(false,'Method');"><img class="showHideLinkImage" src="../../images/expanded.gif"> Hide Inherited Public Methods</a></div><div id="showInheritedMethod" class="showInheritedMethod"><a class="showHideLink" href="#methodSummary" onclick="javascript:setInheritedVisible(true,'Method');"><img class="showHideLinkImage" src="../../images/collapsed.gif"> Show Inherited Public Methods</a></div></div><table cellspacing="0" cellpadding="3" class="summaryTable " id="summaryTableMethod"><tr><th> </th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined By</th></tr><tr class=""><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#Stroke()" class="signatureLink">Stroke</a>(color:uint = 0x000000, weight:Number = 0, alpha:Number = 1.0, pixelHinting:Boolean = false, scaleMode:String = normal, caps:String = null, joints:String = null, miterLimit:Number = 1)</div><div class="summaryTableDescription"> | 
|  | Constructor.</div></td><td class="summaryTableOwnerCol">Stroke</td></tr><tr class="hideInheritedMethod"><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"><img src="../../images/inheritedSummary.gif" alt="Inherited" title="Inherited" class="inheritedSummaryImage"></td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="../../mx/graphics/SolidColorStroke.html#apply()" class="signatureLink">apply</a>(graphics:Graphics, targetBounds:Rectangle, targetOrigin:Point):void</div><div class="summaryTableDescription"> | 
|  |  | 
|  | Applies the properties to the specified Graphics object.</div></td><td class="summaryTableOwnerCol"><a href="../../mx/graphics/SolidColorStroke.html">SolidColorStroke</a></td></tr><tr class="hideInheritedMethod"><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"><img src="../../images/inheritedSummary.gif" alt="Inherited" title="Inherited" class="inheritedSummaryImage"></td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="../../mx/graphics/SolidColorStroke.html#createGraphicsStroke()" class="signatureLink">createGraphicsStroke</a>(targetBounds:Rectangle, targetOrigin:Point):GraphicsStroke</div><div class="summaryTableDescription"> | 
|  |  | 
|  | Generates a GraphicsStroke object representing | 
|  | this stroke.</div></td><td class="summaryTableOwnerCol"><a href="../../mx/graphics/SolidColorStroke.html">SolidColorStroke</a></td></tr></table></div><script language="javascript" type="text/javascript"><!-- | 
|  | showHideInherited(); | 
|  | --></script><div class="MainContent"><a name="constructorDetail"></a><div class="detailSectionHeader">Constructor Detail</div><a name="Stroke()"></a><a name="Stroke(uint,Number,Number,Boolean,String,String,String,Number)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">Stroke</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">Constructor</td></tr></table><div class="detailBody"><code>public function Stroke(color:uint = 0x000000, weight:Number = 0, alpha:Number = 1.0, pixelHinting:Boolean = false, scaleMode:String = normal, caps:String = null, joints:String = null, miterLimit:Number = 1)</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version : </b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version : </b></td><td>Flex 3</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions : </b></td><td>Flash Player  9, AIR 1.1</td></tr></table><p></p><p> | 
|  | Constructor. | 
|  | </p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">color</span>:uint</code> (default = <code>0x000000</code>)<code></code> — Specifies the line color. | 
|  | The default value is 0x000000 (black). | 
|  | </td></tr><tr><td class="paramSpacer"> </td></tr><tr><td width="20px"></td><td><code><span class="label">weight</span>:Number</code> (default = <code>0</code>)<code></code> — Specifies the line weight, in pixels. | 
|  | The default value is 0. | 
|  | </td></tr><tr><td class="paramSpacer"> </td></tr><tr><td width="20px"></td><td><code><span class="label">alpha</span>:Number</code> (default = <code>1.0</code>)<code></code> — Specifies the alpha value in the range 0.0 to 1.0. | 
|  | The default value is 1.0 (opaque). | 
|  | </td></tr><tr><td class="paramSpacer"> </td></tr><tr><td width="20px"></td><td><code><span class="label">pixelHinting</span>:Boolean</code> (default = <code>false</code>)<code></code> — Specifies whether to hint strokes to full pixels. | 
|  | This value affects both the position of anchors of a curve | 
|  | and the line stroke size itself. | 
|  | The default value is false. | 
|  | </td></tr><tr><td class="paramSpacer"> </td></tr><tr><td width="20px"></td><td><code><span class="label">scaleMode</span>:String</code> (default = <code>normal</code>)<code></code> — A value from the LineScaleMode class | 
|  | that specifies which scale mode to use. | 
|  | Valid values are <code>LineScaleMode.HORIZONTAL</code>, | 
|  | <code>LineScaleMode.NONE</code>, <code>LineScaleMode.NORMAL</code>, | 
|  | and <code>LineScaleMode.VERTICAL</code>. | 
|  | This parameter is optional, | 
|  | with a default value of <code>LineScaleMode.NORMAL</code>. | 
|  | </td></tr><tr><td class="paramSpacer"> </td></tr><tr><td width="20px"></td><td><code><span class="label">caps</span>:String</code> (default = <code>null</code>)<code></code> — Specifies the type of caps at the end of lines. | 
|  | Valid values are <code>"round"</code>, <code>"square"</code>, | 
|  | and <code>"none"</code>. | 
|  | The default value is <code>null</code>. | 
|  | </td></tr><tr><td class="paramSpacer"> </td></tr><tr><td width="20px"></td><td><code><span class="label">joints</span>:String</code> (default = <code>null</code>)<code></code> — Specifies the type of joint appearance used at angles. | 
|  | Valid values are <code>"round"</code>, <code>"miter"</code>, | 
|  | and <code>"bevel"</code>. | 
|  | The default value is <code>null</code>. | 
|  | </td></tr><tr><td class="paramSpacer"> </td></tr><tr><td width="20px"></td><td><code><span class="label">miterLimit</span>:Number</code> (default = <code>1</code>)<code></code> — Indicates the limit at which a miter is cut off. | 
|  | Valid values range from 1 to 255. | 
|  | The default value is 1. | 
|  |  | 
|  | </td></tr></table></div><br/><br/><hr><br/><p></p><center class="copyright"><footer>The Apache Software Foundation</footer><br/>Wed Nov 15 2017, 09:50 AM +01:00  </center></div></body></html><!--The Apache Software Foundation<br/>Wed Nov 15 2017, 09:50 AM +01:00  --> |