NPlot::Web::PlotSurface2D Class Reference

A PlotSurface2D web control. More...

Inheritance diagram for NPlot::Web::PlotSurface2D:

NPlot::IPlotSurface2D List of all members.

Public Member Functions

 PlotSurface2D ()
 Default constructor.
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.
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.

Protected Member Functions

override void OnInit (EventArgs e)
 Initialization event.
override void Render (HtmlTextWriter output)
 Render this control as an HTML stream.

Properties

string Title
 The plot surface title.
System.Drawing.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 first abscissa axis.
Axis YAxis1
 The first ordinate axis.
Axis XAxis2
 The second abscissa axis.
Axis YAxis2
 The second ordinate axis.
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.
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.Drawing2D.SmoothingMode SmoothingMode
 Smoothing mode to use when drawing plots.
override Color BackColor
 The bitmap background color outside the bounds of the plot surface.
object backColor_ = null
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.

Private Member Functions

string prefix ()
 the prefix used for the session variables
String buildPlotURL ()
 Ivan Ivanov wrote this function.

Private Attributes

NPlot.PlotSurface2D ps_ = new NPlot.PlotSurface2D()
string plotUrl
 The URL to redirect for the plot.

Detailed Description

A PlotSurface2D web control.

Rather than use this control, I generally create bitmaps using Bitmap.PlotSurface2D, then use the ToBrowser() method in Bitmap.PlotSurface2D to return them as a page request response (and point the src in an image tag to this page).

This is not as nice from a users perspective but is more efficient.

Note: this control can chew up memory until the user session ends if the client cancels the page load before the image has loaded.

Definition at line 83 of file Web.PlotSurface2D.cs.


Constructor & Destructor Documentation

NPlot::Web::PlotSurface2D::PlotSurface2D  )  [inline]
 

Default constructor.

Definition at line 92 of file Web.PlotSurface2D.cs.


Member Function Documentation

void NPlot::Web::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 171 of file Web.PlotSurface2D.cs.

References Add(), and ps_.

void NPlot::Web::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 157 of file Web.PlotSurface2D.cs.

References Add(), and ps_.

void NPlot::Web::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 145 of file Web.PlotSurface2D.cs.

References Add(), and ps_.

void NPlot::Web::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 132 of file Web.PlotSurface2D.cs.

References Add(), and ps_.

Referenced by Add().

void NPlot::Web::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 557 of file Web.PlotSurface2D.cs.

References AddAxesConstraint(), and ps_.

Referenced by AddAxesConstraint().

String NPlot::Web::PlotSurface2D::buildPlotURL  )  [inline, private]
 

Ivan Ivanov wrote this function.

From his email: If the request string contains encoded parameters values [e.g. # - 23]. The call to request.Url.ToString() will decode values [e.g. instead of 23 it will return #]. On the subsequent request to the page that contains the nplot control [when the actual drawing of the image takes place] the request url will be cut up to the unformated value [e.g. #] and since the PlotSurface2D_ is added at the end of the query string, it will be missing.

Returns:

Definition at line 445 of file Web.PlotSurface2D.cs.

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

Clears the plot.

Implements NPlot::IPlotSurface2D.

Definition at line 121 of file Web.PlotSurface2D.cs.

References Clear(), and ps_.

Referenced by Clear().

override void NPlot::Web::PlotSurface2D::OnInit EventArgs  e  )  [inline, protected]
 

Initialization event.

Parameters:
e 

Definition at line 466 of file Web.PlotSurface2D.cs.

References prefix().

string NPlot::Web::PlotSurface2D::prefix  )  [inline, private]
 

the prefix used for the session variables

Definition at line 107 of file Web.PlotSurface2D.cs.

Referenced by OnInit(), and Render().

void NPlot::Web::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 648 of file Web.PlotSurface2D.cs.

References ps_, and Remove().

Referenced by Remove().

override void NPlot::Web::PlotSurface2D::Render HtmlTextWriter  output  )  [inline, protected]
 

Render this control as an HTML stream.

Parameters:
output The HTML writer to write out to.

Definition at line 508 of file Web.PlotSurface2D.cs.

References backColor_, plotUrl, prefix(), and ps_.


Member Data Documentation

string NPlot::Web::PlotSurface2D::plotUrl [private]
 

The URL to redirect for the plot.

Definition at line 101 of file Web.PlotSurface2D.cs.

Referenced by Render().

NPlot.PlotSurface2D NPlot::Web::PlotSurface2D::ps_ = new NPlot.PlotSurface2D() [private]
 

Definition at line 86 of file Web.PlotSurface2D.cs.

Referenced by Add(), AddAxesConstraint(), Clear(), Remove(), and Render().


Property Documentation

bool NPlot::Web::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 597 of file Web.PlotSurface2D.cs.

bool NPlot::Web::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 572 of file Web.PlotSurface2D.cs.

override Color NPlot::Web::PlotSurface2D::BackColor [set]
 

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

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

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

Definition at line 432 of file Web.PlotSurface2D.cs.

Referenced by Render().

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

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

Implements NPlot::IPlotSurface2D.

Definition at line 661 of file Web.PlotSurface2D.cs.

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

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

Implements NPlot::IPlotSurface2D.

Definition at line 366 of file Web.PlotSurface2D.cs.

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

Gets or Sets the legend z-order.

Implements NPlot::IPlotSurface2D.

Definition at line 386 of file Web.PlotSurface2D.cs.

int NPlot::Web::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 226 of file Web.PlotSurface2D.cs.

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

A Rectangle brush used to paint the plot background.

Mutually exclusive with PlotBackColor and PlotBackBrush

Implements NPlot::IPlotSurface2D.

Definition at line 350 of file Web.PlotSurface2D.cs.

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

A color used to paint the plot background.

Mutually exclusive with PlotBackImage and PlotBackBrush

Implements NPlot::IPlotSurface2D.

Definition at line 326 of file Web.PlotSurface2D.cs.

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

An imaged used to paint the plot background.

Mutually exclusive with PlotBackColor and PlotBackBrush

Implements NPlot::IPlotSurface2D.

Definition at line 338 of file Web.PlotSurface2D.cs.

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

Smoothing mode to use when drawing plots.

Implements NPlot::IPlotSurface2D.

Definition at line 406 of file Web.PlotSurface2D.cs.

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

The plot surface title.

Implements NPlot::IPlotSurface2D.

Definition at line 185 of file Web.PlotSurface2D.cs.

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

The brush used for drawing the title.

Implements NPlot::IPlotSurface2D.

Definition at line 632 of file Web.PlotSurface2D.cs.

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

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

Implements NPlot::IPlotSurface2D.

Definition at line 617 of file Web.PlotSurface2D.cs.

System.Drawing.Font NPlot::Web::PlotSurface2D::TitleFont [get, set]
 

The plot title font.

Implements NPlot::IPlotSurface2D.

Definition at line 204 of file Web.PlotSurface2D.cs.

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

The first abscissa axis.

Implements NPlot::IPlotSurface2D.

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

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

The second abscissa axis.

Implements NPlot::IPlotSurface2D.

Definition at line 286 of file Web.PlotSurface2D.cs.

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

The first ordinate axis.

Implements NPlot::IPlotSurface2D.

Definition at line 266 of file Web.PlotSurface2D.cs.

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

The second ordinate axis.

Implements NPlot::IPlotSurface2D.

Definition at line 306 of file Web.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