Home    PhotoController Online Documentation Prev Next
PhotoController
Welcome
Features
Installation
Release Notes
What's New
Requirements
Reference
Classes
Controller
Methods
Properties
FeatherBuilder
Methods
Properties
PhotoControllerException
Structure
Borders
Filters
Enumeration
AdjustType
AnchorType
CompressionType
FilterStyle
FeatherBackgroundStyle
FlipFlags
PhotoBorderStyle
PhotoFormat
Artical
Another Use with Feather
Effect with ColorAdjust
Effect with Filters
Effect with Borders
Feather Samples
Gif Compression Algorithm
Resize the uploaded image
Saving Comparison
Saving Gif
Why Using InterpolationMode
Work with ASP.NET
Write Customized Borders
License
Purchase
[Top]
PhotoController Component for .NET ImageComponent.NET Logo
Write Customized Borders


You are able to customize brush to write borders with PhotoController, and the procedure is very simple.

How to write borders is not a secret.
In Borders structure, you can see, BorderStyle is used to specify the border style, actually, this flag is used to specify the Brush style. Like we defines all HatchStyle inside.

For example, if you specify PhotoBorderStyle is HorizontalBrick, like below:

[Visual Basic]
Dim borders As New Borders(PhotoBorderStyle.HorizontalBrick)
borders.Length = 10
' You do not specify a Brush , we will automatically specify it as New HatchBrush(HacthStyle.HorizontalBrick ,Colors[0],Colors[1]);

[C#]
Borders borders = new Borders(PhotoBorderStyle.HorizontalBrick);
broders.Length =10;
' You do not specify a Brush , we will automatically specify it as new HatchBrush(HacthStyle.HorizontalBrick ,Colors[0],Colors[1]);

We will look Colors[0] as the ForeColor of HatchBrush and Colors[1] as the BackColor

Then, what is CenterColor ?

It is what PathGradientBrush needs. Besides HatchBrush, we use PathGradientBrush to draw other borders style. Colors will look as SurroundColors of PathGradientBrush. You can find the direction in MSDN.

Now, lets begin a simplest customized border below

[Visual Basic]
borders.PhotoBorderStyle = PhotoBorderStyle.Customize
borders.Brush = New SolidBrush(Color.Black)
border.Length = 10

[C#]
borders.PhotoBorderStyle = PhotoBorderStyle.Customize;
borders.Brush = new SolidBrush(Color.Black);
borders.Length = 10;

After writing this customized border, it will look like below

Original photo The photo with customized borders

 

 

 

2005-2007 © ImageComponent.NET. All rights reserved.

Valid HTML 4.01 Transitional