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

  • width integer
  • height integer

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

  • spacing number

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
3 actions from Libraries.Language.Object