Table Of Contents

Previous topic

ResourceCat

Next topic

ScreenDC

This Page

phoenix_title SVGFileDC

A SVGFileDC is a device context onto which graphics and text can be drawn, and the output produced as a vector file, in SVG format (see the W3C SVG Specifications <http://www.w3.org/TR/2001/REC-SVG-20010904/>).

This format can be read by a range of programs, including a Netscape plugin (Adobe), full details are given in the SVG Implementation and Resource Directory <http://www.svgi.org/>. Vector formats may often be smaller than raster formats.

The intention behind SVGFileDC is that it can be used to produce a file corresponding to the screen display context, SVGFileDC, by passing the SVGFileDC as a parameter instead of a SVGFileDC. Thus the SVGFileDC is a write-only class.

As the SVGFileDC is a vector format, raster operations like GetPixel are unlikely to be supported. However, the SVG specification allows for PNG format raster files to be embedded in the SVG, and so bitmaps, icons and blit operations in SVGFileDC are supported.

A more substantial SVG library (for reading and writing) is available at the Art2D website <http://wxart2d.sourceforge.net/>.


class_hierarchy Inheritance Diagram

Inheritance diagram for class SVGFileDC

Inheritance diagram of SVGFileDC


method_summary Methods Summary

__init__ Initializes a SVGFileDC with the given f filename with the given Width and Height at dpi resolution.
Clear This makes no sense in SVGFileDC and does nothing.
CrossHair Functions not implemented in this DC class.
DestroyClippingRegion Functions not implemented in this DC class.
EndDoc Does nothing.
EndPage Does nothing.
FloodFill Functions not implemented in this DC class.
GetClippingBox Functions not implemented in this DC class.
GetPixel Functions not implemented in this DC class.
SetClippingRegion Functions not implemented in this DC class.
SetLogicalFunction Does the same as DC.SetLogicalFunction , except that only COPY is available.
SetPalette Functions not implemented in this DC class.
StartDoc Functions not implemented in this DC class.

api Class API



class SVGFileDC(DC)

A SVGFileDC is a device context onto which graphics and text can be drawn, and the output produced as a vector file, in SVG format (see the W3C SVG Specifications <http://www.w3.org/TR/2001/REC-SVG-20010904/>).

Possible constructors:

SVGFileDC(filename, width=320, height=240, dpi=72)

Methods



__init__(self, filename, width=320, height=240, dpi=72)

Initializes a SVGFileDC with the given f filename with the given Width and Height at dpi resolution.

Parameters:
  • filename (string) –
  • width (int) –
  • height (int) –
  • dpi (float) –


Clear(self)

This makes no sense in SVGFileDC and does nothing.



CrossHair(self, x, y)

Functions not implemented in this DC class.

Parameters:
  • x (int) –
  • y (int) –


DestroyClippingRegion(self)

Functions not implemented in this DC class.



EndDoc(self)

Does nothing.



EndPage(self)

Does nothing.



FloodFill(self, x, y, colour, style=FLOOD_SURFACE)

Functions not implemented in this DC class.

Parameters:
Return type:

bool



GetClippingBox(self, x, y, width, height)

Functions not implemented in this DC class.

Parameters:
  • x (int) –
  • y (int) –
  • width (int) –
  • height (int) –


GetPixel(self, x, y, colour)

Functions not implemented in this DC class.

Parameters:
  • x (int) –
  • y (int) –
  • colour (Colour) –
Return type:

bool



SetClippingRegion(self, *args, **kw)

Functions not implemented in this DC class.


overload Overloaded Implementations:



SetClippingRegion (self, x, y, width, height)

Parameters:
  • x (int) –
  • y (int) –
  • width (int) –
  • height (int) –



SetClippingRegion (self, pt, sz)

Parameters:



SetClippingRegion (self, rect)

Parameters:rect (Rect) –



SetClippingRegion (self, region)

Parameters:region (Region) –





SetLogicalFunction(self, function)

Does the same as DC.SetLogicalFunction , except that only COPY is available.

Trying to set one of the other values will fail.

Parameters:function (RasterOperationMode) –


SetPalette(self, palette)

Functions not implemented in this DC class.

Parameters:palette (Palette) –


StartDoc(self, message)

Functions not implemented in this DC class.

Parameters:message (string) –
Return type:bool