func init // adds using namespace sys.add_use('Svg') sys.add_use('Svg.Transforms') // adds assembly sys.add_assembly('Svg', 'Svg.dll') // add object sys.add_object(this.codename, 'SvgDocument') // makes implementation methods for properties sys._prop_init('ExternalCSSHref', 1, 0, 2) sys._prop_init('Ppi', 1, 0, 1) // *onClick=Occurs when the element is clicked. ARG(MouseArg)|2|0 // *onMouseDown=Occurs when the mouse pointer is over the element and a mouse button is pressed. ARG(MouseArg)|2|0 // *onMouseMove=Occurs when the mouse pointer is moved over the element. ARG(MouseArg)|2|0 // *onMouseOut=Occurs when the mouse pointer leaves the element. ARG(MouseArg)|2|0 // *onMouseOver=Occurs when the mouse pointer rests on the element. ARG(MouseArg)|2|0 // *onMouseScroll=Occurs when the mouse wheel moves while the element has focus. ARG(MouseArg)|2|0 // *onMouseUp=Occurs when the mouse pointer is over the element and a mouse button is released. ARG(MouseArg)|2|0 // makes implementation of methods as properties sys._mtd_as_prop_init('SvgDocument') // initialize events sys.event_imp('onClick', '', '', '', 'Object sender, MouseArg args') sys.event_add('onClick', 'EventHandler') sys.event_imp('onMouseScroll', '', '', '', 'Object sender, MouseScrollArg args') sys.event_add('onMouseScroll', 'EventHandler') end func doOpen(data) blk.println(this.codename, ' = SvgDocument.Open(', d("FileName"), ');') end func doDraw(data) event('onDraw', this.codename + '.Draw()') end func doDraw2(data) blk.println(this.codename, '.Draw(', d("graphics"), ');') end func doDraw3(data) blk.println(this.codename, '.Draw(', d("bitmap"), ');') end func doExternalCSSHref(data) blk.println(this.codename, '.ExternalCSSHref = ', sys.to_type(args.data, 2), ';') end func doPpi(data) blk.println(this.codename, '.Ppi = ', sys.to_type(args.data, 1), ';') end func doScale(data) blk.println(this.codename, '.Transforms.Clear();') .println(this.codename, '.Transforms.Add(new SvgScale(', d("scale"), '));') end