Home    CoolWatermark Online Documentation Prev Next
CoolWatermark
Welcome
Features
Installation
Release Notes
Requirements
Reference
Classes
Writer
Methods
Properties
CoolWatermarkException
Structure
Border
Effect
Shadow
Shape
Enumeration
BrushStyle
EffectStyle
PositionStyle
ShapeStyle
Artical
Effect Samples
Overlapped Image
Shadow Samples
Shape Samples
Write with Border
Customize Shape Warp
Write Halo Text
Purchase
License
[Top]
CoolWatermark Component for .NET ImageComponent.NET Logo
Write Halo Text


This artical is to show how to write halo text.

Halo is a new effect style in CoolWatermark 1.1. Writing halo text requires two color defined in Writer.Colors. Therefore, it doesn't work with Gradient brush style. We will talk about that how to use them together.

Also, Halo doesn't work with Border.

Firstly, let's try the simplest halo text. ( I am not going to show the code, because that's very simple, no difference to other effect styles ). I set Color[0] to be black, Color[1] to be white, and set Shape.Distance to be 5. It will write out the following watermark text.

With some colors, it might give you special effects. For example, (a burning text?)

Color[0] = #C0C0C0        Color[1] = #FF8080

Halo is like other effects, it is able to use with Shape. For example:

This is a squeeze shape style with halo. Distance is 10.

How to use with Gradient BrushStyle with Halo?

You need a little technique to use them together. Firstly, you might notice halo text has two parts, like the above figure, one is the foreground black text, another is the background yellow shadow. The yellow shadow will occupy some spaces, it will cause a little offset for the foreground text. For example, the position of the watermark is (2,50) in the above figure,. If I write the text without halo, the foreground will exactly stay at (2,50). But after halo, the foreground text moves a little bit, because the whole text will stay at (2,50) not just the foreground text.

So, what can we do if want to write a text without halo but using Gradient brush style. Yes, we assign a little offset for the position. The offset is just the distance we set for halo. Now we can write one more time the text with a gradient brush style at the position (12, 60).

 

 

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

  Valid HTML 4.01 Transitional