LibSVG-1.0

This project has become inactive.

This project is inactive and its default file will likely not work with the most recent version of World of Warcraft. The author may have abandoned it, or it may have outlived its usefulness.

Render test: WoW Logo

LibSVG is a library for rendering and, to some extent, manipulation of Scalable Vector Graphics in WoW. If you're just interested in trying out LibSVG without having to implement it in an addon first, try RenderMon!

Element support:

  • Objects:
    • rect
    • circle
    • ellipse
    • polygon
    • polyline
    • line (via polyline)
    • path (A/a, C/c, L/l, M/m, S/s, Q/q, Z/z)
  • Transformations
    • Matrix(a,b,c,d,e,f)
    • Translate(x[, y])
    • Scale(x[, y])
    • Rotate(angle[, cx, cy])
    • SkewX(angle)
    • SkewY(angle)
  • Styles:
    • stroke (name of color or #rgb, #rrggbb, rgb(rrr,ggg,bbb) )
    • stroke-width (in pixels)
    • stroke-opacity
    • fill (name of color or #rgb, #rrggbb, rgb(rrr,ggg,bbb) )
    • fill-opacity
    • linear gradients (only basic support)

Usage

local libsvg = LibStub("LibSVG-1.0");
local myImage = libsvg:New();
myImage:Parse("xml data as a string");
-- or you could use:
-- local xml = LibXML:Import("xml data here");
-- myImage:Parse(xml);
myImage:Compile(); -- Compiles the SVG into texture commands for drawing
local frame = myImage:Render(); -- Renders the compiled image and returns the canvas frame.

You must login to post a comment. Don't have an account? Register to get one!

  • 1 comment
  • Avatar of smariot smariot Nov 11, 2010 at 23:33 UTC - 0 likes

    Well, I'm impressed. I often wished WoW's textures supported vector drawing commands, and this looks nearly as capable.

  • 1 comment

Table of contents

  1. 1 Element support:
  2. 2 Usage

Facts

Date created
Sep 24, 2010
Categories
Last update
Nov 05, 2013
Development stage
Inactive
License
Apache License version 2.0
Downloads
170
Recent files
  • A: r51 for 5.4.1 Nov 05, 2013
  • A: r50 for 4.0.1 Oct 21, 2010
  • A: r49 for 4.0.1 Oct 04, 2010
  • A: r48 for 4.0.1 Oct 02, 2010
  • A: r47 for 4.0.1 Oct 02, 2010

Authors

Relationships

Embedded library
LibStub
LibXML-1.0