NPlot::Bitmap::PlotSurface2D Class Reference

Wrapper around NPlot.PlotSurface2D that provides extra functionality specific to drawing to Bitmaps. More...

Inheritance diagram for NPlot::Bitmap::PlotSurface2D:

NPlot::IPlotSurface2D List of all members.

Public Member Functions

 PlotSurface2D (int width, int height)
 Constructor.
 PlotSurface2D (System.Drawing.Bitmap b)
 Constructor.
void Draw (Graphics g, Rectangle bounds)
 Renders the plot.
void Clear ()
 Clears the plot.
void Add (IDrawable p)
 Adds a drawable object to the plot surface.
void Add (IDrawable p, NPlot.PlotSurface2D.XAxisPosition xp, NPlot.PlotSurface2D.YAxisPosition yp)
 Adds a drawable object to the plot surface against the specified axes.
void Add (IDrawable p, int zOrder)
 Adds a drawable object to the plot surface.
void Add (IDrawable p, NPlot.PlotSurface2D.XAxisPosition xp, NPlot.PlotSurface2D.YAxisPosition yp, int zOrder)
 Adds a drawable object to the plot surface against the specified axes.
System.IO.MemoryStream ToStream (System.Drawing.Imaging.ImageFormat imageFormat)
 Renders the bitmap to a MemoryStream.
void Refresh ()
 Refreshes (draws) the plot.
void AddAxesConstraint (AxesConstraint c)
 Add an axis constraint to the plot surface.
void Remove (IDrawable p, bool updateAxes)
 Remove a drawable object from the plot surface.

Properties

string Title
 The plot surface title.
Font TitleFont
 The plot title font.
int Padding
 The distance in pixels to leave between of the edge of the bounding rectangle supplied to the Draw method, and the markings that make up the plot.
Axis XAxis1
 The bottom abscissa axis.
Axis YAxis1
 The left ordinate axis.
Axis XAxis2
 The top abscissa axis.
Axis YAxis2
 The right ordinate axis.
NPlot.Legend Legend
 Gets or Sets the legend to use with this plot surface.
int LegendZOrder
 Gets or Sets the legend z-order.
System.Drawing.Color PlotBackColor
 A color used to paint the plot background.
System.Drawing.Bitmap PlotBackImage
 An imaged used to paint the plot background.
IRectangleBrush PlotBackBrush
 A Rectangle brush used to paint the plot background.
System.Drawing.Drawing2D.SmoothingMode SmoothingMode
 Smoothing mode to use when drawing plots.
int Width
 The bitmap width.
int Height
 The bitmap height.
System.Drawing.Bitmap Bitmap
 The bitmap to use as the drawing surface.
Color BackColor
 The bitmap background color outside the bounds of the plot surface.
object backColor_ = null
NPlot.PlotSurface2D ps_
System.Drawing.Bitmap b_
bool AutoScaleTitle
 Whether or not the title will be scaled according to size of the plot surface.
bool AutoScaleAutoGeneratedAxes
 When plots are added to the plot surface, the axes they are attached to are immediately modified to reflect data of the plot.
Color TitleColor
 Sets the title to be drawn using a solid brush of this color.
Brush TitleBrush
 The brush used for drawing the title.
ArrayList Drawables
 Gets an array list containing all drawables currently added to the PlotSurface2D.

Detailed Description

Wrapper around NPlot.PlotSurface2D that provides extra functionality specific to drawing to Bitmaps.

Definition at line 67 of file Bitmap.PlotSurface2D.cs.


Constructor & Destructor Documentation

NPlot::Bitmap::PlotSurface2D::PlotSurface2D int  width,
int  height
[inline]
 

Constructor.

Parameters:
width width of the bitmap.
height height of the bitmap.

Definition at line 75 of file Bitmap.PlotSurface2D.cs.

References b_, PlotSurface2D(), and ps_.

Referenced by PlotSurface2D().

