ImageResizer  3.4.0
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events
Public Member Functions | Properties | List of all members
ImageResizer.Plugins.Watermark.TextLayer Class Reference
Inheritance diagram for ImageResizer.Plugins.Watermark.TextLayer:
Inheritance graph
[legend]
Collaboration diagram for ImageResizer.Plugins.Watermark.TextLayer:
Collaboration graph
[legend]

Public Member Functions

 TextLayer (NameValueCollection attrs)
 
override object[] GetHashBasis ()
 
Font GetFont ()
 
StringFormat GetFormat ()
 
Brush GetBrush ()
 
override void RenderTo (Resizing.ImageState s)
 
void DrawString (Graphics g, string text, Font f, Point point, StringFormat fmt)
 
- Public Member Functions inherited from ImageResizer.Plugins.Watermark.Layer
 Layer (NameValueCollection settings)
 
virtual void CopyTo (Layer other)
 
int GetDataHash ()
 
delegate Size CalculateLayerContentSize (double maxwidth, double maxheight)
 
RectangleF CalculateLayerCoordinates (ImageState s, CalculateLayerContentSize actualSizeCalculator, bool forceInsideCanvas)
 Returns a rectangle with canvas-relative coordinates. A callback is required to calculate the actual size of the content based on the specified bounds. The callback may be passed double.NaN for one or more paramters to indicate that they are not specified. More...
 
double Resolve (DistanceUnit value, double relativeToValue, double percentRelativeTo, bool invert)
 
virtual void RenderTo (ImageState s)
 

Properties

TextRenderingHint Rendering [get, set]
 
string Text [get, set]
 The text to display More...
 
bool Vertical [get, set]
 If true, text will be displayed vertically More...
 
double Angle [get, set]
 Angle of clockwise rotation More...
 
Color TextColor [get, set]
 The color to draw the text More...
 
int OutlineWidth [get, set]
 The width of the text ouline (OutlineColor) More...
 
int GlowWidth [get, set]
 The width of the glow effect (GlowColor) More...
 
Color OutlineColor [get, set]
 The color of the outline More...
 
Color GlowColor [get, set]
 The color of the glow effect. More...
 
string Font [get, set]
 The name of the font More...
 
int FontSize [get, set]
 The size of the font in pixels More...
 
FontStyle Style [get, set]
 The font style More...
 
- Properties inherited from ImageResizer.Plugins.Watermark.Layer
DistanceUnit Top [get, set]
 The offset from the top of the container. Percentages are relative to the container height. Defines the upper boundary for the layer. If null, Bottom will be used to calcuate the value based on the height. If Bottom is not specified, defaults to 0. Positive values are inside the container, negative values outside it. More...
 
DistanceUnit Left [get, set]
 The offset from the left of the container. Percentages are relative to the container width. Defines the leftmost boundary for the layer. If null, Right will be used to calcuate the value based on the width. If Right is not specified, defaults to 0. Positive values are inside the container, negative values outside it. More...
 
DistanceUnit Right [get, set]
 The offset relative to the right side of the container. Percentages are relative to the container width. Defines the rightmost boundary for the layer. If null, Top will be used to calcuate the value based on the height. If Top is not specified, defaults to 0. Positive values are inside the container, negative values outside it. More...
 
DistanceUnit Bottom [get, set]
 The offset relative to the bottom of the container. Percentages are relative to the container height. Defines the bottom-most boundary for the layer. If null, Top will be used to calcuate the value based on the height. If Top is not specified, defaults to 0. Positive values are inside the container, negative values outside it. More...
 
DistanceUnit Width [get, set]
 The width of the layer. If used with both Left and Right, the smaller result wins. I.e, with a 100px container, width=50, left=30, right=30, the resulting width will be 40. If null, Left and Right will be used to calcuate the value. If both Left and Right are not specified, the natural width of the layer's contents will be used. Percentages are relative to the container width. More...
 
DistanceUnit Height [get, set]
 The height of the layer. If used with both Top and Bottom, the smaller result wins. I.e, with a 100px container, height=50, top=30, top=30, the resulting height will be 40. If null, Top and Bottom will be used to calcuate the value. If both Top and Bottom are not specified, the natural height of the layer's contents will be used. Percentages are relative to the container height. More...
 
string RelativeTo [get, set]
 Specifies the container that the position values (top,left,right,bottom,width,heght) are relative to. The default is 'image' (the innermost square, which contains the original photo). Additional valid values include 'imageArea' (includes whitespace added to preserve aspect ratio), 'padding', 'border', 'margin', and 'canvas'. More...
 
ContentAlignment Align [get, set]
 The alignment to use when (a) all 3 horizontal or vertical values are specified, and they need to be resolved, (b) when only width/height are specified, (c) when no positioning values are specified, or (d) when the content doesn't precisely fill they layer bounds. More...
 
bool Fill [get, set]
 (defaults false). When true, the image or text will attempt to fill 1 of the layer's bounds, even if upscaling is required. When Width is not specified, and both left and right are not specififed, this causes the image to fill the container width (if possible). When Height is not specified, and both top and bottom are not specififed, this causes the image to fill the container height (if possible). This causes &scale=both to be used on images unless another setting is specified in imageQuery. More...
 
LayerPlacement DrawAs [get, set]
 The z-order at which to draw the layer. Curret options are Overlay (over everything) and Background (over the background color). More...
 

Additional Inherited Members

- Public Types inherited from ImageResizer.Plugins.Watermark.Layer
enum  LayerPlacement { Overlay, Background }
 

Detailed Description

Definition at line 13 of file TextLayer.cs.

Property Documentation

double ImageResizer.Plugins.Watermark.TextLayer.Angle
getset

Angle of clockwise rotation

Definition at line 73 of file TextLayer.cs.

string ImageResizer.Plugins.Watermark.TextLayer.Font
getset

The name of the font

Definition at line 127 of file TextLayer.cs.

int ImageResizer.Plugins.Watermark.TextLayer.FontSize
getset

The size of the font in pixels

Definition at line 136 of file TextLayer.cs.

Color ImageResizer.Plugins.Watermark.TextLayer.GlowColor
getset

The color of the glow effect.

Definition at line 117 of file TextLayer.cs.

int ImageResizer.Plugins.Watermark.TextLayer.GlowWidth
getset

The width of the glow effect (GlowColor)

Definition at line 99 of file TextLayer.cs.

Color ImageResizer.Plugins.Watermark.TextLayer.OutlineColor
getset

The color of the outline

Definition at line 109 of file TextLayer.cs.

int ImageResizer.Plugins.Watermark.TextLayer.OutlineWidth
getset

The width of the text ouline (OutlineColor)

Definition at line 91 of file TextLayer.cs.

FontStyle ImageResizer.Plugins.Watermark.TextLayer.Style
getset

The font style

Definition at line 146 of file TextLayer.cs.

string ImageResizer.Plugins.Watermark.TextLayer.Text
getset

The text to display

Definition at line 54 of file TextLayer.cs.

Color ImageResizer.Plugins.Watermark.TextLayer.TextColor
getset

The color to draw the text

Definition at line 82 of file TextLayer.cs.

bool ImageResizer.Plugins.Watermark.TextLayer.Vertical
getset

If true, text will be displayed vertically

Definition at line 63 of file TextLayer.cs.


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