wxWidgets: wxSVGBitmapFileHandler Class Reference

| Version: 3.1.5

Loading...
Searching...
No Matches
Public Member Functions | List of all members
wxSVGBitmapFileHandler Class Reference
Class List by Category » Device Contexts

`#include </cygdrive/c/Users/Hamis/Cygwin-packaging/wxWidgets3.1/wxWidgets3.1-3.1.5-4.x86_64/src/wxWidgets-3.1.5/interface/wx/dcsvg.h>`

Inheritance diagram for wxSVGBitmapFileHandler:
[legend]

## Detailed Description

Handler saving bitmaps to external PNG files and linking to it from the SVG.

This handler is used by default by wxSVGFileDC. PNG files are created in the same folder as the SVG file and are named using the SVG filename appended with _image#.png.

When using wxSVGFileDC::SetBitmapHandler() to set this handler with the default constructor, the PNG files are created in the runtime location of the application. The save location can be customized by using the wxSVGBitmapFileHandler(const wxFileName&) constructor.

See also
  wxSVGFileDC::SetBitmapHandler().

##

Library: wxCore

<>< =''>:</>&;&;< =''>\ </></>

Since
  3.1.0

## Public Member Functions
| wxSVGBitmapFileHandler (const wxFileName &path)
| Create a wxSVGBitmapFileHandler and specify the location where the file will be saved.
virtual bool | ProcessBitmap (const wxBitmap &bitmap, wxCoord x, wxCoord y, wxOutputStream &stream) const
| Writes the bitmap representation as SVG to the given stream.

## Constructor & Destructor Documentation

## ◆ wxSVGBitmapFileHandler()

wxSVGBitmapFileHandler::wxSVGBitmapFileHandler | ( | const wxFileName & | path | ) |

Create a wxSVGBitmapFileHandler and specify the location where the file will be saved.

Parameters

  path | The path of the save location. If path contains a filename, the autogenerated filename will be appended to this name.

Since
  3.1.3

## Member Function Documentation

## ◆ ProcessBitmap()

virtual bool wxSVGBitmapFileHandler::ProcessBitmap | ( | const wxBitmap & | bitmap,
|  | wxCoord | x,
|  | wxCoord | y,
|  | wxOutputStream & | stream ) const
| virtual

Writes the bitmap representation as SVG to the given stream.

The XML generated by this function will be inserted into the SVG file inline with the XML generated by the main wxSVGFileDC class so it is important that the XML is properly formed.

Parameters

  bitmap | A valid bitmap to add to SVG.
  x | Horizontal position of the bitmap.
  y | Vertical position of the bitmap.
  stream | The stream to write SVG contents to.

Implements wxSVGBitmapHandler.