initial commit
[rofl0r-KOL.git] / main_tgraphictool.htm
blob600378e6d7964b1775fb8d4f0b5dee9a60cf9945
1 <html>
2 <head>
3 <title>KOL Help: TGraphicTool object (main frame)</title>
4 <base target="_top">
5 </head>
7 <body bgcolor="#FFFFEF" text="#000000" link="#008080" vlink="#008000" alink="#808000">
8 <p><font face="Courier" color="#800080"><b>TGraphicTool( unit <a href=kol_pas.htm>KOL.pas</a> )
9 <font face="Wingdings">ï</font> <a href=tobj.htm>TObj</a>
10 <font face="Wingdings">ï</font> <a href=_tobj.htm>_TObj</a>
11 </b></font></p>
12 <p><b>
13 TGraphicTool = object( <a href=tobj.htm target="_top">TObj</a> )
14 </b></p>
15 Incapsulates all GDI objects: Pen, Brush and Font.
16 <h3 align="center"><font color="#FF8080">TGraphicTool properties</font></h3>
17 <a name="handle"></a>
18 <p>
19 <font face="Courier" color="#800080"><b>property</b> <font color="#808000"><b>Handle</b></font>: THandle;</font>
20 &nbsp;&nbsp;&nbsp;<font face="Webdings" size=7>&#209;</font>&nbsp;&nbsp;&nbsp;
21 <br>
22 Every time, when accessed, real GDI object is created (if it is
23 not yet created). So, to prevent creating of the handle, use
24 <a href=#handleallocated target="main">HandleAllocated</a> instead of comparing Handle with value 0.
25 </p>
26 <a name="color"></a>
27 <p>
28 <font face="Courier" color="#800080"><b>property</b> <font color="#808000"><b>Color</b></font>: TColor;</font>
29 <br>
30 Color is the most common property for all Pen, Brush and
31 Font objects, so it is placed in its common for all of them.
32 </p>
33 <a name="brushbitmap"></a>
34 <p>
35 <font face="Courier" color="#800080"><b>property</b> <font color="#808000"><b>BrushBitmap</b></font>: HBitmap;</font>
36 <br>
37 Brush bitmap. For more info about using brush bitmap,
38 see Delphi or Win32 help files.
39 </p>
40 <a name="brushstyle"></a>
41 <p>
42 <font face="Courier" color="#800080"><b>property</b> <font color="#808000"><b>BrushStyle</b></font>: <a href=kol_pas.htm#tbrushstyle target="_top">TBrushStyle</a>;</font>
43 <br>
44 Brush style.
45 </p>
46 <a name="brushlinecolor"></a>
47 <p>
48 <font face="Courier" color="#800080"><b>property</b> <font color="#808000"><b>BrushLineColor</b></font>: TColor;</font>
49 <br>
50 Brush line color, used to represent lines in hatched brush. Default value is clBlack.
51 </p>
52 <a name="fontheight"></a>
53 <p>
54 <font face="Courier" color="#800080"><b>property</b> <font color="#808000"><b>FontHeight</b></font>: <b>Integer</b>;</font>
55 <br>
56 Font height. Value 0 (default) seys to use system default value,
57 negative values are to represent font height in &quot;points&quot;, positive
58 - in pixels. In XCL usually positive values (if not 0) are used to
59 make appearance independent from different local settings.
60 </p>
61 <a name="fontwidth"></a>
62 <p>
63 <font face="Courier" color="#800080"><b>property</b> <font color="#808000"><b>FontWidth</b></font>: <b>Integer</b>;</font>
64 <br>
65 Font width in logical units. If FontWidth = 0, then as it is said
66 in Win32.hlp, &quot;the aspect ratio of the device is matched against the
67 digitization aspect ratio of the available fonts to find the closest match,
68 determined by the absolute value of the difference.&quot;
69 </p>
70 <a name="fontpitch"></a>
71 <p>
72 <font face="Courier" color="#800080"><b>property</b> <font color="#808000"><b>FontPitch</b></font>: <a href=kol_pas.htm#tfontpitch target="_top">TFontPitch</a>;</font>
73 <br>
74 Font pitch. Change it very rare.
75 </p>
76 <a name="fontstyle"></a>
77 <p>
78 <font face="Courier" color="#800080"><b>property</b> <font color="#808000"><b>FontStyle</b></font>: <a href=kol_pas.htm#tfontstyle target="_top">TFontStyle</a>;</font>
79 <br>
80 Very useful property to control text appearance.
81 </p>
82 <a name="fontcharset"></a>
83 <p>
84 <font face="Courier" color="#800080"><b>property</b> <font color="#808000"><b>FontCharset</b></font>: <a href=kol_pas.htm#tfontcharset target="_top">TFontCharset</a>;</font>
85 <br>
86 Do not change it if You do not know what You do.
87 </p>
88 <a name="fontquality"></a>
89 <p>
90 <font face="Courier" color="#800080"><b>property</b> <font color="#808000"><b>FontQuality</b></font>: <a href=kol_pas.htm#tfontquality target="_top">TFontQuality</a>;</font>
91 <br>
92 Font quality.
93 </p>
94 <a name="fontorientation"></a>
95 <p>
96 <font face="Courier" color="#800080"><b>property</b> <font color="#808000"><b>FontOrientation</b></font>: <b>Integer</b>;</font>
97 <br>
98 It is possible to rotate text in XCL just by changing this
99 property of a font (tenths of degree, i.e. value 900 represents
100 90 degree - text written from bottom to top).
101 </p>
102 <a name="fontweight"></a>
104 <font face="Courier" color="#800080"><b>property</b> <font color="#808000"><b>FontWeight</b></font>: <b>Integer</b>;</font>
105 <br>
106 Additional font weight for bold fonts (must be 0..1000). When set to
107 value &lt;&gt; 0, fsBold is added to <a href=#fontstyle target="main">FontStyle</a>. And otherwise, when set to 0,
108 fsBold is removed from <a href=#fontstyle target="main">FontStyle</a>. Value 700 corresponds to Bold,
109 400 to Normal.
110 </p>
111 <a name="fontname"></a>
113 <font face="Courier" color="#800080"><b>property</b> <font color="#808000"><b>FontName</b></font>: <b>String</b>;</font>
114 <br>
115 Font face name.
116 </p>
117 <a name="penwidth"></a>
119 <font face="Courier" color="#800080"><b>property</b> <font color="#808000"><b>PenWidth</b></font>: <b>Integer</b>;</font>
120 <br>
121 Value 0 means default pen width.
122 </p>
123 <a name="penstyle"></a>
125 <font face="Courier" color="#800080"><b>property</b> <font color="#808000"><b>PenStyle</b></font>: <a href=kol_pas.htm#tpenstyle target="_top">TPenStyle</a>;</font>
126 <br>
127 Pen style.
128 </p>
129 <a name="penmode"></a>
131 <font face="Courier" color="#800080"><b>property</b> <font color="#808000"><b>PenMode</b></font>: <a href=kol_pas.htm#tpenmode target="_top">TPenMode</a>;</font>
132 <br>
133 Pen mode.
134 </p>
135 <a name="geometricpen"></a>
137 <font face="Courier" color="#800080"><b>property</b> <font color="#808000"><b>GeometricPen</b></font>: <b>Boolean</b>;</font>
138 <br>
139 True if Pen is geometric. Note, that under Win95/98 only pen styles
140 psSolid, psNull, psInsideFrame are supported by OS.
141 </p>
142 <a name="penbrushstyle"></a>
144 <font face="Courier" color="#800080"><b>property</b> <font color="#808000"><b>PenBrushStyle</b></font>: <a href=kol_pas.htm#tbrushstyle target="_top">TBrushStyle</a>;</font>
145 <br>
146 Brush style for hatched geometric pen.
147 </p>
148 <a name="penbrushbitmap"></a>
150 <font face="Courier" color="#800080"><b>property</b> <font color="#808000"><b>PenBrushBitmap</b></font>: HBitmap;</font>
151 <br>
152 Brush bitmap for geometric pen (if assigned Pen is functioning as
153 its style = BS_PATTERN, regadless of <a href=#penbrushstyle target="main">PenBrushStyle</a> value).
154 </p>
155 <a name="penendcap"></a>
157 <font face="Courier" color="#800080"><b>property</b> <font color="#808000"><b>PenEndCap</b></font>: <a href=kol_pas.htm#tpenendcap target="_top">TPenEndCap</a>;</font>
158 <br>
159 Pen end cap mode - for <a href=#geometricpen target="main">GeometricPen</a> only.
160 </p>
161 <a name="penjoin"></a>
163 <font face="Courier" color="#800080"><b>property</b> <font color="#808000"><b>PenJoin</b></font>: <a href=kol_pas.htm#tpenjoin target="_top">TPenJoin</a>;</font>
164 <br>
165 Pen join mode - for <a href=#geometricpen target="main">GeometricPen</a> only.
166 </p>
167 <a name="logfontstruct"></a>
169 <font face="Courier" color="#800080"><b>property</b> <font color="#808000"><b>LogFontStruct</b></font>: TLogFont;</font>
170 <br>
171 by Alex Pravdin: a property to change all font structure items at once.
172 </p>
173 <h4 align="center"><font color="black">Properties, inherited from <a href="tobj.htm" target="_top">TObj</a></font></h4>
174 <h3 align="center"><font color="#FF8080">TGraphicTool methods</font></h3>
175 <a name="changed"></a>
177 <font face="Courier" color="#800080"><b>procedure</b> <font color="#808000"><b>Changed</b></font>;</font>
178 &nbsp;&nbsp;&nbsp;<font face="Webdings" size=7>&#78;</font>&nbsp;&nbsp;&nbsp;
179 <br>
180 </p>
181 <a name="gethandle"></a>
183 <font face="Courier" color="#800080"><b>function</b> <font color="#808000"><b>GetHandle</b></font>: THandle;</font>
184 &nbsp;&nbsp;&nbsp;<font face="Webdings" size=7>&#78;</font>&nbsp;&nbsp;&nbsp;
185 <br>
186 </p>
187 <a name="destroy"></a>
189 <font face="Courier" color="#800080"><b>destructor</b> <font color="#808000"><b>Destroy</b></font>; <b>virtual</b>;</font>
190 <br>
191 </p>
192 <a name="handleallocated"></a>
194 <font face="Courier" color="#800080"><b>function</b> <font color="#808000"><b>HandleAllocated</b></font>: <b>Boolean</b>;</font>
195 <br>
196 Returns True, if handle is allocated (i.e., if real GDI
197 objet is created.
198 </p>
199 <a name="releasehandle"></a>
201 <font face="Courier" color="#800080"><b>function</b> <font color="#808000"><b>ReleaseHandle</b></font>: <b>Integer</b>;</font>
202 <br>
203 Returns <a href=#handle target="main">Handle</a> value (if allocated), releasing it from the
204 object (so, it is no more knows about this handle and its
205 <a href=#handleallocated target="main">HandleAllocated</a> function returns False.
206 </p>
207 <a name="assign"></a>
209 <font face="Courier" color="#800080"><b>function</b> <font color="#808000"><b>Assign</b></font>( Value: <a href=kol_pas.htm#pgraphictool target="_top">PGraphicTool</a> ): <a href=kol_pas.htm#pgraphictool target="_top">PGraphicTool</a>;</font>
210 <br>
211 Assigns properties of the same (only) type graphic object,
212 excluding <a href=#handle target="main">Handle</a>. If assigning is really leading to change
213 object, procedure <a href=#changed target="main">Changed</a> is called.
214 </p>
215 <a name="assignhandle"></a>
217 <font face="Courier" color="#800080"><b>procedure</b> <font color="#808000"><b>AssignHandle</b></font>( NewHandle: <b>Integer</b> );</font>
218 <br>
219 Assigns value to <a href=#handle target="main">Handle</a> property.
220 </p>
221 <a name="isfonttruetype"></a>
223 <font face="Courier" color="#800080"><b>function</b> <font color="#808000"><b>IsFontTrueType</b></font>: <b>Boolean</b>;</font>
224 <br>
225 Returns True, if font is True Type. Requires of creating of a <a href=#handle target="main">Handle</a>,
226 if it is not yet created.
227 </p>
228 <h4 align="center"><font color="black">Methods, inherited from <a href="tobj.htm" target="_top">TObj</a></font></h4>
229 <h3 align="center"><font color="#FF8080">TGraphicTool events</font></h3>
230 <a name="onchange"></a>
232 <font face="Courier" color="#800080"><b>property</b> <font color="#808000"><b>OnChange</b></font>: <a href=kol_pas.htm#tongraphicchange target="_top">TOnGraphicChange</a>;</font>
233 <br>
234 Called, when object is changed.
235 </p>
236 <h4 align="center"><font color="black">Events, inherited from <a href="tobj.htm" target="_top">TObj</a></font></h4>
237 <h3 align="center"><font color="#FF8080">TGraphicTool fields</font></h3>
238 <h4 align="center"><font color="black">Fields, inherited from <a href="tobj.htm" target="_top">TObj</a></font></h4>
239 <hr>
240 <p align="center">[&nbsp;<a href=index.htm>Index</a>&nbsp;]</p>
241 <p align="center"><font face="Comic Sans MS"><small>This help is generated 22-Sep-2005 by KOL Help generator, (C) 2000-2001 by Vladimir Kladov<br>Modified (C) 2003 by Alexander Bartov</small></font></p>
242 </body>
243 </html>