wxMaxima
Loading...
Searching...
No Matches
Public Member Functions
BitmapOut Class Referencefinal

Renders portions of the work sheet (including 2D maths) as bitmap. More...

#include <BitmapOut.h>

Public Member Functions

 BitmapOut (const Configuration *const *configuration, double scale=1)
 The constructor.
 
 BitmapOut (const Configuration *const *configuration, std::unique_ptr< Cell > &&tree, double scale=1, long maxSize=-1)
 Constructs and renders the bitmap, setting the IsOK() status accordingly.
 
bool Render (std::unique_ptr< Cell > &&tree, long int maxSize=-1)
 Renders tree as bitmap.
 
bool IsOk () const
 Returns whether the tree rendering succeeded.
 
wxSize ToFile (const wxString &file)
 Exports this bitmap to a file.
 
wxBitmap GetBitmap () const
 Returns the bitmap representation of the list of cells that was passed to SetData()
 
std::unique_ptr< wxBitmapDataObject > GetDataObject () const
 
bool ToClipboard () const
 Copies the bitmap representation of the list of cells that was passed to SetData()
 

Detailed Description

Renders portions of the work sheet (including 2D maths) as bitmap.

This is used for exporting HTML with embedded maths as bitmap and for putting bitmaps for the clipboard

Constructor & Destructor Documentation

◆ BitmapOut()

BitmapOut::BitmapOut ( const Configuration *const *  configuration,
double  scale = 1 
)
explicit

The constructor.

Parameters
scaleBy which factor the resolution should be increased in respect to the default 755 DPI?
configurationA pointer to the pointer to this worksheet's configuration storage

Member Function Documentation

◆ Render()

bool BitmapOut::Render ( std::unique_ptr< Cell > &&  tree,
long int  maxSize = -1 
)

Renders tree as bitmap.

Parameters
treeThe list of cells that is to be rendered
maxSizemaxSize tells the maximum size [in square pixels] that will be rendered. -1 means: No limit.
Returns
true, if the bitmap could be created.

◆ ToFile()

wxSize BitmapOut::ToFile ( const wxString &  file)

Exports this bitmap to a file.

Returns
The size of the bitmap in millimeters. Sizes <0 indicate that the export has failed.

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