Difference between revisions of "BGRABitmap Miscellaneous types"
From Free Pascal wiki
Jump to navigationJump to search (created) |
(added font types) |
||
Line 44: | Line 44: | ||
<tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Shape is at the same level, there is no particular lighting</td></tr> | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Shape is at the same level, there is no particular lighting</td></tr> | ||
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr style="background: white;"><td colspan="3">'' | + | <tr style="background: white;"><td colspan="3">''TBGRAFontQuality'' = (</td></tr> |
− | <tr style="background: white;"><td width="10%"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;" colspan="2"> | + | <tr style="background: white;"><td width="10%"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;" colspan="2">Quality to be used to render text</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'' | + | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">''fqSystem'',</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;"> | + | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Use the system capabilities. It is rather fast however it may be not be smoothed.</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: white;">'' | + | <tr><td width="10%"></td><td colspan="2" style="background: white;">''fqSystemClearType'',</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Use | + | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Use the system capabilities to render with ClearType. This quality is of course better than fqSystem however it may not be perfect.</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr | + | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">''fqFineAntialiasing'',</td></tr> |
− | <tr | + | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Garanties a high quality antialiasing.</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: white;">'' | + | <tr><td width="10%"></td><td colspan="2" style="background: white;">''fqFineClearTypeRGB'',</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;"> | + | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Fine antialiasing with ClearType in assuming an LCD display in red/green/blue order</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'' | + | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">''fqFineClearTypeBGR'');</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;"> | + | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Fine antialiasing with ClearType in assuming an LCD display in blue/green/red order</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr | + | <tr style="background: white;"><td colspan="3">''TFontPixelMetric'' = '''record'''</td></tr> |
− | <tr | + | <tr style="background: white;"><td width="10%"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;" colspan="2">Measurements of a font</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'' | + | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">''Defined'': boolean;</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;"> | + | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">The values have been computed</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: white;">'' | + | <tr><td width="10%"></td><td colspan="2" style="background: white;">''Baseline'',</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;"> | + | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Position of the baseline, where most letters lie</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'' | + | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">''xLine'',</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;"> | + | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Position of the top of the small letters (x being one of them)</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: white;">'' | + | <tr><td width="10%"></td><td colspan="2" style="background: white;">''CapLine'',</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;"> | + | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Position of the top of the UPPERCASE letters</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'' | + | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">''DescentLine'',</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;"> | + | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Position of the bottom of letters like g and p</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: white;">'' | + | <tr><td width="10%"></td><td colspan="2" style="background: white;">''Lineheight'': integer;</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;"> | + | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Total line height including line spacing defined by the font</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr | + | <tr style="background: #f0f0ff;"><td colspan="3">''TFontVerticalAnchor'' = (</td></tr> |
− | <tr | + | <tr style="background: #f0f0ff;"><td width="10%"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;" colspan="2">Vertical anchoring of the font. When text is drawn, a start coordinate is necessary. Text can be positioned in different ways. This enum defines what position it is regarding the font</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: white;">'' | + | <tr><td width="10%"></td><td colspan="2" style="background: white;">''fvaTop'',</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;"> | + | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">The top of the font. Everything will be drawn below the start coordinate.</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'' | + | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">''fvaCenter'',</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;"> | + | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">The center of the font</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: white;">''' | + | <tr><td width="10%"></td><td colspan="2" style="background: white;">''fvaCapLine'',</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;"> | + | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">The top of capital letters</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr | + | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">''fvaCapCenter'',</td></tr> |
− | <tr | + | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">The center of capital letters</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: white;">'' | + | <tr><td width="10%"></td><td colspan="2" style="background: white;">''fvaXLine'',</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;"> | + | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">The top of small letters</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'' | + | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">''fvaXCenter'',</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;"> | + | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">The center of small letters</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: white;">'' | + | <tr><td width="10%"></td><td colspan="2" style="background: white;">''fvaBaseline'',</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;"> | + | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">The baseline, the bottom of most letters</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr | + | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">''fvaDescentLine'',</td></tr> |
− | <tr | + | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">The bottom of letters that go below the baseline</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr | + | <tr><td width="10%"></td><td colspan="2" style="background: white;">''fvaBottom'');</td></tr> |
− | <tr | + | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">The bottom of the font. Everything will be drawn above the start coordinate</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr | + | <tr style="background: #f0f0ff;"><td colspan="3">''TWordBreakHandler'' = '''procedure'''('''var''' ABeforeUTF8, AAfterUTF8: '''string''') '''of''' '''object''';</td></tr> |
− | <tr | + | <tr style="background: #f0f0ff;"><td width="10%"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;" colspan="2">Definition of a function that handles work-break</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr | + | <tr style="background: white;"><td colspan="3">''TBGRATypeWriterAlignment'' = (twaTopLeft, twaTop, twaTopRight, twaLeft, twaMiddle, twaRight, twaBottomLeft, twaBottom, twaBottomRight);</td></tr> |
− | <tr | + | <tr style="background: white;"><td width="10%"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;" colspan="2">Alignment for a typewriter, that does not have any more information than a square shape containing glyphs</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr | + | <tr style="background: #f0f0ff;"><td colspan="3">''TBGRATypeWriterOutlineMode'' = (twoPath, twoFill, twoStroke, twoFillOverStroke, twoStrokeOverFill, twoFillThenStroke, twoStrokeThenFill);</td></tr> |
− | <tr | + | <tr style="background: #f0f0ff;"><td width="10%"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;" colspan="2">How a typewriter must render its content on a Canvas2d</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr | + | <tr style="background: white;"><td colspan="3">''TBGRATextOutImproveReadabilityMode'' = (irMask, irNormal, irClearTypeRGB, irClearTypeBGR);</td></tr> |
− | <tr | + | <tr style="background: white;"><td width="10%"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;" colspan="2">Output mode for the improved renderer for readability. This is used by the font renderer based on LCL in BGRAText</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'' | + | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' CleanTextOutString(s: '''string'''): '''string''';</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;"> | + | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Removes line ending and tab characters from a string (for a function like TextOut that does not handle this). this works with UTF8 strings as well</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: white;">'' | + | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' RemoveLineEnding('''var''' s: '''string'''; indexByte: integer): boolean;</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;"> | + | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Remove the line ending at the specified position or return False. This works with UTF8 strings however the index is the byte index</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr | + | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' RemoveLineEndingUTF8('''var''' sUTF8: '''string'''; indexUTF8: integer): boolean;</td></tr> |
− | <tr | + | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Remove the line ending at the specified position or return False. The index is the character index, that may be different from the byte index</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: white;">'' | + | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''procedure''' BGRADefaultWordBreakHandler('''var''' ABefore, AAfter: '''string''');</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;"> | + | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Default word break handler, that simply divide when there is a space</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr | + | <tr style="background: #f0f0ff;"><td colspan="3">''TResampleMode'' = (</td></tr> |
− | <tr | + | <tr style="background: #f0f0ff;"><td width="10%"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;" colspan="2">How the resample is to be computed</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: white;">'' | + | <tr><td width="10%"></td><td colspan="2" style="background: white;">''rmSimpleStretch'',</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;"> | + | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Low quality resample by repeating pixels, stretching them</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'' | + | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">''rmFineResample'');</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;"> | + | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Use resample filters. This gives high quality resampling however this the proportion changes slightly because the first and last pixel are considered to occupy only half a unit as they are considered as the border of the picture (pixel-centered coordinates)</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr | + | <tr style="background: white;"><td colspan="3">''TResampleFilter'' = (</td></tr> |
− | <tr | + | <tr style="background: white;"><td width="10%"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;" colspan="2">List of resample filter to be used with ''rmFineResample''</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'' | + | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">''rfBox'',</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;"> | + | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Equivalent of simple stretch with high quality and pixel-centered coordinates</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: white;">'' | + | <tr><td width="10%"></td><td colspan="2" style="background: white;">''rfLinear'',</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;"> | + | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Linear interpolation giving slow transition between pixels</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'' | + | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">''rfHalfCosine'',</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;"> | + | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Mix of ''rfLinear'' and ''rfCosine'' giving medium speed stransition between pixels</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: white;">'' | + | <tr><td width="10%"></td><td colspan="2" style="background: white;">''rfCosine'',</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;"> | + | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Cosine-like interpolation giving fast transition between pixels</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'' | + | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">''rfBicubic'',</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;"> | + | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Simple bi-cubic filter (blurry)</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: white;">'' | + | <tr><td width="10%"></td><td colspan="2" style="background: white;">''rfMitchell'',</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;"> | + | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Mitchell filter, good for downsizing interpolation</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'' | + | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">''rfSpline'',</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;"> | + | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Spline filter, good for upsizing interpolation, however slightly blurry</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: white;">'' | + | <tr><td width="10%"></td><td colspan="2" style="background: white;">''rfLanczos''2,</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;"> | + | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Lanczos with radius 2, blur is corrected</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'' | + | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">''rfLanczos''3,</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;"> | + | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Lanczos with radius 3, high contrast</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: white;">'' | + | <tr><td width="10%"></td><td colspan="2" style="background: white;">''rfLanczos''4,</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;"> | + | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Lanczos with radius 4, high contrast</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'' | + | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">''rfBestQuality'');</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;"> | + | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Best quality using rfMitchell or rfSpline</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: white;">'' | + | <tr><td width="10%"></td><td colspan="2" style="background: white;">''ResampleFilterStr'' : '''array'''[TResampleFilter] '''of''' '''string''' =</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">List of | + | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">List of strings to represent resample filters</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'' | + | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' StrToResampleFilter(str: '''string'''): TResampleFilter;</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;"> | + | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Gives the sample filter represented by a string</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr | + | <tr style="background: white;"><td colspan="3">''TFloodfillMode'' = (</td></tr> |
− | <tr | + | <tr style="background: white;"><td width="10%"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;" colspan="2">Options when doing a floodfill (also called bucket fill)</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">''' | + | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">''fmSet'',</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;"> | + | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Pixels that are filled are replaced</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: white;">''' | + | <tr><td width="10%"></td><td colspan="2" style="background: white;">''fmDrawWithTransparency'',</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;"> | + | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Pixels that are filled are drawn upon with the fill color</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">''' | + | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">''fmProgressive'');</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;"> | + | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Pixels that are filled are drawn upon to the extent that the color underneath is similar to the start color. The more different the different is, the less it is drawn upon</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr | + | <tr style="background: white;"><td colspan="3">''TMedianOption'' = (moNone, moLowSmooth, moMediumSmooth, moHighSmooth);</td></tr> |
− | <tr | + | <tr style="background: white;"><td width="10%"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;" colspan="2">Specifies how much smoothing is applied to the computation of the median</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr style="background: #f0f0ff;"><td colspan="3">''' | + | <tr style="background: #f0f0ff;"><td colspan="3">''TRadialBlurType'' = (</td></tr> |
− | <tr style="background: #f0f0ff;"><td width="10%"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;" colspan="2"> | + | <tr style="background: #f0f0ff;"><td width="10%"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;" colspan="2">Specifies the shape of a predefined blur</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr | + | <tr><td width="10%"></td><td colspan="2" style="background: white;">''rbNormal'',</td></tr> |
− | <tr | + | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Gaussian-like, pixel importance decreases progressively</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr | + | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">''rbDisk'',</td></tr> |
− | <tr | + | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Disk blur, pixel importance does not decrease progressively</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr style="background: white;"><td colspan="3">'''function''' ByteSqrt(value: byte): byte; '''inline''';</td></tr> | + | <tr><td width="10%"></td><td colspan="2" style="background: white;">''rbCorona'',</td></tr> |
− | <tr style="background: | + | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Pixel are considered when they are at a certain distance</td></tr> |
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">''rbPrecise'',</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Gaussian-like, but 10 times smaller than ''rbNormal''</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">''rbFast'',</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Gaussian-like but simplified to be computed faster</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">''rbBox'');</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Box blur, pixel importance does not decrease progressively and the pixels are included when they are in a square. This is much faster than ''rbFast'' however you may get square shapes in the resulting image</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr style="background: white;"><td colspan="3">''TBGRAImageFormat'' = (</td></tr> | ||
+ | <tr style="background: white;"><td width="10%"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;" colspan="2">List of image formats</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">''ifUnknown'',</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Unknown format</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">''ifJpeg'',</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">JPEG format, opaque, lossy compression</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">''ifPng'',</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">PNG format, transparency, lossless compression</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">''ifGif'',</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">GIF format, single transparent color, lossless in theory but only low number of colors allowed</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">''ifBmp'',</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">BMP format, transparency, no compression. Note that transparency is not supported by all BMP readers so it is not recommended to avoid storing images with transparency in this format</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">''ifIco'',</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">ICO format, contains different sizes of the same image</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">''ifPcx'',</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">PCX format, opaque, rudimentary lossless compression</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">''ifPaintDotNet'',</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Paint.NET format, layers, lossless compression</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">''ifLazPaint'',</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">LazPaint format, layers, lossless compression</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">''ifOpenRaster'',</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">OpenRaster format, layers, lossless compression</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">''ifPsd'',</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Photoshop format, layers, rudimentary lossless compression</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">''ifTarga'',</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Targa format (TGA), transparency, rudimentary lossless compression</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">''ifTiff'',</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">TIFF format, limited support</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">''ifXwd'',</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">X-Window capture, limited support</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">''ifXPixMap'',</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">X-Pixmap, text encoded image, limited support</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">''ifBmpMioMap'');</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">iGO BMP, limited support</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">''DefaultBGRAImageReader'': '''array'''[TBGRAImageFormat] '''of''' TFPCustomImageReaderClass;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">List of stream readers for images</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">''DefaultBGRAImageWriter'': '''array'''[TBGRAImageFormat] '''of''' TFPCustomImageWriterClass;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">List of stream writers for images</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' DetectFileFormat(AFilenameUTF8: '''string'''): TBGRAImageFormat;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Detect the file format of a given file</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' DetectFileFormat(AStream: TStream; ASuggestedExtensionUTF8: '''string''' = ''): TBGRAImageFormat;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Detect the file format of a given stream. ''ASuggestedExtensionUTF8'' can be provided to guess the format</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' SuggestImageFormat(AFilenameOrExtensionUTF8: '''string'''): TBGRAImageFormat;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Returns the file format that is most likely to be stored in the given filename (according to its extension)</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' CreateBGRAImageReader(AFormat: TBGRAImageFormat): TFPCustomImageReader;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Create an image reader for the given format</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' CreateBGRAImageWriter(AFormat: TBGRAImageFormat; AHasTransparentPixels: boolean): TFPCustomImageWriter;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Create an image writer for the given format. ''AHasTransparentPixels'' specifies if alpha channel must be supported</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr style="background: white;"><td colspan="3">'''function''' PositiveMod(value, cycle: Int32'''or'''64): Int32'''or'''64; '''inline'''; '''overload''';</td></tr> | ||
+ | <tr style="background: white;"><td width="10%"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;" colspan="2">Computes the value modulo cycle, and if the ''value'' is negative, the result is still positive</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr style="background: #f0f0ff;"><td colspan="3">'''function''' Sin65536(value: word): Int32'''or'''64; '''inline''';</td></tr> | ||
+ | <tr style="background: #f0f0ff;"><td width="10%"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;" colspan="2">Returns an integer approximation of the sine. Value ranges from 0 to 65535, where 65536 corresponds to the next cycle</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr style="background: white;"><td colspan="3">'''function''' Cos65536(value: word): Int32'''or'''64; '''inline''';</td></tr> | ||
+ | <tr style="background: white;"><td width="10%"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;" colspan="2">Returns an integer approximation of the cosine. Value ranges from 0 to 65535, where 65536 corresponds to the next cycle</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr style="background: #f0f0ff;"><td colspan="3">'''function''' ByteSqrt(value: byte): byte; '''inline''';</td></tr> | ||
+ | <tr style="background: #f0f0ff;"><td width="10%"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;" colspan="2">Returns the square root of the given byte, considering that 255 is equal to unity</td></tr> | ||
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
</table> | </table> |
Revision as of 01:05, 30 April 2015
Miscellaneous types in BGRABitmap.
Miscellaneous types
TRawImageLineOrder = ( | ||
Order of the lines in an image | ||
riloTopToBottom, | ||
The first line in memory (line 0) is the top line | ||
riloBottomToTop); | ||
The first line in memory (line 0) is the bottom line | ||
TRawImageBitOrder = ( | ||
Order of the bits in a byte containing pixel values | ||
riboBitsInOrder, | ||
The lowest bit is on the left. So with a monochrome picture, bit 0 would be pixel 0 | ||
riboReversedBits); | ||
The lowest bit is on the right. So with a momochrome picture, bit 0 would be pixel 7 (bit 1 would be pixel 6, ...) | ||
TRawImageByteOrder = ( | ||
Order of the bytes in a group of byte containing pixel values | ||
riboLSBFirst, | ||
Least significant byte first (little endian) | ||
riboMSBFirst); | ||
most significant byte first (big endian) | ||
TGraphicsBevelCut = | ||
Definition of a single line 3D bevel | ||
bvNone, | ||
No bevel | ||
bvLowered, | ||
Shape is lowered, light is on the bottom-right corner | ||
bvRaised, | ||
Shape is raised, light is on the top-left corner | ||
bvSpace); | ||
Shape is at the same level, there is no particular lighting | ||
TBGRAFontQuality = ( | ||
Quality to be used to render text | ||
fqSystem, | ||
Use the system capabilities. It is rather fast however it may be not be smoothed. | ||
fqSystemClearType, | ||
Use the system capabilities to render with ClearType. This quality is of course better than fqSystem however it may not be perfect. | ||
fqFineAntialiasing, | ||
Garanties a high quality antialiasing. | ||
fqFineClearTypeRGB, | ||
Fine antialiasing with ClearType in assuming an LCD display in red/green/blue order | ||
fqFineClearTypeBGR); | ||
Fine antialiasing with ClearType in assuming an LCD display in blue/green/red order | ||
TFontPixelMetric = record | ||
Measurements of a font | ||
Defined: boolean; | ||
The values have been computed | ||
Baseline, | ||
Position of the baseline, where most letters lie | ||
xLine, | ||
Position of the top of the small letters (x being one of them) | ||
CapLine, | ||
Position of the top of the UPPERCASE letters | ||
DescentLine, | ||
Position of the bottom of letters like g and p | ||
Lineheight: integer; | ||
Total line height including line spacing defined by the font | ||
TFontVerticalAnchor = ( | ||
Vertical anchoring of the font. When text is drawn, a start coordinate is necessary. Text can be positioned in different ways. This enum defines what position it is regarding the font | ||
fvaTop, | ||
The top of the font. Everything will be drawn below the start coordinate. | ||
fvaCenter, | ||
The center of the font | ||
fvaCapLine, | ||
The top of capital letters | ||
fvaCapCenter, | ||
The center of capital letters | ||
fvaXLine, | ||
The top of small letters | ||
fvaXCenter, | ||
The center of small letters | ||
fvaBaseline, | ||
The baseline, the bottom of most letters | ||
fvaDescentLine, | ||
The bottom of letters that go below the baseline | ||
fvaBottom); | ||
The bottom of the font. Everything will be drawn above the start coordinate | ||
TWordBreakHandler = procedure(var ABeforeUTF8, AAfterUTF8: string) of object; | ||
Definition of a function that handles work-break | ||
TBGRATypeWriterAlignment = (twaTopLeft, twaTop, twaTopRight, twaLeft, twaMiddle, twaRight, twaBottomLeft, twaBottom, twaBottomRight); | ||
Alignment for a typewriter, that does not have any more information than a square shape containing glyphs | ||
TBGRATypeWriterOutlineMode = (twoPath, twoFill, twoStroke, twoFillOverStroke, twoStrokeOverFill, twoFillThenStroke, twoStrokeThenFill); | ||
How a typewriter must render its content on a Canvas2d | ||
TBGRATextOutImproveReadabilityMode = (irMask, irNormal, irClearTypeRGB, irClearTypeBGR); | ||
Output mode for the improved renderer for readability. This is used by the font renderer based on LCL in BGRAText | ||
function CleanTextOutString(s: string): string; | ||
Removes line ending and tab characters from a string (for a function like TextOut that does not handle this). this works with UTF8 strings as well | ||
function RemoveLineEnding(var s: string; indexByte: integer): boolean; | ||
Remove the line ending at the specified position or return False. This works with UTF8 strings however the index is the byte index | ||
function RemoveLineEndingUTF8(var sUTF8: string; indexUTF8: integer): boolean; | ||
Remove the line ending at the specified position or return False. The index is the character index, that may be different from the byte index | ||
procedure BGRADefaultWordBreakHandler(var ABefore, AAfter: string); | ||
Default word break handler, that simply divide when there is a space | ||
TResampleMode = ( | ||
How the resample is to be computed | ||
rmSimpleStretch, | ||
Low quality resample by repeating pixels, stretching them | ||
rmFineResample); | ||
Use resample filters. This gives high quality resampling however this the proportion changes slightly because the first and last pixel are considered to occupy only half a unit as they are considered as the border of the picture (pixel-centered coordinates) | ||
TResampleFilter = ( | ||
List of resample filter to be used with rmFineResample | ||
rfBox, | ||
Equivalent of simple stretch with high quality and pixel-centered coordinates | ||
rfLinear, | ||
Linear interpolation giving slow transition between pixels | ||
rfHalfCosine, | ||
Mix of rfLinear and rfCosine giving medium speed stransition between pixels | ||
rfCosine, | ||
Cosine-like interpolation giving fast transition between pixels | ||
rfBicubic, | ||
Simple bi-cubic filter (blurry) | ||
rfMitchell, | ||
Mitchell filter, good for downsizing interpolation | ||
rfSpline, | ||
Spline filter, good for upsizing interpolation, however slightly blurry | ||
rfLanczos2, | ||
Lanczos with radius 2, blur is corrected | ||
rfLanczos3, | ||
Lanczos with radius 3, high contrast | ||
rfLanczos4, | ||
Lanczos with radius 4, high contrast | ||
rfBestQuality); | ||
Best quality using rfMitchell or rfSpline | ||
ResampleFilterStr : array[TResampleFilter] of string = | ||
List of strings to represent resample filters | ||
function StrToResampleFilter(str: string): TResampleFilter; | ||
Gives the sample filter represented by a string | ||
TFloodfillMode = ( | ||
Options when doing a floodfill (also called bucket fill) | ||
fmSet, | ||
Pixels that are filled are replaced | ||
fmDrawWithTransparency, | ||
Pixels that are filled are drawn upon with the fill color | ||
fmProgressive); | ||
Pixels that are filled are drawn upon to the extent that the color underneath is similar to the start color. The more different the different is, the less it is drawn upon | ||
TMedianOption = (moNone, moLowSmooth, moMediumSmooth, moHighSmooth); | ||
Specifies how much smoothing is applied to the computation of the median | ||
TRadialBlurType = ( | ||
Specifies the shape of a predefined blur | ||
rbNormal, | ||
Gaussian-like, pixel importance decreases progressively | ||
rbDisk, | ||
Disk blur, pixel importance does not decrease progressively | ||
rbCorona, | ||
Pixel are considered when they are at a certain distance | ||
rbPrecise, | ||
Gaussian-like, but 10 times smaller than rbNormal | ||
rbFast, | ||
Gaussian-like but simplified to be computed faster | ||
rbBox); | ||
Box blur, pixel importance does not decrease progressively and the pixels are included when they are in a square. This is much faster than rbFast however you may get square shapes in the resulting image | ||
TBGRAImageFormat = ( | ||
List of image formats | ||
ifUnknown, | ||
Unknown format | ||
ifJpeg, | ||
JPEG format, opaque, lossy compression | ||
ifPng, | ||
PNG format, transparency, lossless compression | ||
ifGif, | ||
GIF format, single transparent color, lossless in theory but only low number of colors allowed | ||
ifBmp, | ||
BMP format, transparency, no compression. Note that transparency is not supported by all BMP readers so it is not recommended to avoid storing images with transparency in this format | ||
ifIco, | ||
ICO format, contains different sizes of the same image | ||
ifPcx, | ||
PCX format, opaque, rudimentary lossless compression | ||
ifPaintDotNet, | ||
Paint.NET format, layers, lossless compression | ||
ifLazPaint, | ||
LazPaint format, layers, lossless compression | ||
ifOpenRaster, | ||
OpenRaster format, layers, lossless compression | ||
ifPsd, | ||
Photoshop format, layers, rudimentary lossless compression | ||
ifTarga, | ||
Targa format (TGA), transparency, rudimentary lossless compression | ||
ifTiff, | ||
TIFF format, limited support | ||
ifXwd, | ||
X-Window capture, limited support | ||
ifXPixMap, | ||
X-Pixmap, text encoded image, limited support | ||
ifBmpMioMap); | ||
iGO BMP, limited support | ||
DefaultBGRAImageReader: array[TBGRAImageFormat] of TFPCustomImageReaderClass; | ||
List of stream readers for images | ||
DefaultBGRAImageWriter: array[TBGRAImageFormat] of TFPCustomImageWriterClass; | ||
List of stream writers for images | ||
function DetectFileFormat(AFilenameUTF8: string): TBGRAImageFormat; | ||
Detect the file format of a given file | ||
function DetectFileFormat(AStream: TStream; ASuggestedExtensionUTF8: string = ): TBGRAImageFormat; | ||
Detect the file format of a given stream. ASuggestedExtensionUTF8 can be provided to guess the format | ||
function SuggestImageFormat(AFilenameOrExtensionUTF8: string): TBGRAImageFormat; | ||
Returns the file format that is most likely to be stored in the given filename (according to its extension) | ||
function CreateBGRAImageReader(AFormat: TBGRAImageFormat): TFPCustomImageReader; | ||
Create an image reader for the given format | ||
function CreateBGRAImageWriter(AFormat: TBGRAImageFormat; AHasTransparentPixels: boolean): TFPCustomImageWriter; | ||
Create an image writer for the given format. AHasTransparentPixels specifies if alpha channel must be supported | ||
function PositiveMod(value, cycle: Int32or64): Int32or64; inline; overload; | ||
Computes the value modulo cycle, and if the value is negative, the result is still positive | ||
function Sin65536(value: word): Int32or64; inline; | ||
Returns an integer approximation of the sine. Value ranges from 0 to 65535, where 65536 corresponds to the next cycle | ||
function Cos65536(value: word): Int32or64; inline; | ||
Returns an integer approximation of the cosine. Value ranges from 0 to 65535, where 65536 corresponds to the next cycle | ||
function ByteSqrt(value: byte): byte; inline; | ||
Returns the square root of the given byte, considering that 255 is equal to unity | ||