Documentation
¶
Overview ¶
Package dml provides simple types used in DrawingML (Drawing Markup Language), part of the Office Open XML (OOXML) standard for representing graphical elements in documents.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OptBool ¶
OptBool represents a bool that may be null. OptBool implements the [Scanner] interface so it can be used as a scan destination, similar to [NullString].
func NewOptBool ¶
func OptBoolFromStr ¶
OptBoolFromStr creates a new OptBool instance from a string. The function accepts a string parameter 'value' which can be either "true", "1", "false", or "0". If the input string matches "true" or "1", the function sets the Bool field of the returned OptBool instance to true. If the input string matches "false" or "0", the function sets the Bool field of the returned OptBool instance to false.
Example usage:
nBool := OptBoolFromStr("true")
fmt.Println(nBool.Bool) // Output: true
fmt.Println(nBool.Valid) // Output: true
nBool = OptBoolFromStr("0")
fmt.Println(nBool.Bool) // Output: false
fmt.Println(nBool.Valid) // Output: true
func (OptBool) ToIntFlag ¶
ToIntFlag returns the integer representation of the OptBool. If the Bool field is true, it returns 1. If the Bool field is false, it also returns 0. Note: This method does not consider the Valid field. You ensure to check Valid field before calling this if you want optional field
func (OptBool) ToStringFlag ¶
ToIntFlag returns the string representation of the OptBool. If the Bool field is true, it returns "1". If the Bool field is false, it also returns "0". Note: This method does not consider the Valid field. You ensure to check Valid field before calling this if you want optional field
type RectAlignment ¶
type RectAlignment string
const ( RectAlignmentTopLeft RectAlignment = "tl" // Rectangle Alignment Enum (Top Left) RectAlignmentTop RectAlignment = "t" // Rectangle Alignment Enum (Top) RectAlignmentTopRight RectAlignment = "tr" // Rectangle Alignment Enum (Top Right) RectAlignmentLeft RectAlignment = "l" // Rectangle Alignment Enum (Left) RectAlignmentCenter RectAlignment = "ctr" // Rectangle Alignment Enum (Center) RectAlignmentRight RectAlignment = "r" // Rectangle Alignment Enum (Right) RectAlignmentBottomLeft RectAlignment = "bl" // Rectangle Alignment Enum (Bottom Left) RectAlignmentBottom RectAlignment = "b" // Rectangle Alignment Enum (Bottom) RectAlignmentBottomRight RectAlignment = "br" // Rectangle Alignment Enum (Bottom Right) )
func RectAlignmentFromStr ¶
func RectAlignmentFromStr(value string) (RectAlignment, error)
RectAlignmentFromStr converts a string to RectAlignment type.
func (*RectAlignment) UnmarshalXMLAttr ¶
func (r *RectAlignment) UnmarshalXMLAttr(attr xml.Attr) error
UnmarshalXMLAttr unmarshals XML attribute into RectAlignment.
type RelFromH ¶
type RelFromH string
const ( RelFromHCharacter RelFromH = "character" RelFromHColumn RelFromH = "column" RelFromHInsideMargin RelFromH = "insideMargin" RelFromHLeftMargin RelFromH = "leftMargin" RelFromHMargin RelFromH = "margin" RelFromHOutsizeMargin RelFromH = "outsizeMargin" RelFromHPage RelFromH = "page" RelFromHRightMargin RelFromH = "rightMargin" )
func RelFromHFromStr ¶
RelFromHFromStr converts a string to RelFromH type.
type RelFromV ¶
type RelFromV string
const ( RelFromVBottomMargin RelFromV = "bottomMargin" RelFromVInsideMargin RelFromV = "insideMargin" RelFromVLine RelFromV = "line" RelFromVMargin RelFromV = "margin" RelFromVOutsizeMargin RelFromV = "outsizeMargin" RelFromVPage RelFromV = "page" RelFromVParagraph RelFromV = "paragraph" RelFromVTopMargin RelFromV = "topMargin" )
func RelFromVFromStr ¶
RelFromVFromStr converts a string to RelFromV type.
type TileFlipMode ¶
type TileFlipMode string
TileFlipMode represents tile flip mode values based on the schema.
const ( TileFlipModeNone TileFlipMode = "none" // Tile Flip Mode Enum (None) TileFlipModeHorizontal TileFlipMode = "x" // Tile Flip Mode Enum (Horizontal) TileFlipModeVertical TileFlipMode = "y" // Tile Flip Mode Enum (Vertical) TileFlipModeBoth TileFlipMode = "xy" // Tile Flip Mode Enum (Horizontal and Vertical) )
Constants representing valid TileFlipMode values as per the schema.
func TileFlipModeFromStr ¶
func TileFlipModeFromStr(value string) (TileFlipMode, error)
TileFlipModeFromStr converts a string to TileFlipMode type. Returns an error if the string does not match any valid TileFlipMode value.
func (*TileFlipMode) UnmarshalXMLAttr ¶
func (t *TileFlipMode) UnmarshalXMLAttr(attr xml.Attr) error
UnmarshalXMLAttr unmarshals XML attribute into TileFlipMode. Implements the xml.UnmarshalerAttr interface.
type WrapText ¶
type WrapText string
WrapText type
const ( WrapTextBothSides WrapText = "bothSides" // Both Sides WrapTextLeft WrapText = "left" // Left Side Only WrapTextRight WrapText = "right" // Right Side Only WrapTextLargest WrapText = "largest" // Largest Side Only )
Constants for valid values
func WrapTextFromStr ¶
WrapTextFromStr converts a string to WrapText type.