NPlot::Bitmap::PlotSurface2D::PlotSurface2D System.Drawing.Bitmap  b  )  [inline]
 

Constructor.

Parameters:
b The Bitmap where the plot is to be rendered.

Definition at line 85 of file Bitmap.PlotSurface2D.cs.

References b_, PlotSurface2D(), and ps_.


Member Function Documentation

void NPlot::Bitmap::PlotSurface2D::Add IDrawable  p,
NPlot.PlotSurface2D.XAxisPosition  xp,
NPlot.PlotSurface2D.YAxisPosition  yp,
int  zOrder
[inline]
 

Adds a drawable object to the plot surface against the specified axes.

If the object is an IPlot, the PlotSurface2D axes will also be updated.

Parameters:
p the IDrawable object to add to the plot surface
xp the x-axis to add the plot against.
yp the y-axis to add the plot against.
zOrder The z-ordering when drawing (objects with lower numbers are drawn first)

Definition at line 155 of file Bitmap.PlotSurface2D.cs.

References Add(), and ps_.

void NPlot::Bitmap::PlotSurface2D::Add IDrawable  p,
int  zOrder
[inline]
 

Adds a drawable object to the plot surface.

If the object is an IPlot, the PlotSurface2D axes will also be updated.

Parameters:
p The IDrawable object to add to the plot surface.
zOrder The z-ordering when drawing (objects with lower numbers are drawn first)

Implements NPlot::IPlotSurface2D.

Definition at line 141 of file Bitmap.PlotSurface2D.cs.

References Add(), and ps_.

void NPlot::Bitmap::PlotSurface2D::Add IDrawable  p,
NPlot.PlotSurface2D.XAxisPosition  xp,
NPlot.PlotSurface2D.YAxisPosition  yp
[inline]
 

Adds a drawable object to the plot surface against the specified axes.

If the object is an IPlot, the PlotSurface2D axes will also be updated.

Parameters:
p the IDrawable object to add to the plot surface
xp the x-axis to add the plot against.
yp the y-axis to add the plot against.

Definition at line 130 of file Bitmap.PlotSurface2D.cs.

References Add(), and ps_.

void NPlot::Bitmap::PlotSurface2D::Add IDrawable  p  )  [inline]
 

Adds a drawable object to the plot surface.

If the object is an IPlot, the PlotSurface2D axes will also be updated.

Parameters:
p The IDrawable object to add to the plot surface.

Implements NPlot::IPlotSurface2D.

Definition at line 117 of file Bitmap.PlotSurface2D.cs.

References Add(), and ps_.

Referenced by Add().

void NPlot::Bitmap::PlotSurface2D::AddAxesConstraint AxesConstraint  c  )  [inline]
 

Add an axis constraint to the plot surface.

Axis constraints can specify relative world-pixel scalings, absolute axis positions etc.

Parameters:
c The axis constraint to add.

Implements NPlot::IPlotSurface2D.

Definition at line 446 of file Bitmap.PlotSurface2D.cs.

References AddAxesConstraint(), and ps_.

Referenced by AddAxesConstraint().

void NPlot::Bitmap::PlotSurface2D::Clear  )  [inline]
 

Clears the plot.

Implements NPlot::IPlotSurface2D.

Definition at line 106 of file Bitmap.PlotSurface2D.cs.

References Clear(), and ps_.

Referenced by Clear().

void NPlot::Bitmap::PlotSurface2D::Draw Graphics  g,
Rectangle  bounds
[inline]
 

Renders the plot.

Parameters:
g The graphics surface.
bounds The rectangle storing the bounds for rendering.

Definition at line 97 of file Bitmap.PlotSurface2D.cs.

References Draw(), and ps_.

Referenced by Draw(), Refresh(), and ToStream().

void NPlot::Bitmap::PlotSurface2D::Refresh  )  [inline]
 

Refreshes (draws) the plot.

Definition at line 426 of file Bitmap.PlotSurface2D.cs.

