Pattern
Package: Libraries.Data.Formats.ScalableVectorGraphics · Inherits from: Libraries.Language.Object, Libraries.Data.Formats.ScalableVectorGraphics.ScalableVectorGraphicsObject
The Pattern class is an implementation of SVG pattern definitions to be used in the SVG standard. Like other ScalableVectorGraphicsObjects the pattern class inherits global attributes but it also has its own attributes such as spacing.
Example Code
Libraries.Data.Formats.ScalableVectorGraphics.all
// make the svg pattern definitions
Pattern pattern
pattern:SetCanvasSize(1000,500)
pattern:SetSpacing(50)
pattern:SetPatternPalette(options:GetPatternPalette())
output pattern:ToText()
Actions
GetPatternPalette()
This action retrieves the pattern palette that needs to be defined in the SVG
Returns
Libraries.Containers.Array<integer>
Example
Libraries.Data.Formats.ScalableVectorGraphics.all
PatternOptionConstants options
Pattern patterns
patterns:GetPatternPalette(options:GetPatternPalette())
SetCanvasSize(integer width, integer height)
This action sets the width and height of canvas (used for default spacings).
Parameters
widthintegerheightinteger
Example
Libraries.Data.Formats.ScalableVectorGraphics.all
Pattern patterns
patterns:SetCanvasSize(100,100)
SetPatternPalette(Libraries.Containers.Array<integer> palette)
This action sets the pattern palette that needs to be defined in the SVG
Parameters
Example
Libraries.Data.Formats.ScalableVectorGraphics.all
PatternOptionConstants options
Pattern patterns
patterns:SetPatternPalette(options:GetPatternPalette())
SetSpacing(number spacing)
This action sets the height spacing of the pattern markings.
Parameters
spacingnumber
Example
Libraries.Data.Formats.ScalableVectorGraphics.all
Pattern patterns
patterns:SetSpacing(50)
ToText()
This action writes out all of the necessary tags and attributes that make up this ellipse. This action will be called automatically by the parent ScalableVectorGraphics, as such this action does not need to be used directly by the user.
Returns
text: the formatted string of all tags and attributes for this shape
Inherited Actions
68 actions from Libraries.Data.Formats.ScalableVectorGraphics.ScalableVectorGraphicsObject
- AddDataAttribute(text attribute, text value)
- ConvertReservedCharacters(text value)
- GetAriaDescribedBy()
- GetAriaDescription()
- GetAriaHidden()
- GetAriaLabel()
- GetAriaLabelledBy()
- GetAriaRoleDescription()
- GetCloseTag(text name, boolean container)
- GetColor()
- GetDataValue(text attribute)
- GetDescription()
- GetFill()
- GetFillOpacity()
- GetID()
- GetOnBlur()
- GetOnFocus()
- GetRole()
- GetStroke()
- GetStrokeOpacity()
- GetStrokeWidth()
- GetStyle()
- GetStyleClass()
- GetTabIndex()
- GetTitle()
- GlobalAttributesToText()
- HasDataAttribute(text attribute)
- IsContainer()
- IsOneLine()
- SetAriaDescribedBy(text ariaDescribedBy)
- SetAriaDescription(text ariaDescription)
- SetAriaHidden(text ariaHidden)
- SetAriaLabel(text ariaLabel)
- SetAriaLabelledBy(text ariaLabelledBy)
- SetAriaRoleDescription(text ariaRoleDescription)
- SetColor(text color)
- SetDataAttribute(text attribute, text value)
- SetDescription(text description)
- SetFill(Libraries.Game.Graphics.Color fill)
- SetFill(text fill)
- SetFillOpacity(text opacity)
- SetFillOpacity(number opacity)
- SetFillOpacity(Libraries.Game.Graphics.Color opacity)
- SetID(text id)
- SetIsContainer(boolean isContainer)
- SetIsOneLine(boolean isOneLine)
- SetOnBlur(text onBlur)
- SetOnFocus(text onFocus)
- SetRole(text role)
- SetRotateTransform(number angle, number x, number y)
- SetRotateTransform(number angle)
- SetScaleTransform(number x, number y)
- SetScaleTransform(number x)
- SetSkewXTransform(number degrees)
- SetSkewYTransform(number degrees)
- SetStroke(text stroke)
- SetStroke(Libraries.Game.Graphics.Color stroke)
- SetStrokeDashArray(text strokeDashArray)
- SetStrokeOpacity(number opacity)
- SetStrokeOpacity(text opacity)
- SetStrokeOpacity(Libraries.Game.Graphics.Color opacity)
- SetStrokeWidth(number strokeWidth)
- SetStrokeWidth(number strokeWidth, text unit)
- SetStyle(text style)
- SetStyleClass(text styleClass)
- SetTabIndex(integer tabIndex)
- SetTitle(text title)
- SetTranslateTransform(number x, number y)