Pascal
procedure tsPostAddUsageRange(PostIndex: tsInt; UsageType: tsEnum; CharStart: WideChar; CharEnd: WideChar); procedure tsPostAddUsageChars(PostIndex: tsInt; UsageType: tsEnum; Chars: pWideChar);
C/C++
void tsPostAddUsageRange(tsInt PostIndex, tsEnum UsageType, WideChar CharStart, WideChar CharEnd); void tsPostAddUsageChars(tsInt PostIndex, tsEnum UsageType, WideChar * Chars);
If you don't want to apply an post processor to all chars you can include or excluse single chars or complete ranges. The usage is individually for each post processor. It's also possible to mix different usage states. At first all includes will be tested and after this the excludes will tested. So it's possible to include an range and exclude an subrange of the chars.
Following code are used for for the image above. The first post processor will applied to all large chars (from A to Z). The second won't be applied to these chars. But to all other.
tsPostAddFillColor3ub($00, $00, $FF, TS_CHANNELS_RGB); tsPostAddUsageRange(TS_POST_INDEX_LAST, TS_POST_USAGE_INCLUDE, 'A', 'Z'); tsPostAddFillColor3ub($FF, $00, $00, TS_CHANNELS_RGB); tsPostAddUsageRange(TS_POST_INDEX_LAST, TS_POST_USAGE_EXCLUDE, 'A', 'Z');
Example 5.2. Usage of Post Processors (Pascal)
This represents the Index of the post processor you want to add an usage. Starting with 0. There are also some special values for this parameter. For an complete list look in the Table Post Indizes.
You have the choise between 2 usage kinds.
Chars in this range will be used for post processing.
Chars in this range will be ignored for post processing.
If you want to add an range this is the first char of the range.
If you want to add an range this is the last char from the range.
If you only want to add some single chars you can pass an nullterminated string to this parameter. The function will create an range for each char.
|
Warning |
|---|---|
|
If you pass an string with the first 3000 chars it's better you add it as an range because in result there exists 3000 different ranges. And this dosn't make the test faster. |
|
If there was no context bound.
If there is no font bound.
If the bound font isn't an font creator.