References b_, backColor_, Draw(), and ps_.

void NPlot::Bitmap::PlotSurface2D::Remove IDrawable  p,
bool  updateAxes
[inline]
 

Remove a drawable object from the plot surface.

Parameters:
p the drawable to remove
updateAxes whether or not to update the axes after removing the idrawable.

Implements NPlot::IPlotSurface2D.

Definition at line 522 of file Bitmap.PlotSurface2D.cs.

References ps_, and Remove().

Referenced by Remove().

System.IO.MemoryStream NPlot::Bitmap::PlotSurface2D::ToStream System.Drawing.Imaging.ImageFormat  imageFormat  )  [inline]
 

Renders the bitmap to a MemoryStream.

Useful for returning the bitmap from an ASP.NET page.

Returns:
The MemoryStream object.

Definition at line 385 of file Bitmap.PlotSurface2D.cs.

References b_, Bitmap, Draw(), and ps_.


Property Documentation

bool NPlot::Bitmap::PlotSurface2D::AutoScaleAutoGeneratedAxes [get, set]
 

When plots are added to the plot surface, the axes they are attached to are immediately modified to reflect data of the plot.

If AutoScaleAutoGeneratedAxes is true when a plot is added, the axes will be turned in to auto scaling ones if they are not already [tick marks, tick text and label size scaled to size of plot surface]. If false, axes will not be autoscaling.

Implements NPlot::IPlotSurface2D.

Definition at line 478 of file Bitmap.PlotSurface2D.cs.

bool NPlot::Bitmap::PlotSurface2D::AutoScaleTitle [get, set]
 

Whether or not the title will be scaled according to size of the plot surface.

Implements NPlot::IPlotSurface2D.

Definition at line 457 of file Bitmap.PlotSurface2D.cs.

System.Drawing.Bitmap NPlot::Bitmap::PlotSurface2D::b_ [private]
 

Definition at line 438 of file Bitmap.PlotSurface2D.cs.

Referenced by PlotSurface2D(), Refresh(), and ToStream().

Color NPlot::Bitmap::PlotSurface2D::BackColor [set]
 

The bitmap background color outside the bounds of the plot surface.

Definition at line 414 of file Bitmap.PlotSurface2D.cs.

object NPlot::Bitmap::PlotSurface2D::backColor_ = null [private]
 

Definition at line 420 of file Bitmap.PlotSurface2D.cs.

Referenced by Refresh().

System.Drawing.Bitmap NPlot::Bitmap::PlotSurface2D::Bitmap [get, set]
 

The bitmap to use as the drawing surface.

Definition at line 398 of file Bitmap.PlotSurface2D.cs.

Referenced by ToStream().

ArrayList NPlot::Bitmap::PlotSurface2D::Drawables [get]
 

Gets an array list containing all drawables currently added to the PlotSurface2D.

Implements NPlot::IPlotSurface2D.

Definition at line 532 of file Bitmap.PlotSurface2D.cs.

int NPlot::Bitmap::PlotSurface2D::Height [get]
 

The bitmap height.

Definition at line 372 of file Bitmap.PlotSurface2D.cs.

NPlot.Legend NPlot::Bitmap::PlotSurface2D::Legend [get, set]
 

Gets or Sets the legend to use with this plot surface.

Implements NPlot::IPlotSurface2D.

Definition at line 278 of file Bitmap.PlotSurface2D.cs.

int NPlot::Bitmap::PlotSurface2D::LegendZOrder [get, set]
 

Gets or Sets the legend z-order.

Implements NPlot::IPlotSurface2D.

Definition at line 293 of file Bitmap.PlotSurface2D.cs.

int NPlot::Bitmap::PlotSurface2D::Padding [get, set]
 

The distance in pixels to leave between of the edge of the bounding rectangle supplied to the Draw method, and the markings that make up the plot.

Implements NPlot::IPlotSurface2D.

