KiCad PCB EDA Suite
mpBitmapLayer Class Reference

This virtual class represents objects that can be moved to an arbitrary 2D location+rotation. More...

#include <mathplot.h>

Inheritance diagram for mpBitmapLayer:
mpLayer

Public Member Functions

 mpBitmapLayer ()
 Default constructor. More...
 
virtual ~mpBitmapLayer ()
 
void GetBitmapCopy (wxImage &outBmp) const
 Returns a copy of the current bitmap assigned to the layer. More...
 
void SetBitmap (const wxImage &inBmp, double x, double y, double lx, double ly)
 Change the bitmap associated with the layer (to update the screen, refresh the mpWindow). More...
 
virtual bool HasBBox () override
 Check whether this layer has a bounding box. More...
 
virtual double GetMinX () override
 Get inclusive left border of bounding box. More...
 
virtual double GetMaxX () override
 Get inclusive right border of bounding box. More...
 
virtual double GetMinY () override
 Get inclusive bottom border of bounding box. More...
 
virtual double GetMaxY () override
 Get inclusive top border of bounding box. More...
 
virtual void Plot (wxDC &dc, mpWindow &w) override
 Plot given view of layer to the given device context. More...
 
void SetAlign (int align)
 Set label axis alignment. More...
 
virtual bool IsInfo ()
 Check whether the layer is an info box. More...
 
const wxString & GetName () const
 Get layer name. More...
 
const wxFont & GetFont () const
 Get font set for this layer. More...
 
const wxPen & GetPen () const
 Get pen set for this layer. More...
 
void SetContinuity (bool continuity)
 Set the 'continuity' property of the layer (true:draws a continuous line, false:draws separate points). More...
 
bool GetContinuity () const
 Gets the 'continuity' property of the layer. More...
 
void ShowName (bool show)
 Shows or hides the text label with the name of the layer (default is visible). More...
 
void SetName (wxString name)
 Set layer name. More...
 
void SetFont (wxFont &font)
 Set layer font. More...
 
void SetPen (wxPen pen)
 Set layer pen. More...
 
void SetDrawOutsideMargins (bool drawModeOutside)
 Set Draw mode: inside or outside margins. More...
 
bool GetDrawOutsideMargins ()
 Get Draw mode: inside or outside margins. More...
 
wxBitmap GetColourSquare (int side=16)
 Get a small square bitmap filled with the colour of the pen used in the layer. More...
 
mpLayerType GetLayerType ()
 Get layer type: a Layer can be of different types: plot lines, axis, info boxes, etc, this method returns the right value. More...
 
bool IsVisible ()
 Checks whether the layer is visible or not. More...
 
void SetVisible (bool show)
 Sets layer visibility. More...
 
const wxBrush & GetBrush () const
 Get brush set for this layer. More...
 
void SetBrush (wxBrush brush)
 Set layer brush. More...
 

Protected Attributes

int m_flags
 
wxImage m_bitmap
 The internal copy of the Bitmap: More...
 
wxBitmap m_scaledBitmap
 
wxCoord m_scaledBitmap_offset_x
 
wxCoord m_scaledBitmap_offset_y
 
bool m_validImg
 
double m_min_x
 The shape of the bitmap: More...
 
double m_max_x
 
double m_min_y
 
double m_max_y
 
wxFont m_font
 
wxPen m_pen
 
wxBrush m_brush
 
wxString m_name
 
bool m_continuous
 
bool m_showName
 
bool m_drawOutsideMargins
 
mpLayerType m_type
 
bool m_visible
 

Detailed Description

This virtual class represents objects that can be moved to an arbitrary 2D location+rotation.

The current transformation is set through SetCoordinateBase. To ease the implementation of descendent classes, mpMovableObject will be in charge of Bounding Box computation and layer render, assuming that the object updates its shape in m_shape_xs & m_shape_ys.

Definition at line 1919 of file mathplot.h.

Constructor & Destructor Documentation

mpBitmapLayer::mpBitmapLayer ( )
inline

Default constructor.

Definition at line 1924 of file mathplot.h.

References mpLAYER_BITMAP.

1925  {
1926  m_min_x = m_max_x =
1927  m_min_y = m_max_y = 0;
1928  m_validImg = false;
1930  }
double m_max_y
Definition: mathplot.h:1985
double m_min_y
Definition: mathplot.h:1985
double m_max_x
Definition: mathplot.h:1985
bool m_validImg
Definition: mathplot.h:1981
mpLayerType m_type
Definition: mathplot.h:320
double m_min_x
The shape of the bitmap:
Definition: mathplot.h:1985
virtual mpBitmapLayer::~mpBitmapLayer ( )
inlinevirtual

Definition at line 1932 of file mathplot.h.

1932 {};

Member Function Documentation

void mpBitmapLayer::GetBitmapCopy ( wxImage &  outBmp) const

Returns a copy of the current bitmap assigned to the layer.

Definition at line 3896 of file mathplot.cpp.

3897 {
3898  if( m_validImg )
3899  outBmp = m_bitmap;
3900 }
bool m_validImg
Definition: mathplot.h:1981
wxImage m_bitmap
The internal copy of the Bitmap:
Definition: mathplot.h:1977
const wxBrush& mpLayer::GetBrush ( ) const
inlineinherited

Get brush set for this layer.

Returns
brush.

Definition at line 305 of file mathplot.h.

305 { return m_brush; };
wxBrush m_brush
Definition: mathplot.h:315
wxBitmap mpLayer::GetColourSquare ( int  side = 16)
inherited

Get a small square bitmap filled with the colour of the pen used in the layer.

Useful to create legends or similar reference to the layers.

Parameters
sideside length in pixels
Returns
a wxBitmap filled with layer's colour

Definition at line 83 of file mathplot.cpp.

References mpLayer::m_pen.

84 {
85  wxBitmap square( side, side, -1 );
86  wxColour filler = m_pen.GetColour();
87  wxBrush brush( filler, wxBRUSHSTYLE_SOLID );
88  wxMemoryDC dc;
89 
90  dc.SelectObject( square );
91  dc.SetBackground( brush );
92  dc.Clear();
93  dc.SelectObject( wxNullBitmap );
94  return square;
95 }
wxPen m_pen
Definition: mathplot.h:314
bool mpLayer::GetContinuity ( ) const
inlineinherited

Gets the 'continuity' property of the layer.

See also
SetContinuity

Definition at line 257 of file mathplot.h.

257 { return m_continuous; }
bool m_continuous
Definition: mathplot.h:317
bool mpLayer::GetDrawOutsideMargins ( )
inlineinherited

Get Draw mode: inside or outside margins.

Returns
The draw mode

Definition at line 284 of file mathplot.h.

284 { return m_drawOutsideMargins; };
bool m_drawOutsideMargins
Definition: mathplot.h:319
const wxFont& mpLayer::GetFont ( ) const
inlineinherited

Get font set for this layer.

Returns
Font

Definition at line 242 of file mathplot.h.

242 { return m_font; }
wxFont m_font
Definition: mathplot.h:309
mpLayerType mpLayer::GetLayerType ( )
inlineinherited

Get layer type: a Layer can be of different types: plot lines, axis, info boxes, etc, this method returns the right value.

Returns
An integer indicating layer type

Definition at line 293 of file mathplot.h.

Referenced by mpInfoLegend::Plot().

293 { return m_type; };
mpLayerType m_type
Definition: mathplot.h:320
virtual double mpBitmapLayer::GetMaxX ( )
inlineoverridevirtual

Get inclusive right border of bounding box.

Reimplemented from mpLayer.

Definition at line 1955 of file mathplot.h.

1955 { return m_max_x; }
double m_max_x
Definition: mathplot.h:1985
virtual double mpBitmapLayer::GetMaxY ( )
inlineoverridevirtual

Get inclusive top border of bounding box.

Reimplemented from mpLayer.

Definition at line 1963 of file mathplot.h.

1963 { return m_max_y; }
double m_max_y
Definition: mathplot.h:1985
virtual double mpBitmapLayer::GetMinX ( )
inlineoverridevirtual

Get inclusive left border of bounding box.

Reimplemented from mpLayer.

Definition at line 1951 of file mathplot.h.

1951 { return m_min_x; }
double m_min_x
The shape of the bitmap:
Definition: mathplot.h:1985
virtual double mpBitmapLayer::GetMinY ( )
inlineoverridevirtual

Get inclusive bottom border of bounding box.

Reimplemented from mpLayer.

Definition at line 1959 of file mathplot.h.

1959 { return m_min_y; }
double m_min_y
Definition: mathplot.h:1985
const wxString& mpLayer::GetName ( void  ) const
inlineinherited

Get layer name.

Returns
Name

Definition at line 237 of file mathplot.h.

Referenced by mpInfoLegend::Plot(), and mpText::Plot().

237 { return m_name; }
wxString m_name
Definition: mathplot.h:316
const wxPen& mpLayer::GetPen ( ) const
inlineinherited

Get pen set for this layer.

Returns
Pen

Definition at line 247 of file mathplot.h.

Referenced by mpInfoLegend::Plot().

247 { return m_pen; }
wxPen m_pen
Definition: mathplot.h:314
virtual bool mpBitmapLayer::HasBBox ( )
inlineoverridevirtual

Check whether this layer has a bounding box.

The default implementation returns TRUE. Override and return FALSE if your mpLayer implementation should be ignored by the calculation of the global bounding box for all layers in a mpWindow.

Return values
TRUEHas bounding box
FALSEHas not bounding box

Reimplemented from mpLayer.

Definition at line 1947 of file mathplot.h.

1947 { return true; }
virtual bool mpLayer::IsInfo ( )
inlinevirtualinherited

Check whether the layer is an info box.

The default implementation returns FALSE. It is overrided to TRUE for mpInfoLayer class and its derivative. It is necessary to define mouse actions behaviour over info boxes.

Returns
whether the layer is an info boxes
See also
mpInfoLayer::IsInfo

Reimplemented in mpInfoLayer.

Definition at line 169 of file mathplot.h.

169 { return false; };
bool mpLayer::IsVisible ( )
inlineinherited

Checks whether the layer is visible or not.

Returns
true if visible

Definition at line 297 of file mathplot.h.

Referenced by mpWindow::IsLayerVisible(), and mpInfoLegend::Plot().

297 { return m_visible; };
bool m_visible
Definition: mathplot.h:321
void mpBitmapLayer::Plot ( wxDC &  dc,
mpWindow w 
)
overridevirtual

Plot given view of layer to the given device context.

An implementation of this function has to transform layer coordinates to wxDC coordinates based on the view parameters retrievable from the mpWindow passed in w. Note that the public methods of mpWindow: x2p,y2p and p2x,p2y are already provided which transform layer coordinates to DC pixel coordinates, and user code should rely on them for portability and future changes to be applied transparently, instead of implementing the following formulas manually.

The passed device context dc has its coordinate origin set to the top-left corner of the visible area (the default). The coordinate orientation is as shown in the following picture:

(wxDC origin 0,0)
x-------------> ascending X ----------------+
|                                           |
|                                           |
|  V ascending Y                            |
|                                           |
|                                           |
|                                           |
|+------------------------------------------+  <-- right-bottom corner of the mpWindow visible area.

Note that Y ascends in downward direction, whereas the usual vertical orientation for mathematical plots is vice versa. Thus Y-orientation will be swapped usually, when transforming between wxDC and mpLayer coordinates. This change of coordinates is taken into account in the methods p2x,p2y,x2p,y2p.

Rules for transformation between mpLayer and wxDC coordinates

dc_X = (layer_X - mpWindow::GetPosX()) * mpWindow::GetScaleX()
dc_Y = (mpWindow::GetPosY() - layer_Y) * mpWindow::GetScaleY() // swapping Y-orientation
layer_X = (dc_X / mpWindow::GetScaleX()) + mpWindow::GetPosX() // scale guaranteed to be not 0
layer_Y = mpWindow::GetPosY() - (dc_Y / mpWindow::GetScaleY()) // swapping Y-orientation
Parameters
dcDevice context to plot to.
wView to plot. The visible area can be retrieved from this object.
See also
mpWindow::p2x,mpWindow::p2y,mpWindow::x2p,mpWindow::y2p

Implements mpLayer.

Definition at line 3921 of file mathplot.cpp.

References mpWindow::GetPosX(), mpWindow::GetPosY(), mpWindow::GetScaleX(), mpWindow::GetScaleY(), mpWindow::GetScrX(), mpWindow::GetScrY(), mpALIGN_NE, mpALIGN_NW, mpALIGN_SW, mpALIGNMASK, mpWindow::x2p(), and mpWindow::y2p().

3922 {
3923  if( m_visible && m_validImg )
3924  {
3925  /* 1st: We compute (x0,y0)-(x1,y1), the pixel coordinates of the real outer limits
3926  * of the image rectangle within the (screen) mpWindow. Note that these coordinates
3927  * might fall well far away from the real view limits when the user zoom in.
3928  *
3929  * 2nd: We compute (dx0,dy0)-(dx1,dy1), the pixel coordinates the rectangle that will
3930  * be actually drawn into the mpWindow, i.e. the clipped real rectangle that
3931  * avoids the non-visible parts. (offset_x,offset_y) are the pixel coordinates
3932  * that correspond to the window point (dx0,dy0) within the image "m_bitmap", and
3933  * (b_width,b_height) is the size of the bitmap patch that will be drawn.
3934  *
3935  * (x0,y0) ................. (x1,y0)
3936  * . .
3937  * . .
3938  * (x0,y1) ................ (x1,y1)
3939  * (In pixels!!)
3940  */
3941 
3942  // 1st step -------------------------------
3943  wxCoord x0 = w.x2p( m_min_x );
3944  wxCoord y0 = w.y2p( m_max_y );
3945  wxCoord x1 = w.x2p( m_max_x );
3946  wxCoord y1 = w.y2p( m_min_y );
3947 
3948  // 2nd step -------------------------------
3949  // Precompute the size of the actual bitmap pixel on the screen (e.g. will be >1 if zoomed in)
3950  double screenPixelX = ( x1 - x0 ) / (double) m_bitmap.GetWidth();
3951  double screenPixelY = ( y1 - y0 ) / (double) m_bitmap.GetHeight();
3952 
3953  // The minimum number of pixels that the streched image will overpass the actual mpWindow borders:
3954  wxCoord borderMarginX = (wxCoord) (screenPixelX + 1); // ceil
3955  wxCoord borderMarginY = (wxCoord) (screenPixelY + 1); // ceil
3956 
3957  // The actual drawn rectangle (dx0,dy0)-(dx1,dy1) is (x0,y0)-(x1,y1) clipped:
3958  wxCoord dx0 = x0, dx1 = x1, dy0 = y0, dy1 = y1;
3959 
3960  if( dx0<0 )
3961  dx0 = -borderMarginX;
3962 
3963  if( dy0<0 )
3964  dy0 = -borderMarginY;
3965 
3966  if( dx1>w.GetScrX() )
3967  dx1 = w.GetScrX() + borderMarginX;
3968 
3969  if( dy1>w.GetScrY() )
3970  dy1 = w.GetScrY() + borderMarginY;
3971 
3972  // For convenience, compute the width/height of the rectangle to be actually drawn:
3973  wxCoord d_width = dx1 - dx0 + 1;
3974  wxCoord d_height = dy1 - dy0 + 1;
3975 
3976  // Compute the pixel offsets in the internally stored bitmap:
3977  wxCoord offset_x = (wxCoord) ( (dx0 - x0) / screenPixelX );
3978  wxCoord offset_y = (wxCoord) ( (dy0 - y0) / screenPixelY );
3979 
3980  // and the size in pixel of the area to be actually drawn from the internally stored bitmap:
3981  wxCoord b_width = (wxCoord) ( (dx1 - dx0 + 1) / screenPixelX );
3982  wxCoord b_height = (wxCoord) ( (dy1 - dy0 + 1) / screenPixelY );
3983 
3984 #ifdef MATHPLOT_DO_LOGGING
3985  wxLogMessage( "[mpBitmapLayer::Plot] screenPixel: x=%f y=%f d_width=%ix%i",
3986  screenPixelX,
3987  screenPixelY,
3988  d_width,
3989  d_height );
3990  wxLogMessage( "[mpBitmapLayer::Plot] offset: x=%i y=%i bmpWidth=%ix%i",
3991  offset_x,
3992  offset_y,
3993  b_width,
3994  b_height );
3995 #endif
3996 
3997  // Is there any visible region?
3998  if( d_width>0 && d_height>0 )
3999  {
4000  // Build the scaled bitmap from the image, only if it has changed:
4001  if( m_scaledBitmap.GetWidth()!=d_width
4002  || m_scaledBitmap.GetHeight()!=d_height
4003  || m_scaledBitmap_offset_x != offset_x
4004  || m_scaledBitmap_offset_y != offset_y )
4005  {
4006  wxRect r( wxRect( offset_x, offset_y, b_width, b_height ) );
4007 
4008  // Just for the case....
4009  if( r.x<0 )
4010  r.x = 0;
4011 
4012  if( r.y<0 )
4013  r.y = 0;
4014 
4015  if( r.width>m_bitmap.GetWidth() )
4016  r.width = m_bitmap.GetWidth();
4017 
4018  if( r.height>m_bitmap.GetHeight() )
4019  r.height = m_bitmap.GetHeight();
4020 
4021  m_scaledBitmap = wxBitmap(
4022  wxBitmap( m_bitmap ).GetSubBitmap( r ).ConvertToImage()
4023  .Scale( d_width, d_height ) );
4024  m_scaledBitmap_offset_x = offset_x;
4025  m_scaledBitmap_offset_y = offset_y;
4026  }
4027 
4028  // Draw it:
4029  dc.DrawBitmap( m_scaledBitmap, dx0, dy0, true );
4030  }
4031  }
4032 
4033  // Draw the name label
4034  if( !m_name.IsEmpty() && m_showName )
4035  {
4036  dc.SetFont( m_font );
4037 
4038  wxCoord tx, ty;
4039  dc.GetTextExtent( m_name, &tx, &ty );
4040 
4041  if( HasBBox() )
4042  {
4043  wxCoord sx = (wxCoord) ( ( m_max_x - w.GetPosX() ) * w.GetScaleX() );
4044  wxCoord sy = (wxCoord) ( (w.GetPosY() - m_max_y ) * w.GetScaleY() );
4045 
4046  tx = sx - tx - 8;
4047  ty = sy - 8 - ty;
4048  }
4049  else
4050  {
4051  const int sx = w.GetScrX() >> 1;
4052  const int sy = w.GetScrY() >> 1;
4053 
4054  if( (m_flags & mpALIGNMASK) == mpALIGN_NE )
4055  {
4056  tx = sx - tx - 8;
4057  ty = -sy + 8;
4058  }
4059  else if( (m_flags & mpALIGNMASK) == mpALIGN_NW )
4060  {
4061  tx = -sx + 8;
4062  ty = -sy + 8;
4063  }
4064  else if( (m_flags & mpALIGNMASK) == mpALIGN_SW )
4065  {
4066  tx = -sx + 8;
4067  ty = sy - 8 - ty;
4068  }
4069  else
4070  {
4071  tx = sx - tx - 8;
4072  ty = sy - 8 - ty;
4073  }
4074  }
4075 
4076  dc.DrawText( m_name, tx, ty );
4077  }
4078 }
double m_max_y
Definition: mathplot.h:1985
#define mpALIGN_NW
Aligns label to north-west.
Definition: mathplot.h:506
wxBitmap m_scaledBitmap
Definition: mathplot.h:1978
double m_min_y
Definition: mathplot.h:1985
int GetScrY(void) const
Get current view&#39;s Y dimension in device context units.
Definition: mathplot.h:1140
double GetPosY(void) const
Definition: mathplot.h:1123
bool m_visible
Definition: mathplot.h:321
wxCoord m_scaledBitmap_offset_x
Definition: mathplot.h:1979
wxCoord y2p(double y)
Converts graph (floating point) coordinates into mpWindow (screen) pixel coordinates, using current mpWindow position and scale.
Definition: mathplot.h:1200
double m_max_x
Definition: mathplot.h:1985
double GetPosX(void) const
Definition: mathplot.h:1116
wxFont m_font
Definition: mathplot.h:309
#define mpALIGN_NE
Aligns label to north-east.
Definition: mathplot.h:504
int GetScrX(void) const
Get current view&#39;s X dimension in device context units.
Definition: mathplot.h:1131
double GetScaleY(void) const
Definition: mathplot.h:1109
double GetScaleX(void) const
Definition: mathplot.h:1102
#define mpALIGNMASK
Definition: mathplot.h:474
virtual bool HasBBox() override
Check whether this layer has a bounding box.
Definition: mathplot.h:1947
bool m_validImg
Definition: mathplot.h:1981
wxImage m_bitmap
The internal copy of the Bitmap:
Definition: mathplot.h:1977
bool m_showName
Definition: mathplot.h:318
wxCoord x2p(double x)
Converts graph (floating point) coordinates into mpWindow (screen) pixel coordinates, using current mpWindow position and scale.
Definition: mathplot.h:1195
wxCoord m_scaledBitmap_offset_y
Definition: mathplot.h:1979
wxString m_name
Definition: mathplot.h:316
double m_min_x
The shape of the bitmap:
Definition: mathplot.h:1985
#define mpALIGN_SW
Aligns label to south-west.
Definition: mathplot.h:508
void mpBitmapLayer::SetAlign ( int  align)
inline

Set label axis alignment.

Parameters
alignalignment (choose between mpALIGN_NE, mpALIGN_NW, mpALIGN_SW, mpALIGN_SE

Definition at line 1970 of file mathplot.h.

1970 { m_flags = align; };
void mpBitmapLayer::SetBitmap ( const wxImage &  inBmp,
double  x,
double  y,
double  lx,
double  ly 
)

Change the bitmap associated with the layer (to update the screen, refresh the mpWindow).

Parameters
inBmpThe bitmap to associate. A copy is made, thus it can be released after calling this.
xThe left corner X coordinate (in plot units).
yThe top corner Y coordinate (in plot units).
lxThe width in plot units.
lyThe height in plot units.

Definition at line 3903 of file mathplot.cpp.

3904 {
3905  if( !inBmp.Ok() )
3906  {
3907  wxLogError( wxT( "[mpBitmapLayer] Assigned bitmap is not Ok()!" ) );
3908  }
3909  else
3910  {
3911  m_bitmap = inBmp; // .GetSubBitmap( wxRect(0, 0, inBmp.GetWidth(), inBmp.GetHeight()));
3912  m_min_x = x;
3913  m_min_y = y;
3914  m_max_x = x + lx;
3915  m_max_y = y + ly;
3916  m_validImg = true;
3917  }
3918 }
double m_max_y
Definition: mathplot.h:1985
double m_min_y
Definition: mathplot.h:1985
double m_max_x
Definition: mathplot.h:1985
bool m_validImg
Definition: mathplot.h:1981
wxImage m_bitmap
The internal copy of the Bitmap:
Definition: mathplot.h:1977
double m_min_x
The shape of the bitmap:
Definition: mathplot.h:1985
void mpLayer::SetBrush ( wxBrush  brush)
inlineinherited

Set layer brush.

Parameters
brushbrush, will be copied to internal class member

Definition at line 309 of file mathplot.h.

309 { m_brush = brush; };
wxBrush m_brush
Definition: mathplot.h:315
void mpLayer::SetContinuity ( bool  continuity)
inlineinherited

Set the 'continuity' property of the layer (true:draws a continuous line, false:draws separate points).

See also
GetContinuity

Definition at line 252 of file mathplot.h.

Referenced by TRACE::TRACE().

252 { m_continuous = continuity; }
bool m_continuous
Definition: mathplot.h:317
void mpLayer::SetDrawOutsideMargins ( bool  drawModeOutside)
inlineinherited

Set Draw mode: inside or outside margins.

Default is outside, which allows the layer to draw up to the mpWindow border.

Parameters
drawModeOutsideThe draw mode to be set

Definition at line 280 of file mathplot.h.

Referenced by CURSOR::CURSOR(), and TRACE::TRACE().

280 { m_drawOutsideMargins = drawModeOutside; };
bool m_drawOutsideMargins
Definition: mathplot.h:319
void mpLayer::SetFont ( wxFont &  font)
inlineinherited

Set layer font.

Parameters
fontFont, will be copied to internal class member

Definition at line 271 of file mathplot.h.

Referenced by mpScaleXBase::mpScaleXBase(), and mpScaleY::mpScaleY().

271 { m_font = font; }
wxFont m_font
Definition: mathplot.h:309
void mpLayer::SetName ( wxString  name)
inlineinherited

Set layer name.

Parameters
nameName, will be copied to internal class member

Definition at line 266 of file mathplot.h.

References name.

Referenced by mpFX::mpFX(), mpFXY::mpFXY(), mpFY::mpFY(), mpProfile::mpProfile(), mpScaleXBase::mpScaleXBase(), mpScaleY::mpScaleY(), and mpText::mpText().

266 { m_name = name; }
const char * name
Definition: DXF_plotter.cpp:61
wxString m_name
Definition: mathplot.h:316
void mpLayer::SetPen ( wxPen  pen)
inlineinherited

Set layer pen.

Parameters
penPen, will be copied to internal class member

Definition at line 276 of file mathplot.h.

Referenced by SIM_PLOT_PANEL::AddTrace(), mpScaleXBase::mpScaleXBase(), and mpScaleY::mpScaleY().

276 { m_pen = pen; }
wxPen m_pen
Definition: mathplot.h:314
void mpLayer::SetVisible ( bool  show)
inlineinherited

Sets layer visibility.

Parameters
showvisibility bool.

Definition at line 301 of file mathplot.h.

Referenced by mpWindow::SetLayerVisible(), and SIM_PLOT_PANEL::SIM_PLOT_PANEL().

301 { m_visible = show; };
bool m_visible
Definition: mathplot.h:321
void mpLayer::ShowName ( bool  show)
inlineinherited

Shows or hides the text label with the name of the layer (default is visible).

Definition at line 261 of file mathplot.h.

Referenced by TRACE::TRACE().

261 { m_showName = show; };
bool m_showName
Definition: mathplot.h:318

Member Data Documentation

wxImage mpBitmapLayer::m_bitmap
protected

The internal copy of the Bitmap:

Definition at line 1977 of file mathplot.h.

wxBrush mpLayer::m_brush
protectedinherited

Definition at line 315 of file mathplot.h.

Referenced by mpInfoLayer::mpInfoLayer().

bool mpLayer::m_continuous
protectedinherited

Definition at line 317 of file mathplot.h.

Referenced by CURSOR::Plot(), and mpFXY::Plot().

int mpBitmapLayer::m_flags
protected

Definition at line 1970 of file mathplot.h.

wxFont mpLayer::m_font
protectedinherited
double mpBitmapLayer::m_max_x
protected

Definition at line 1985 of file mathplot.h.

double mpBitmapLayer::m_max_y
protected

Definition at line 1985 of file mathplot.h.

double mpBitmapLayer::m_min_x
protected

The shape of the bitmap:

Definition at line 1985 of file mathplot.h.

double mpBitmapLayer::m_min_y
protected

Definition at line 1985 of file mathplot.h.

wxString mpLayer::m_name
protectedinherited
wxBitmap mpBitmapLayer::m_scaledBitmap
protected

Definition at line 1978 of file mathplot.h.

wxCoord mpBitmapLayer::m_scaledBitmap_offset_x
protected

Definition at line 1979 of file mathplot.h.

wxCoord mpBitmapLayer::m_scaledBitmap_offset_y
protected

Definition at line 1979 of file mathplot.h.

bool mpLayer::m_showName
protectedinherited

Definition at line 318 of file mathplot.h.

Referenced by mpFX::Plot(), mpFY::Plot(), and mpFXY::Plot().

bool mpBitmapLayer::m_validImg
protected

Definition at line 1981 of file mathplot.h.


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