This tutorial will show you how to write watermark text with different shapes. CoolWatermark SDK provides a collection of shapes that you can use to twist the shape of the text. It's easy to use, what you need to do is to specify the property of Shape in the Writer. Shape is a structure value, refers to IC.CoolWatermark.Shape. It has a enumeration value, which you use to speicify whether you want to use the built-in shape of a customize shape. The following code snippet demonstrates the usage of this structure:
VB.NET
1: Dim bitmap As New System.Drawing.Bitmap(320, 240)
2: Dim image As System.Drawing.Image = bitmap
3: Dim writer As New IC.CoolWatermark.Writer(image)
4: writer.PositionStyle = PositionStyle.MiddleCenter
5: writer.FontFamily = New FontFamily("Arial")
6: writer.FontSize = 48
7:
8: Dim shape As New IC.CoolWatermark.Shape()
9: shape.ShapeStyle = ShapeStyle.ArchLower
10: shape.Degree = 200
11:
12: writer.Shape = shape
13:
14: image = writer.WriteText("Watermark")
15: writer.Dispose()
C#
1: Bitmap bitmap = new Bitmap(320, 240);
2: System.Drawing.Image image = bitmap;
3:
4: IC.CoolWatermark.Writer writer = new IC.CoolWatermark.Writer(image);
5: writer.PositionStyle = IC.CoolWatermark.PositionStyle.MiddleCenter;
6: writer.FontFamily = new FontFamily("Arial");
7: writer.FontSize = 48;
8:
9: IC.CoolWatermark.Shape shape = new IC.CoolWatermark.Shape();
10: shape.ShapeStyle = IC.CoolWatermark.ShapeStyle.ArchLower;
11: shape.Degree = 200;
12: writer.Shape = shape;
13:
14: image = writer.WriteText("Watermark");
15: writer.Dispose();
Figures
When using different ShapeStyle and Degree value, you can get different results. The following figures display all the current version built-in shapes with a specified degree.

ShapeStyle.ArchLower
Degree = 200

ShapeStyle.ArchUpper
Degree = 200

ShapeStyle.Bugle
Degree = 200

ShapeStyle.RipBottom
Degree = 50

ShapeStyle.Squeeze
Degree = 200

ShapeStyle.ShearHorizontal
Degree = 50

ShapeStyle.ShearVertical
Degree = 30

ShapeStyle.SwellHorizontal
Degree = 50

ShapeStyle.SwellVertical
Degree = 50

ShapeStyle.ZoomIn
Degree = 30

ShapeStyle.ZoomOut
Degree = 30

ShapeStyle.RainbowLower
Degree = 20

ShapeStyle.RainbowUpper
Degree = 20

ShapeStyle.Dither
Degree = 5
[Back to Top]