Definition at line 198 of file Bitmap.PlotSurface2D.cs.

IRectangleBrush NPlot::Bitmap::PlotSurface2D::PlotBackBrush [set]
 

A Rectangle brush used to paint the plot background.

Mutually exclusive with PlotBackColor and PlotBackBrush

Implements NPlot::IPlotSurface2D.

Definition at line 332 of file Bitmap.PlotSurface2D.cs.

System.Drawing.Color NPlot::Bitmap::PlotSurface2D::PlotBackColor [set]
 

A color used to paint the plot background.

Mutually exclusive with PlotBackImage and PlotBackBrush

Implements NPlot::IPlotSurface2D.

Definition at line 308 of file Bitmap.PlotSurface2D.cs.

System.Drawing.Bitmap NPlot::Bitmap::PlotSurface2D::PlotBackImage [set]
 

An imaged used to paint the plot background.

Mutually exclusive with PlotBackColor and PlotBackBrush

Implements NPlot::IPlotSurface2D.

Definition at line 320 of file Bitmap.PlotSurface2D.cs.

NPlot.PlotSurface2D NPlot::Bitmap::PlotSurface2D::ps_ [private]
 

Definition at line 437 of file Bitmap.PlotSurface2D.cs.

Referenced by Add(), AddAxesConstraint(), Clear(), Draw(), PlotSurface2D(), Refresh(), Remove(), and ToStream().

System.Drawing.Drawing2D.SmoothingMode NPlot::Bitmap::PlotSurface2D::SmoothingMode [get, set]
 

Smoothing mode to use when drawing plots.

Implements NPlot::IPlotSurface2D.

Definition at line 344 of file Bitmap.PlotSurface2D.cs.

string NPlot::Bitmap::PlotSurface2D::Title [get, set]
 

The plot surface title.

Implements NPlot::IPlotSurface2D.

Definition at line 165 of file Bitmap.PlotSurface2D.cs.

Brush NPlot::Bitmap::PlotSurface2D::TitleBrush [get, set]
 

The brush used for drawing the title.

Implements NPlot::IPlotSurface2D.

Definition at line 506 of file Bitmap.PlotSurface2D.cs.

Color NPlot::Bitmap::PlotSurface2D::TitleColor [set]
 

Sets the title to be drawn using a solid brush of this color.

Implements NPlot::IPlotSurface2D.

Definition at line 494 of file Bitmap.PlotSurface2D.cs.

Font NPlot::Bitmap::PlotSurface2D::TitleFont [get, set]
 

The plot title font.

Implements NPlot::IPlotSurface2D.

Definition at line 181 of file Bitmap.PlotSurface2D.cs.

int NPlot::Bitmap::PlotSurface2D::Width [get]
 

The bitmap width.

Definition at line 360 of file Bitmap.PlotSurface2D.cs.

Axis NPlot::Bitmap::PlotSurface2D::XAxis1 [get, set]
 

The bottom abscissa axis.

Implements NPlot::IPlotSurface2D.

Definition at line 214 of file Bitmap.PlotSurface2D.cs.

Axis NPlot::Bitmap::PlotSurface2D::XAxis2 [get, set]
 

The top abscissa axis.

Implements NPlot::IPlotSurface2D.

Definition at line 246 of file Bitmap.PlotSurface2D.cs.

Axis NPlot::Bitmap::PlotSurface2D::YAxis1 [get, set]
 

The left ordinate axis.

Implements NPlot::IPlotSurface2D.

Definition at line 230 of file Bitmap.PlotSurface2D.cs.

Axis NPlot::Bitmap::PlotSurface2D::YAxis2 [get, set]
 

The right ordinate axis.

Implements NPlot::IPlotSurface2D.

Definition at line 262 of file Bitmap.PlotSurface2D.cs.


The documentation for this class was generated from the following file:
Generated on Sat Nov 5 01:04:09 2005 for NPlot by  doxygen 1.4.5