wxMaxima
Public Member Functions | Static Public Member Functions | List of all members
SvgBitmap Class Reference

#include <SvgBitmap.h>

Inheritance diagram for SvgBitmap:
Inheritance graph
[legend]
Collaboration diagram for SvgBitmap:
Collaboration graph
[legend]

Public Member Functions

 SvgBitmap (const unsigned char *data, size_t len, int width=640, int height=480, int scaleFactor=1)
 A constructor that loads the data into a wxBitmap.
 
 SvgBitmap (const unsigned char *data, size_t len, wxSize siz, int scaleFactor=1)
 
 SvgBitmap (SvgBitmap &&)=delete
 
SvgBitmapoperator= (SvgBitmap &&o)
 
const SvgBitmapSetSize (int width, int height)
 Sets the bitmap to a new size and renders the svg image at this size.
 
const SvgBitmapSetSize (wxSize siz)
 Sets the bitmap to a new size and renders the svg image at this size.
 
wxSize GetOriginalSize () const
 Gets the original size of the svg image.
 

Static Public Member Functions

static wxBitmap RGBA2wxBitmap (const unsigned char imgdata[], const int &width, const int &height, const int &scaleFactor=1)
 Converts rgba data to a wxBitmap.
 
static wxBitmap GetInvalidBitmap (int targetSize)
 

Detailed Description

A wxBitmap with a constructor that generates the image from SVG.

Member Function Documentation

◆ GetInvalidBitmap()

wxBitmap SvgBitmap::GetInvalidBitmap ( int  targetSize)
static

An "invalid bitmap" sign

We should make the image static and generate it on start-up so whenever we need it it already would be available as a refcounted object and therefore be likely to be available even if the problem was a failing malloc(). But with wx3.0 gtk crashes in this case.


The documentation for this class was generated from the following files: