Contents
Introduction. 1
Page Size. 1
Spludlow Drawing is done by first creating a “PrintDoc” this
implements the “IPrintDoc” interface that lists the methods you can use to
draw:
public interface IPrintDoc
{
void NewPage();
void Text(string text, string font, float x, float y, Color colour, float angle, StringAlignment alignment, float strokeWidth, Color strokeColour);
void TextBox(string text, string font, float x, float y, float width, float height, Color colour, float angle, StringAlignment alignment, float strokeWidth, Color
strokeColour);
void Line(float x1, float y1, float x2, float y2, float lineWidth, Color lineColour);
void Rectangle(float x, float y, float width, float height, float lineWidth, Color lineColour, Color fillColour);
void Cirlce(float x, float y, float radius, float lineWidth, Color lineColour, Color fillColour);
void Ellipse(float x, float y, float xRadius, float yRadius, float lineWidth, Color lineColour, Color fillColour);
void Arc(float x, float y, float xRadius, float yRadius, float startAngle, float endAngle, float lineWidth, Color lineColour);
void ArcSector(float x, float y, float xOuterRadius, float yOuterRadius, float xInnerRadius, float yInnerRadius, float startAngle, float endAngle, float lineWidth, Color lineColour, Color fillColour);
void Polygon(float x, float y, float xRadius, float yRadius, int sides, float rotateAngle, float lineWidth, Color lineColour, Color fillColour);
void Shape(PointF[] points, float lineWidth, Color lineColour, Color
fillColour);
void Curve(PointF[] points, float lineWidth, Color lineColour);
void Lines(PointF[] points, float lineWidth, Color lineColour);
void Place(string filename, float x, float y, float scale, int sourcePageNumber);
void PlaceAngle(string filename, float x, float y, float scale, float angle, int sourcePageNumber);
void BarCode(string data, string type, float x, float y, float width, float height, Color foreColour, Color backColour, bool rotate);
}
This interface is not as complete as the .net Graphics but
should provide the functionality to create most “business” documents.
When creating a print doc the page size can be specified as
a string.
NOTE: The default is portrait, for landscape append ‘*’
to the page size e.g. “A4*”
Name
|
Short
|
Long
|
AreaMM
|
AreaCM
|
AreaM
|
String*
|
Single
|
Single
|
Single
|
Single
|
Single
|
A8
|
52
|
74
|
3848
|
38.48
|
0.003848
|
BC
|
55
|
85
|
4675
|
46.75
|
0.004675
|
A7
|
74
|
105
|
7770
|
77.7
|
0.00777
|
A6
|
105
|
148
|
15540
|
155.4
|
0.01554
|
DL
|
99
|
210
|
20790
|
207.9
|
0.02079
|
Junior
|
127
|
203
|
25781
|
257.81
|
0.025781
|
Memo
|
140
|
216
|
30240
|
302.4
|
0.03024
|
A5
|
148
|
210
|
31080
|
310.8
|
0.03108
|
Letter
|
216
|
279
|
60264
|
602.64
|
0.060264
|
A4
|
210
|
297
|
62370
|
623.7
|
0.06237
|
RA4
|
215
|
305
|
65575
|
655.75
|
0.065575
|
SRA4
|
225
|
320
|
72000
|
720
|
0.072
|
Legal
|
216
|
356
|
76896
|
768.96
|
0.076896
|
Tabloid
|
279
|
432
|
120528
|
1205.28
|
0.120528
|
A3
|
297
|
420
|
124740
|
1247.4
|
0.12474
|
RA3
|
305
|
430
|
131150
|
1311.5
|
0.13115
|
SRA3
|
320
|
450
|
144000
|
1440
|
0.144
|
A2
|
420
|
594
|
249480
|
2494.8
|
0.24948
|
RA2
|
430
|
610
|
262300
|
2623
|
0.2623
|
SRA2
|
450
|
640
|
288000
|
2880
|
0.288
|
A1
|
594
|
841
|
499554
|
4995.54
|
0.499554
|
RA1
|
610
|
860
|
524600
|
5246
|
0.5246
|
SRA1
|
640
|
900
|
576000
|
5760
|
0.576
|
A0
|
841
|
1189
|
999949
|
9999.49
|
0.999949
|
RA0
|
860
|
1220
|
1049200
|
10492
|
1.0492
|
SRA0
|
900
|
1280
|
1152000
|
11520
|
1.152
|
2A0
|
1189
|
1682
|
1999898
|
19998.98
|
1.999898
|
4A0
|
1682
|
2378
|
3999796
|
39997.96
|
3.999796
|
You can specify a custom size with “111 x 222”.
NOTE: All units are in millimetres.