ImageResizer  3.4.0
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events
Public Member Functions | Static Public Member Functions | Protected Attributes | Properties | List of all members
ImageResizer.BoxEdges Class Reference

Represents the widths of edges of a box. More...

Public Member Functions

 BoxEdges (double all)
 Create a box with all edges the same width. More...
 
 BoxEdges (double left, double top, double right, double bottom)
 Create a box, specifying individual widths for each size More...
 
 BoxEdges (BoxEdges original)
 Copies the specified BoxEdges instance More...
 
BoxEdges SetAll (double all)
 Sets the width of all edges, returning a new instance More...
 
BoxEdges SetTop (double top)
 
BoxEdges SetLeft (double left)
 
BoxEdges SetRight (double right)
 
BoxEdges SetBottom (double bottom)
 
float[] GetEdgeOffsets ()
 Gets edge offsets as a clockwise array, starting with Top. More...
 
override string ToString ()
 

Static Public Member Functions

static BoxEdges Parse (string text, BoxEdges fallbackValue)
 

Protected Attributes

double top = 0
 

Properties

double Top [get]
 
double Left [get]
 
double Right [get]
 
double Bottom [get]
 
double All [get]
 Returns double.NaN unless all edges are the same width, in which case that width is returned More...
 
double all [get, set]
 
static BoxEdges Empty [get]
 Returns an instance with a width of 0 More...
 
bool IsEmpty [get]
 Returns true if th More...
 

Detailed Description

Represents the widths of edges of a box.

Definition at line 11 of file BoxEdges.cs.

Constructor & Destructor Documentation

ImageResizer.BoxEdges.BoxEdges ( double  all)
inline

Create a box with all edges the same width.

Parameters
all

Definition at line 27 of file BoxEdges.cs.

Referenced by ImageResizer.BoxEdges.SetAll().

27  {
28  this.all = all;
29  }
ImageResizer.BoxEdges.BoxEdges ( double  left,
double  top,
double  right,
double  bottom 
)
inline

Create a box, specifying individual widths for each size

Parameters
left
top
right
bottom

Definition at line 37 of file BoxEdges.cs.

37  {
38  this.top = top; this.left = left; this.bottom = bottom; this.right = right;
39  }
ImageResizer.BoxEdges.BoxEdges ( BoxEdges  original)
inline

Copies the specified BoxEdges instance

Parameters
original

Definition at line 44 of file BoxEdges.cs.

44  {
45  this.top = original.top;
46  this.bottom = original.bottom;
47  this.right = original.right;
48  this.left = original.left;
49  }

Member Function Documentation

float [] ImageResizer.BoxEdges.GetEdgeOffsets ( )
inline

Gets edge offsets as a clockwise array, starting with Top.

Returns

Definition at line 110 of file BoxEdges.cs.

110  {
111  return new float[4] { (float)top, (float)right, (float)bottom, (float)left };
112  }
BoxEdges ImageResizer.BoxEdges.SetAll ( double  all)
inline

Sets the width of all edges, returning a new instance

Parameters
all
Returns

Definition at line 63 of file BoxEdges.cs.

63  {
64  BoxEdges b = new BoxEdges(this); b.all = all;
65  return b;
66  }
BoxEdges(double all)
Create a box with all edges the same width.
Definition: BoxEdges.cs:27

Property Documentation

double ImageResizer.BoxEdges.All
get

Returns double.NaN unless all edges are the same width, in which case that width is returned

Definition at line 87 of file BoxEdges.cs.

BoxEdges ImageResizer.BoxEdges.Empty
staticget

Returns an instance with a width of 0

Definition at line 101 of file BoxEdges.cs.

bool ImageResizer.BoxEdges.IsEmpty
get

Returns true if th

Definition at line 105 of file BoxEdges.cs.


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