Versions in this module Expand all Collapse all v1 v1.0.4 Dec 13, 2021 v1.0.3 Dec 11, 2021 v1.0.2 Dec 11, 2021 Changes in this version type Text + func (t *Text) MaxWordCountPerLine() int v1.0.1 Dec 11, 2021 Changes in this version type Text + func (t *Text) LineCount() int v1.0.0 Dec 11, 2021 Changes in this version + const ArcToCmd + const CloseCmd + const CubeToCmd + const DefaultResolution + const LineToCmd + const MoveToCmd + const QuadToCmd + var A0 = Size + var A1 = Size + var A2 = Size + var A3 = Size + var A4 = Size + var A5 = Size + var A6 = Size + var A7 = Size + var A8 = Size + var Aliceblue = color.RGBA + var Antiquewhite = color.RGBA + var Aqua = color.RGBA + var Aquamarine = color.RGBA + var Azure = color.RGBA + var B0 = Size + var B1 = Size + var B10 = Size + var B2 = Size + var B3 = Size + var B4 = Size + var B5 = Size + var B6 = Size + var B7 = Size + var B8 = Size + var B9 = Size + var Beige = color.RGBA + var Bisque = color.RGBA + var Black = color.RGBA + var Blanchedalmond = color.RGBA + var Blue = color.RGBA + var Blueviolet = color.RGBA + var Brown = color.RGBA + var Burlywood = color.RGBA + var C2 = Size + var C3 = Size + var C4 = Size + var C5 = Size + var C6 = Size + var Cadetblue = color.RGBA + var Chartreuse = color.RGBA + var Chocolate = color.RGBA + var Coral = color.RGBA + var Cornflowerblue = color.RGBA + var Cornsilk = color.RGBA + var Crimson = color.RGBA + var Cyan = color.RGBA + var D0 = Size + var Darkblue = color.RGBA + var Darkcyan = color.RGBA + var Darkgoldenrod = color.RGBA + var Darkgray = color.RGBA + var Darkgreen = color.RGBA + var Darkgrey = color.RGBA + var Darkkhaki = color.RGBA + var Darkmagenta = color.RGBA + var Darkolivegreen = color.RGBA + var Darkorange = color.RGBA + var Darkorchid = color.RGBA + var Darkred = color.RGBA + var Darksalmon = color.RGBA + var Darkseagreen = color.RGBA + var Darkslateblue = color.RGBA + var Darkslategray = color.RGBA + var Darkslategrey = color.RGBA + var Darkturquoise = color.RGBA + var Darkviolet = color.RGBA + var Deeppink = color.RGBA + var Deepskyblue = color.RGBA + var DefaultStyle = Style + var Dimgray = color.RGBA + var Dimgrey = color.RGBA + var Dodgerblue = color.RGBA + var Epsilon = 1e-10 + var Executive = Size + var Firebrick = color.RGBA + var Floralwhite = color.RGBA + var Forestgreen = color.RGBA + var Fuchsia = color.RGBA + var Gainsboro = color.RGBA + var Ghostwhite = color.RGBA + var Gold = color.RGBA + var Goldenrod = color.RGBA + var Gray = color.RGBA + var Green = color.RGBA + var Greenyellow = color.RGBA + var Grey = color.RGBA + var Honeydew = color.RGBA + var Hotpink = color.RGBA + var Identity = Matrix + var Indianred = color.RGBA + var Indigo = color.RGBA + var Ivory = color.RGBA + var Khaki = color.RGBA + var Lavender = color.RGBA + var Lavenderblush = color.RGBA + var Lawngreen = color.RGBA + var Ledger = Size + var Legal = Size + var Lemonchiffon = color.RGBA + var Letter = Size + var Lightblue = color.RGBA + var Lightcoral = color.RGBA + var Lightcyan = color.RGBA + var Lightgoldenrodyellow = color.RGBA + var Lightgray = color.RGBA + var Lightgreen = color.RGBA + var Lightgrey = color.RGBA + var Lightpink = color.RGBA + var Lightsalmon = color.RGBA + var Lightseagreen = color.RGBA + var Lightskyblue = color.RGBA + var Lightslategray = color.RGBA + var Lightslategrey = color.RGBA + var Lightsteelblue = color.RGBA + var Lightyellow = color.RGBA + var Lime = color.RGBA + var Limegreen = color.RGBA + var Linen = color.RGBA + var Magenta = color.RGBA + var Maroon = color.RGBA + var Mediumaquamarine = color.RGBA + var Mediumblue = color.RGBA + var Mediumorchid = color.RGBA + var Mediumpurple = color.RGBA + var Mediumseagreen = color.RGBA + var Mediumslateblue = color.RGBA + var Mediumspringgreen = color.RGBA + var Mediumturquoise = color.RGBA + var Mediumvioletred = color.RGBA + var Midnightblue = color.RGBA + var Mintcream = color.RGBA + var Mistyrose = color.RGBA + var Moccasin = color.RGBA + var Navajowhite = color.RGBA + var Navy = color.RGBA + var Oldlace = color.RGBA + var Olive = color.RGBA + var Olivedrab = color.RGBA + var Orange = color.RGBA + var Orangered = color.RGBA + var Orchid = color.RGBA + var Origin = Point + var Palegoldenrod = color.RGBA + var Palegreen = color.RGBA + var Paleturquoise = color.RGBA + var Palevioletred = color.RGBA + var Papayawhip = color.RGBA + var Peachpuff = color.RGBA + var Peru = color.RGBA + var Pink = color.RGBA + var Plum = color.RGBA + var Powderblue = color.RGBA + var Precision = 8 + var Purple = color.RGBA + var RA0 = Size + var RA1 = Size + var RA2 = Size + var Red = color.RGBA + var Rosybrown = color.RGBA + var Royalblue = color.RGBA + var SRA0 = Size + var SRA1 = Size + var SRA2 = Size + var SRA3 = Size + var SRA4 = Size + var Saddlebrown = color.RGBA + var Salmon = color.RGBA + var Sandybrown = color.RGBA + var Seagreen = color.RGBA + var Seashell = color.RGBA + var Sienna = color.RGBA + var Silver = color.RGBA + var Skyblue = color.RGBA + var Slateblue = color.RGBA + var Slategray = color.RGBA + var Slategrey = color.RGBA + var Snow = color.RGBA + var Springgreen = color.RGBA + var Steelblue = color.RGBA + var Tabloid = Size + var Tan = color.RGBA + var Teal = color.RGBA + var Thistle = color.RGBA + var Tolerance = 0.01 + var Tomato = color.RGBA + var Transparent = color.RGBA + var Turquoise = color.RGBA + var Violet = color.RGBA + var Wheat = color.RGBA + var White = color.RGBA + var Whitesmoke = color.RGBA + var Yellow = color.RGBA + var Yellowgreen = color.RGBA + func Equal(a, b float64) bool + type ArcsJoiner struct + GapJoiner Joiner + Limit float64 + func (j ArcsJoiner) Join(rhs, lhs *Path, halfWidth float64, pivot, n0, n1 Point, r0, r1 float64) + func (j ArcsJoiner) String() string + type BevelJoiner struct + func (BevelJoiner) Join(rhs, lhs *Path, halfWidth float64, pivot, n0, n1 Point, r0, r1 float64) + func (BevelJoiner) String() string + type ButtCapper struct + func (ButtCapper) Cap(p *Path, halfWidth float64, pivot, n0 Point) + func (ButtCapper) String() string + type CSSColor color.RGBA + func (color CSSColor) String() string + type Canvas struct + H float64 + W float64 + func New(width, height float64) *Canvas + func NewFromSize(size Size) *Canvas + func (c *Canvas) Empty() bool + func (c *Canvas) Fit(margin float64) + func (c *Canvas) Render(r Renderer) + func (c *Canvas) RenderImage(img image.Image, m Matrix) + func (c *Canvas) RenderPath(path *Path, style Style, m Matrix) + func (c *Canvas) RenderText(text *Text, m Matrix) + func (c *Canvas) Reset() + func (c *Canvas) SetZIndex(zindex int) + func (c *Canvas) Size() (float64, float64) + func (c *Canvas) WriteFile(filename string, w Writer) error + type Capper interface + Cap func(*Path, float64, Point, Point) + var ButtCap Capper = ButtCapper{} + var RoundCap Capper = RoundCapper{} + var SquareCap Capper = SquareCapper{} + type ColorSpace interface + FromLinear func(color.Color) color.RGBA + ToLinear func(color.Color) color.RGBA + var DefaultColorSpace ColorSpace = LinearColorSpace{} + type Context struct + func NewContext(r Renderer) *Context + func (c *Context) Arc(rx, ry, rot, theta0, theta1 float64) + func (c *Context) ArcTo(rx, ry, rot float64, large, sweep bool, x, y float64) + func (c *Context) Close() + func (c *Context) ComposeView(view Matrix) + func (c *Context) CoordView() Matrix + func (c *Context) CubeTo(cpx1, cpy1, cpx2, cpy2, x, y float64) + func (c *Context) DrawImage(x, y float64, img image.Image, resolution Resolution) + func (c *Context) DrawPath(x, y float64, paths ...*Path) + func (c *Context) DrawText(x, y float64, texts ...*Text) + func (c *Context) Fill() + func (c *Context) FillStroke() + func (c *Context) Height() float64 + func (c *Context) LineTo(x, y float64) + func (c *Context) MoveTo(x, y float64) + func (c *Context) Pop() + func (c *Context) Pos() (float64, float64) + func (c *Context) Push() + func (c *Context) QuadTo(cpx, cpy, x, y float64) + func (c *Context) ReflectX() + func (c *Context) ReflectXAbout(x float64) + func (c *Context) ReflectY() + func (c *Context) ReflectYAbout(y float64) + func (c *Context) ResetStyle() + func (c *Context) ResetView() + func (c *Context) Rotate(rot float64) + func (c *Context) RotateAbout(rot, x, y float64) + func (c *Context) Scale(sx, sy float64) + func (c *Context) ScaleAbout(sx, sy, x, y float64) + func (c *Context) SetCoordRect(rect Rect, width, height float64) + func (c *Context) SetCoordSystem(coordSystem CoordSystem) + func (c *Context) SetCoordView(coordView Matrix) + func (c *Context) SetDashes(offset float64, dashes ...float64) + func (c *Context) SetFillColor(col color.Color) + func (c *Context) SetFillRule(rule FillRule) + func (c *Context) SetStrokeCapper(capper Capper) + func (c *Context) SetStrokeColor(col color.Color) + func (c *Context) SetStrokeJoiner(joiner Joiner) + func (c *Context) SetStrokeWidth(width float64) + func (c *Context) SetView(view Matrix) + func (c *Context) SetZIndex(zindex int) + func (c *Context) Shear(sx, sy float64) + func (c *Context) ShearAbout(sx, sy, x, y float64) + func (c *Context) Stroke() + func (c *Context) Translate(x, y float64) + func (c *Context) View() Matrix + func (c *Context) Width() float64 + type CoordSystem int + const CartesianI + const CartesianII + const CartesianIII + const CartesianIV + type FillRule int + const EvenOdd + const NonZero + type Font struct + func (f *Font) Destroy() + func (f *Font) Name() string + func (f *Font) SetFeatures(features string) + func (f *Font) SetVariations(variations string) + func (f *Font) Style() FontStyle + func (f *Font) SubsetID(glyphID uint16) uint16 + func (f *Font) SubsetIDs() []uint16 + type FontDecorator interface + Decorate func(*FontFace, float64) *Path + var FontDashedUnderline FontDecorator = dashedUnderline{} + var FontDottedUnderline FontDecorator = dottedUnderline{} + var FontDoubleUnderline FontDecorator = doubleUnderline{} + var FontOverline FontDecorator = overline{} + var FontSawtoothUnderline FontDecorator = sawtoothUnderline{} + var FontSineUnderline FontDecorator = sineUnderline{} + var FontStrikethrough FontDecorator = strikethrough{} + var FontUnderline FontDecorator = underline{} + var FontWavyUnderline FontDecorator = wavyUnderline{} + type FontFace struct + Color color.RGBA + Deco []FontDecorator + Direction text.Direction + FauxBold float64 + FauxItalic float64 + Font *Font + Language string + Script text.Script + Size float64 + Style FontStyle + Variant FontVariant + XOffset int32 + YOffset int32 + func (face *FontFace) Decorate(width float64) *Path + func (face *FontFace) Equals(other *FontFace) bool + func (face *FontFace) HasDecoration() bool + func (face *FontFace) Metrics() FontMetrics + func (face *FontFace) Name() string + func (face *FontFace) PPEM(resolution Resolution) uint16 + func (face *FontFace) TextWidth(s string) float64 + func (face *FontFace) ToPath(s string) (*Path, float64, error) + type FontFamily struct + func NewFontFamily(name string) *FontFamily + func (family *FontFamily) Destroy() + func (family *FontFamily) Face(size float64, col color.Color, style FontStyle, variant FontVariant, ...) *FontFace + func (family *FontFamily) FindLocalFont(name string, style FontStyle) string + func (family *FontFamily) LoadFont(b []byte, index int, style FontStyle) error + func (family *FontFamily) LoadFontCollection(filename string, index int, style FontStyle) error + func (family *FontFamily) LoadFontFile(filename string, style FontStyle) error + func (family *FontFamily) LoadLocalFont(name string, style FontStyle) error + func (family *FontFamily) Name() string + func (family *FontFamily) SetFeatures(features string) + func (family *FontFamily) SetVariations(variations string) + type FontMetrics struct + Ascent float64 + CapHeight float64 + Descent float64 + LineGap float64 + LineHeight float64 + XHeight float64 + XMax float64 + XMin float64 + YMax float64 + YMin float64 + func (m FontMetrics) String() string + type FontStyle int + const FontBlack + const FontBold + const FontBook + const FontExtraBlack + const FontExtraLight + const FontItalic + const FontLight + const FontMedium + const FontRegular + const FontSemibold + func (style FontStyle) CSS() int + func (style FontStyle) Italic() bool + func (style FontStyle) Weight() FontStyle + type FontVariant int + const FontNormal + const FontSmallcaps + const FontSubscript + const FontSuperscript + type GammaColorSpace struct + Gamma float64 + func (cs GammaColorSpace) FromLinear(col color.Color) color.RGBA + func (cs GammaColorSpace) ToLinear(col color.Color) color.RGBA + type Image struct + Bytes []byte + Mimetype string + func NewJPEGImage(r io.Reader) (Image, error) + func NewPNGImage(r io.Reader) (Image, error) + type ImageEncoding int + const Lossless + const Lossy + type Joiner interface + Join func(*Path, *Path, float64, Point, Point, Point, float64, float64) + var ArcsJoin Joiner = ArcsJoiner{ ... } + var BevelJoin Joiner = BevelJoiner{} + var MiterJoin Joiner = MiterJoiner{ ... } + var RoundJoin Joiner = RoundJoiner{} + func ArcsClipJoin(gapJoiner Joiner, limit float64) Joiner + func MiterClipJoin(gapJoiner Joiner, limit float64) Joiner + type LinearColorSpace struct + func (LinearColorSpace) FromLinear(col color.Color) color.RGBA + func (LinearColorSpace) ToLinear(col color.Color) color.RGBA + type Matrix [2][3]float64 + func (m Matrix) Decompose() (float64, float64, float64, float64, float64, float64) + func (m Matrix) Det() float64 + func (m Matrix) Dot(p Point) Point + func (m Matrix) Eigen() (float64, float64, Point, Point) + func (m Matrix) Equals(q Matrix) bool + func (m Matrix) Inv() Matrix + func (m Matrix) IsRigid() bool + func (m Matrix) IsSimilarity() bool + func (m Matrix) IsTranslation() bool + func (m Matrix) Mul(q Matrix) Matrix + func (m Matrix) Pos() (float64, float64) + func (m Matrix) ReflectX() Matrix + func (m Matrix) ReflectXAbout(x float64) Matrix + func (m Matrix) ReflectY() Matrix + func (m Matrix) ReflectYAbout(y float64) Matrix + func (m Matrix) Rotate(rot float64) Matrix + func (m Matrix) RotateAbout(rot, x, y float64) Matrix + func (m Matrix) Scale(sx, sy float64) Matrix + func (m Matrix) ScaleAbout(sx, sy, x, y float64) Matrix + func (m Matrix) Shear(sx, sy float64) Matrix + func (m Matrix) ShearAbout(sx, sy, x, y float64) Matrix + func (m Matrix) String() string + func (m Matrix) T() Matrix + func (m Matrix) ToSVG(h float64) string + func (m Matrix) Translate(x, y float64) Matrix + type MiterJoiner struct + GapJoiner Joiner + Limit float64 + func (j MiterJoiner) Join(rhs, lhs *Path, halfWidth float64, pivot, n0, n1 Point, r0, r1 float64) + func (j MiterJoiner) String() string + type Path struct + func Arc(r, theta0, theta1 float64) *Path + func BeveledRectangle(w, h, r float64) *Path + func Circle(r float64) *Path + func Ellipse(rx, ry float64) *Path + func EllipticalArc(rx, ry, rot, theta0, theta1 float64) *Path + func Grid(w, h float64, nx, ny int, r float64) *Path + func Line(x, y float64) *Path + func MustParseSVG(s string) *Path + func ParseLaTeX(s string) (*Path, error) + func ParseSVG(s string) (*Path, error) + func Rectangle(w, h float64) *Path + func RegularPolygon(n int, r float64, up bool) *Path + func RegularStarPolygon(n, d int, r float64, up bool) *Path + func RoundedRectangle(w, h, r float64) *Path + func StarPolygon(n int, R, r float64, up bool) *Path + func (p *Path) And(q *Path) *Path + func (p *Path) Append(q *Path) *Path + func (p *Path) Arc(rx, ry, rot, theta0, theta1 float64) + func (p *Path) ArcTo(rx, ry, rot float64, large, sweep bool, x, y float64) + func (p *Path) Bounds() Rect + func (p *Path) CCW() bool + func (p *Path) Close() + func (p *Path) Closed() bool + func (p *Path) Coords() []Point + func (p *Path) Copy() *Path + func (p *Path) CubeTo(cpx1, cpy1, cpx2, cpy2, x, y float64) + func (p *Path) Cut(q *Path) []*Path + func (p *Path) Dash(offset float64, d ...float64) *Path + func (p *Path) Div(q *Path) []*Path + func (p *Path) Empty() bool + func (p *Path) Equals(q *Path) bool + func (p *Path) Filling(fillRule FillRule) []bool + func (p *Path) Flatten() *Path + func (p *Path) Interior(x, y float64, fillRule FillRule) bool + func (p *Path) Intersections(q *Path) intersections + func (p *Path) Iterate(move func(Point, Point), line func(Point, Point), ...) + func (p *Path) Join(q *Path) *Path + func (p *Path) Length() float64 + func (p *Path) LineTo(x, y float64) + func (p *Path) Markers(first, mid, last *Path, align bool) []*Path + func (p *Path) MoveTo(x, y float64) + func (p *Path) Not(q *Path) *Path + func (p *Path) Offset(w float64, fillRule FillRule) *Path + func (p *Path) Or(q *Path) *Path + func (p *Path) Pos() Point + func (p *Path) QuadTo(cpx, cpy, x, y float64) + func (p *Path) ReplaceArcs() *Path + func (p *Path) Reverse() *Path + func (p *Path) Segments() []Segment + func (p *Path) Split() []*Path + func (p *Path) SplitAt(ts ...float64) []*Path + func (p *Path) StartPos() Point + func (p *Path) String() string + func (p *Path) Stroke(w float64, cr Capper, jr Joiner) *Path + func (p *Path) Tile(n, m int, tiler Tiler) *Path + func (p *Path) ToPDF() string + func (p *Path) ToPS() string + func (p *Path) ToRasterizer(ras *vector.Rasterizer, resolution Resolution) + func (p *Path) ToSVG() string + func (p *Path) Transform(m Matrix) *Path + func (p *Path) Translate(x, y float64) *Path + func (p *Path) Triangulate() ([][3]Point, [][5]Point) + func (p *Path) Xor(q *Path) *Path + type Point struct + X float64 + Y float64 + func EllipsePos(rx, ry, phi, cx, cy, theta float64) Point + func (p Point) Add(q Point) Point + func (p Point) Angle() float64 + func (p Point) AngleBetween(q Point) float64 + func (p Point) Div(f float64) Point + func (p Point) Dot(q Point) float64 + func (p Point) Equals(q Point) bool + func (p Point) Interpolate(q Point, t float64) Point + func (p Point) IsZero() bool + func (p Point) Length() float64 + func (p Point) Mul(f float64) Point + func (p Point) Neg() Point + func (p Point) Norm(length float64) Point + func (p Point) PerpDot(q Point) float64 + func (p Point) Rot(phi float64, p0 Point) Point + func (p Point) Rot90CCW() Point + func (p Point) Rot90CW() Point + func (p Point) Slope() float64 + func (p Point) String() string + func (p Point) Sub(q Point) Point + type Polyline struct + func PolylineFromPath(p *Path) *Polyline + func PolylineFromPathCoords(p *Path) *Polyline + func (p *Polyline) Add(x, y float64) *Polyline + func (p *Polyline) Coords() []Point + func (p *Polyline) FillCount(x, y float64) int + func (p *Polyline) Interior(x, y float64, fillRule FillRule) bool + func (p *Polyline) Smoothen() *Path + func (p *Polyline) ToPath() *Path + type Rect struct + H float64 + W float64 + X float64 + Y float64 + func (r Rect) Add(q Rect) Rect + func (r Rect) Equals(q Rect) bool + func (r Rect) Move(p Point) Rect + func (r Rect) String() string + func (r Rect) ToPath() *Path + func (r Rect) Transform(m Matrix) Rect + type Renderer interface + RenderImage func(img image.Image, m Matrix) + RenderPath func(path *Path, style Style, m Matrix) + RenderText func(text *Text, m Matrix) + Size func() (float64, float64) + type Resolution float64 + func DPI(dpi float64) Resolution + func DPMM(dpmm float64) Resolution + func (res Resolution) DPI() float64 + func (res Resolution) DPMM() float64 + type RichText struct + func NewRichText(face *FontFace) *RichText + func (rt *RichText) Add(face *FontFace, text string) *RichText + func (rt *RichText) Reset() + func (rt *RichText) SetFace(face *FontFace) + func (rt *RichText) SetFaceSpan(face *FontFace, start, end int) + func (rt *RichText) SetWritingMode(mode WritingMode) + func (rt *RichText) ToText(width, height float64, halign, valign TextAlign, indent, lineStretch float64) *Text + type RoundCapper struct + func (RoundCapper) Cap(p *Path, halfWidth float64, pivot, n0 Point) + func (RoundCapper) String() string + type RoundJoiner struct + func (RoundJoiner) Join(rhs, lhs *Path, halfWidth float64, pivot, n0, n1 Point, r0, r1 float64) + func (RoundJoiner) String() string + type SRGBColorSpace struct + func (SRGBColorSpace) FromLinear(col color.Color) color.RGBA + func (SRGBColorSpace) ToLinear(col color.Color) color.RGBA + type Segment struct + Cmd float64 + End Point + Start Point + func (seg Segment) Arc() (float64, float64, float64, bool, bool) + func (seg Segment) CP1() Point + func (seg Segment) CP2() Point + type Size struct + H float64 + W float64 + type SquareCapper struct + func (SquareCapper) Cap(p *Path, halfWidth float64, pivot, n0 Point) + func (SquareCapper) String() string + type Style struct + DashOffset float64 + Dashes []float64 + FillColor color.RGBA + StrokeCapper Capper + StrokeColor color.RGBA + StrokeJoiner Joiner + StrokeWidth float64 + func (style Style) HasFill() bool + func (style Style) HasStroke() bool + func (style Style) IsDashed() bool + type Text struct + Face *FontFace + Mode WritingMode + func NewTextBox(face *FontFace, s string, width, height float64, halign, valign TextAlign, ...) *Text + func NewTextLine(face *FontFace, s string, halign TextAlign) *Text + func (t *Text) Bounds() Rect + func (t *Text) Empty() bool + func (t *Text) Fonts() []*Font + func (t *Text) Heights() (float64, float64) + func (t *Text) OutlineBounds() Rect + func (t *Text) RenderAsPath(r Renderer, m Matrix, resolution Resolution) + func (t *Text) WalkDecorations(callback func(col color.RGBA, deco *Path)) + func (t *Text) WalkSpans(callback func(x, y float64, span TextSpan)) + type TextAlign int + const Bottom + const Center + const Justify + const Left + const Right + const Top + func (ta TextAlign) String() string + type TextSpan struct + Direction canvasText.Direction + Face *FontFace + Glyphs []canvasText.Glyph + Text string + Width float64 + type Tiler struct + A Point + B Point + Ms []Matrix + func P1(x, y, rot float64) Tiler + func Pg(x, y float64) Tiler + func Pm(x, y float64) Tiler + type Writer func(w io.Writer, c *Canvas) error + type WritingMode int + const HorizontalTB + const VerticalLR + const VerticalRL + func (wm WritingMode) String() string