Packagecom.esri.ags.symbol
Classpublic class PictureFillSymbol
InheritancePictureFillSymbol Inheritance FillSymbol Inheritance Symbol Inheritance flash.events.EventDispatcher

Used to draw polygon features on the graphics layer using an image that gets repeated over and over. The image format can be a PNG, JPG or GIF (but not svg or swf). In addition, the fill symbol can have an optional outline, which is defined by a line symbol.

Default MXML Propertyoutline


Example
MXML usage:
 <esri:Graphic toolTip="Bermuda Triangle">
     <esri:geometry>
         <esri:Polygon spatialReference="{new SpatialReference(4326)}">
             <mx:Array>
                 <mx:Array>
                     <esri:MapPoint x="-65" y="32"/>
                     <esri:MapPoint x="-80" y="26"/>
                     <esri:MapPoint x="-66" y="18"/>
                     <esri:MapPoint x="-65" y="32"/>
                 </mx:Array>
             </mx:Array>
         </esri:Polygon>
     </esri:geometry>
     <esri:symbol>
         <esri:PictureFillSymbol source="http://resources.esri.com/help/9.3/arcgisserver/apis/flex/samples/assets/warningsmall.gif"/>
     </esri:symbol>
 </esri:Graphic>

See also

About using JPG,GIF,PNG with Flex
Live sample - Fill Symbols


Public Properties
 PropertyDefined by
  height : Number
Image height.
PictureFillSymbol
 Inheritedoutline : SimpleLineSymbol
The fill outline.
FillSymbol
  source : Object
Source of the image.
PictureFillSymbol
  width : Number
Image width.
PictureFillSymbol
  xoffset : Number
The offset on the x-axis in pixels.
PictureFillSymbol
  xscale : Number
Scale in x direction.
PictureFillSymbol
  yoffset : Number
The offset on the y-axis in pixels.
PictureFillSymbol
  yscale : Number
Scale in y direction.
PictureFillSymbol
Public Methods
 MethodDefined by
  
PictureFillSymbol(source:Object = null, width:Number = 0, height:Number = 0, xscale:Number = 1, yscale:Number = 1, xoffset:Number = 0, yoffset:Number = 0, outline:SimpleLineSymbol = null)
Creates a new PictureFillSymbol.
PictureFillSymbol
 Inherited
clear(sprite:Sprite):void
Clears the graphics that were drawn to the sprite object.
Symbol
 Inherited
destroy(sprite:Sprite):void
Removes all the graphics that were drawn to the sprite object and resets its properties.
Symbol
 Inherited
draw(sprite:Sprite, geometry:Geometry, attributes:Object, map:Map):void
Draw the graphics on the sprite object.
Symbol
Protected Methods
 MethodDefined by
 Inherited
Helper function to dispatch a change event.
Symbol
 Inherited
removeAllChildren(sprite:Sprite):void
Removes all children from the sprite object.
Symbol
 Inherited
toScreenX(map:Map, mapX:Number):Number
Converts the x-coordinate of map point to a screen point.
Symbol
 Inherited
toScreenY(map:Map, mapY:Number):Number
Converts the y-coordinate of map point to a screen point.
Symbol
Property detail
heightproperty
height:Number  [read-write]

Image height.

This property can be used as the source for data binding.

Implementation
    public function get height():Number
    public function set height(value:Number):void
sourceproperty 
source:Object  [read-write]

Source of the image.

This property can be used as the source for data binding.

Implementation
    public function get source():Object
    public function set source(value:Object):void
widthproperty 
width:Number  [read-write]

Image width.

This property can be used as the source for data binding.

Implementation
    public function get width():Number
    public function set width(value:Number):void
xoffsetproperty 
xoffset:Number  [read-write]

The offset on the x-axis in pixels.

This property can be used as the source for data binding.

Implementation
    public function get xoffset():Number
    public function set xoffset(value:Number):void
xscaleproperty 
xscale:Number  [read-write]

Scale in x direction.

The default value is 1.0.

This property can be used as the source for data binding.

Implementation
    public function get xscale():Number
    public function set xscale(value:Number):void
yoffsetproperty 
yoffset:Number  [read-write]

The offset on the y-axis in pixels.

This property can be used as the source for data binding.

Implementation
    public function get yoffset():Number
    public function set yoffset(value:Number):void
yscaleproperty 
yscale:Number  [read-write]

Scale in y direction.

The default value is 1.0.

This property can be used as the source for data binding.

Implementation
    public function get yscale():Number
    public function set yscale(value:Number):void
Constructor detail
PictureFillSymbol()constructor
public function PictureFillSymbol(source:Object = null, width:Number = 0, height:Number = 0, xscale:Number = 1, yscale:Number = 1, xoffset:Number = 0, yoffset:Number = 0, outline:SimpleLineSymbol = null)

Creates a new PictureFillSymbol.

Note 1: in version 1.1 and earlier, the default width and height was 10x10, but as of version 1.2 the default is 0x0.

Note 2: with the introduction of xscale and yscale in version 1.3, the parameters for the constructor was changed.

Note 3: 'xoffset' and 'yoffset' were added to the constructor in version 1.3.

Parameters
source:Object (default = null) — Source of the image (embedded images).
 
width:Number (default = 0) — Width of the image in pixels (default was 10 in version 1.1 and earlier, but is 0 as of version 1.2).
 
height:Number (default = 0) — Height of the image in pixels (default was 10 in version 1.1 and earlier, but is 0 as of version 1.2).
 
xscale:Number (default = 1) — Scale factor in x direction (added to constructor in version 1.3).
 
yscale:Number (default = 1) — Scale factor in y direction (added to constructor in version 1.3).
 
xoffset:Number (default = 0) — The offset on the x-axis in pixels (added to constructor in version 1.3).
 
yoffset:Number (default = 0) — The offset on the y-axis in pixels (added to constructor in version 1.3).
 
outline:SimpleLineSymbol (default = null) — The picture fill outline.