From 03c18239f2b9798bc2825a9e88c5257993916da6 Mon Sep 17 00:00:00 2001 From: Kuba Sunderland-Ober Date: Thu, 15 Oct 2026 21:33:18 +0200 Subject: [PATCH 1/6] Experimental packages leave the book: their chapters go, their sections are in left_out (owner); a package that moves back gets its chapter again --- WIP.md | 4 +- docs/_book.yml | 114 +++++++++++-------------------------------------- 2 files changed, 26 insertions(+), 92 deletions(-) diff --git a/WIP.md b/WIP.md index a303f340..85803e54 100644 --- a/WIP.md +++ b/WIP.md @@ -35,7 +35,7 @@ sibling. History goes nowhere: git keeps it. Reference documentation is **complete** for all thirteen packages: VBA, VBRUN, VB, WebView2, Assert, CustomControls, CEF, WinEventLogLib, WinNamedPipesLib, WinServicesLib, tbIDE, WinNativeCommonCtls and AppGlobalClassObject. It is adapted from primary sources: Microsoft VBA-Docs (CC-BY-4.0) for the runtime library, `.twin` source for the twinBASIC-specific packages. The CEF and WebView2 packages also carry a tutorial set. -Twenty-six **contributed** packages from TWINSERV have sections under `docs/Reference/Contributed/`: ArrayListLib, FileProps, Fmt, Generics, OLEGuids, WinReg, TwinTimerLib, tbFileSysTools, TBMANLIB, TBMANLIB_Aes, TBMANLIB_ConsoleComponents, TBMANLIB_ConsoleCore, TBMANLIB_Diagnostic, TBMANLIB_Dialog, TBMANLIB_ListBoxHScroll, TBMANLIB_RES, TBMANLIB_Xml, tbProjPacker, tbRegExp, tsJson, tsPwGen, VBA_JSON and xCalendar complete; AutoCompleteLib, BigNumberLib and VBComDlg their main class only. TBMANLIB_ConsoleCore's console claims are checked by its test cases, each on a console screen buffer of its own with its input written by `WriteConsoleInput`; TBMANLIB_ConsoleComponents' follow the source, because the samples harness cannot capture a console. Generics (seven tuple classes) and xCalendar (one control) are each one page (owner), so `analyze` in audit mode lists their classes and members as undocumented. What xCalendar's page says it does at run time comes from `test/package-tests/xCalendar/probe/`, which runs the control on a form in a built exe. Fmt documents its test code (`HelloWorldClass`, `HelloWorldModule`, `Pootle`) in one paragraph of its landing page, which `exclude_from_docs` names; Generics' `exclude_from_docs` names its test code, `HelloWorldModule`, which the page does not mention. VBComDlg's `exclude_from_docs` names `CommonDialogBase`, a module whose public procedures only its class calls. tbRegExp's `exclude_from_docs` names its private engine module, `StaticRegex`, and tbProjPacker's its helper modules, `modImpExp` and `modWin32`: the indexer counts a Public Enum as public even inside a Private Module, because a built-in package's are reached through its library symbol written with an asterisk (`*WinNativeCommonCtls`, as `ImlDrawConstants` says). By its bare name no such enum is reachable, in a built-in or a contributed package (TB5079 on BETA 1005). OLEGuids documents each interface's methods on the interface's page. What TBMANLIB_Dialog's pages say its dialogs do comes from `test/package-tests/TBMANLIB_Dialog/probe/`, which operates them in a built exe on a private desktop; run it again when the package's version changes. TBMANLIB_Dialog 1.1.0.0 has a page of its own for each class except cDialog, which keeps a page for each member, so `analyze` in audit mode lists the members of those one-page classes as undocumented; its `exclude_from_docs` names its test module, `TestModule`, and the seven COM interface declarations that cDialogEx calls inside (`IOleWindow`, `IModalWindow`, `IShellItem`, `IShellItemArray`, `IFileDialog`, `IFileOpenDialog`, `IFileSaveDialog`), which its landing page describes in a paragraph. cDialogEx 1.1.0.0 returns the name of the chosen file, not its path, ignores `InitialDir` and ignores a `Filter` that has no closing pipe, each documented as a WARNING. tbRegExp is the first section drafted by the doc-draft workflow ([WIP.Indexer.md](WIP.Indexer.md#draft-and-the-doc-draft-workflow)), then reviewed against the sources, the package's README and VBScript's own **RegExp** under `cscript`. tbRegExp 1.9.0.0 raises `vbObjectError + 3016` from a search that uses up its step budget and returns nothing (1.8.0.0's `SearchAborted` is gone); the budget is 10 steps for each character squared, at least 1,000,000 and at most 100,000,000, for the search of one match, and `RegExp.SearchStepLimit` replaces it with a fixed number, documented on its own page and in a section of the landing page. On the dev box (BETA 1005, win32) `\d+x` costs between 2.0 and 2.2 × n² steps, so it finishes on 7,000 digits (15 s) and raises on 10,000 (16 s); `(a+)+b` raises in 0.2 s on 30 or 300 `a` but takes 16 s on 3,000; `a*` matches 1,000,000 characters whole in about half a second. Its pattern syntax has a page of its own, `PatternSyntax.md`. Each one has a chapter in the book's Packages part. **ArrayListLib, BigNumberLib, TBMANLIB, TBMANLIB_Aes, TBMANLIB_ConsoleComponents, TBMANLIB_ConsoleCore, TBMANLIB_Diagnostic, TBMANLIB_Dialog, TBMANLIB_ListBoxHScroll, TBMANLIB_Xml, WinReg and xCalendar are listed under Experimental Packages** (`docs/Reference/Experimental.md`, owner): ArrayListLib and WinReg do not compile on BETA 1005 (each documented from its source and a copy of it that builds, its samples compile-only; in a copy of ArrayListLib 1.6.151.1 with the arguments of its three `VSwap` calls passed `ByVal` and `LSetByVal` taking a `LongPtr`, a For Each over a list with no items fails, ToString of such a list never returns, Reverse keeps the middle pair of an even run in place and a second GetEnumerator over a list ignores its arguments; in a copy of WinReg's source with its four failing calls passed `ByVal`, ReadString, GetRegistryValueType and the first ConvertValueToString give wrong results), xCalendar has a grid that keeps the old month's dates when Value is set to another month, and text colour properties that have no effect, BigNumberLib 1.0.2.0 compiles, but loses the minus sign after `IsNegative = True` and in a negative operand of the greatest common divisor and the least common multiple, makes a zero from `AssignFromLong` negative, and does not return from the modular inverse of zero (all four confirmed by a second agent), TBMANLIB 1.0.0.29 does not compile in a 64-bit build (TB5001 in cSubClass, where the window procedure is passed as a Long) and has many members that fail or give wrong results, TBMANLIB_ConsoleComponents cannot take a cConsole of the published TBMANLIB_ConsoleCore (it embeds a copy of it, the same package at 1.0.0.1, whose types the compiler treats as different; checked in a project made by the IDE's own import, in either order), TBMANLIB_ConsoleCore reads keys wrongly, TBMANLIB_Diagnostic cannot create its Dictionary and misplaces List items, TBMANLIB_Dialog 1.1.0.0 has classes that fail at their main task (cDialogFindReplace reports nothing, cDialogPageSetup ignores paper and orientation, cDialogEx returns names without their folder, cDialogPassword shows the password in its confirmation boxes; every defect confirmed by a second agent, owner), TBMANLIB_ListBoxHScroll 1.0.0.1 moves the thumb 20 px per arrow and one page per track click while the list box scrolls its contents by its own step, so thumb and text disagree (confirmed by a second agent, owner), TBMANLIB_Aes runs other cipher modes than the ones named (its default CBC is ECB) and fails the NIST test vectors, and TBMANLIB_Xml's parser misreads self-closing elements and entities and does not return for some malformed text (and its XPath engine reads the step `..` and `and` with `or` wrongly). TBMANLIB_Xml's `exclude_from_docs` names its test module, `mXmlTests`, which its landing page describes in a paragraph, and the five types of its XPath engine (`XPathTokenType`, `XPathAxisType`, `XPathOperator`, `XPathStep`, `XPathPredicate`), which no public member takes or returns and which the mXPath page mentions in a paragraph; tsPwGen's names its five test modules and its six internal modules, and tsJson's its test and internal modules likewise, which their landing pages describe in a paragraph each. See *Where things live* for how a package moves between the two lists. +Twenty-six **contributed** packages from TWINSERV have sections under `docs/Reference/Contributed/`: ArrayListLib, FileProps, Fmt, Generics, OLEGuids, WinReg, TwinTimerLib, tbFileSysTools, TBMANLIB, TBMANLIB_Aes, TBMANLIB_ConsoleComponents, TBMANLIB_ConsoleCore, TBMANLIB_Diagnostic, TBMANLIB_Dialog, TBMANLIB_ListBoxHScroll, TBMANLIB_RES, TBMANLIB_Xml, tbProjPacker, tbRegExp, tsJson, tsPwGen, VBA_JSON and xCalendar complete; AutoCompleteLib, BigNumberLib and VBComDlg their main class only. TBMANLIB_ConsoleCore's console claims are checked by its test cases, each on a console screen buffer of its own with its input written by `WriteConsoleInput`; TBMANLIB_ConsoleComponents' follow the source, because the samples harness cannot capture a console. Generics (seven tuple classes) and xCalendar (one control) are each one page (owner), so `analyze` in audit mode lists their classes and members as undocumented. What xCalendar's page says it does at run time comes from `test/package-tests/xCalendar/probe/`, which runs the control on a form in a built exe. Fmt documents its test code (`HelloWorldClass`, `HelloWorldModule`, `Pootle`) in one paragraph of its landing page, which `exclude_from_docs` names; Generics' `exclude_from_docs` names its test code, `HelloWorldModule`, which the page does not mention. VBComDlg's `exclude_from_docs` names `CommonDialogBase`, a module whose public procedures only its class calls. tbRegExp's `exclude_from_docs` names its private engine module, `StaticRegex`, and tbProjPacker's its helper modules, `modImpExp` and `modWin32`: the indexer counts a Public Enum as public even inside a Private Module, because a built-in package's are reached through its library symbol written with an asterisk (`*WinNativeCommonCtls`, as `ImlDrawConstants` says). By its bare name no such enum is reachable, in a built-in or a contributed package (TB5079 on BETA 1005). OLEGuids documents each interface's methods on the interface's page. What TBMANLIB_Dialog's pages say its dialogs do comes from `test/package-tests/TBMANLIB_Dialog/probe/`, which operates them in a built exe on a private desktop; run it again when the package's version changes. TBMANLIB_Dialog 1.1.0.0 has a page of its own for each class except cDialog, which keeps a page for each member, so `analyze` in audit mode lists the members of those one-page classes as undocumented; its `exclude_from_docs` names its test module, `TestModule`, and the seven COM interface declarations that cDialogEx calls inside (`IOleWindow`, `IModalWindow`, `IShellItem`, `IShellItemArray`, `IFileDialog`, `IFileOpenDialog`, `IFileSaveDialog`), which its landing page describes in a paragraph. cDialogEx 1.1.0.0 returns the name of the chosen file, not its path, ignores `InitialDir` and ignores a `Filter` that has no closing pipe, each documented as a WARNING. tbRegExp is the first section drafted by the doc-draft workflow ([WIP.Indexer.md](WIP.Indexer.md#draft-and-the-doc-draft-workflow)), then reviewed against the sources, the package's README and VBScript's own **RegExp** under `cscript`. tbRegExp 1.9.0.0 raises `vbObjectError + 3016` from a search that uses up its step budget and returns nothing (1.8.0.0's `SearchAborted` is gone); the budget is 10 steps for each character squared, at least 1,000,000 and at most 100,000,000, for the search of one match, and `RegExp.SearchStepLimit` replaces it with a fixed number, documented on its own page and in a section of the landing page. On the dev box (BETA 1005, win32) `\d+x` costs between 2.0 and 2.2 × n² steps, so it finishes on 7,000 digits (15 s) and raises on 10,000 (16 s); `(a+)+b` raises in 0.2 s on 30 or 300 `a` but takes 16 s on 3,000; `a*` matches 1,000,000 characters whole in about half a second. Its pattern syntax has a page of its own, `PatternSyntax.md`. Each one that is not Experimental has a chapter in the book's Packages part; the Experimental ones are left out of the book. **ArrayListLib, BigNumberLib, TBMANLIB, TBMANLIB_Aes, TBMANLIB_ConsoleComponents, TBMANLIB_ConsoleCore, TBMANLIB_Diagnostic, TBMANLIB_Dialog, TBMANLIB_ListBoxHScroll, TBMANLIB_Xml, WinReg and xCalendar are listed under Experimental Packages** (`docs/Reference/Experimental.md`, owner): ArrayListLib and WinReg do not compile on BETA 1005 (each documented from its source and a copy of it that builds, its samples compile-only; in a copy of ArrayListLib 1.6.151.1 with the arguments of its three `VSwap` calls passed `ByVal` and `LSetByVal` taking a `LongPtr`, a For Each over a list with no items fails, ToString of such a list never returns, Reverse keeps the middle pair of an even run in place and a second GetEnumerator over a list ignores its arguments; in a copy of WinReg's source with its four failing calls passed `ByVal`, ReadString, GetRegistryValueType and the first ConvertValueToString give wrong results), xCalendar has a grid that keeps the old month's dates when Value is set to another month, and text colour properties that have no effect, BigNumberLib 1.0.2.0 compiles, but loses the minus sign after `IsNegative = True` and in a negative operand of the greatest common divisor and the least common multiple, makes a zero from `AssignFromLong` negative, and does not return from the modular inverse of zero (all four confirmed by a second agent), TBMANLIB 1.0.0.29 does not compile in a 64-bit build (TB5001 in cSubClass, where the window procedure is passed as a Long) and has many members that fail or give wrong results, TBMANLIB_ConsoleComponents cannot take a cConsole of the published TBMANLIB_ConsoleCore (it embeds a copy of it, the same package at 1.0.0.1, whose types the compiler treats as different; checked in a project made by the IDE's own import, in either order), TBMANLIB_ConsoleCore reads keys wrongly, TBMANLIB_Diagnostic cannot create its Dictionary and misplaces List items, TBMANLIB_Dialog 1.1.0.0 has classes that fail at their main task (cDialogFindReplace reports nothing, cDialogPageSetup ignores paper and orientation, cDialogEx returns names without their folder, cDialogPassword shows the password in its confirmation boxes; every defect confirmed by a second agent, owner), TBMANLIB_ListBoxHScroll 1.0.0.1 moves the thumb 20 px per arrow and one page per track click while the list box scrolls its contents by its own step, so thumb and text disagree (confirmed by a second agent, owner), TBMANLIB_Aes runs other cipher modes than the ones named (its default CBC is ECB) and fails the NIST test vectors, and TBMANLIB_Xml's parser misreads self-closing elements and entities and does not return for some malformed text (and its XPath engine reads the step `..` and `and` with `or` wrongly). TBMANLIB_Xml's `exclude_from_docs` names its test module, `mXmlTests`, which its landing page describes in a paragraph, and the five types of its XPath engine (`XPathTokenType`, `XPathAxisType`, `XPathOperator`, `XPathStep`, `XPathPredicate`), which no public member takes or returns and which the mXPath page mentions in a paragraph; tsPwGen's names its five test modules and its six internal modules, and tsJson's its test and internal modules likewise, which their landing pages describe in a paragraph each. See *Where things live* for how a package moves between the two lists. The rest of this file is the maintenance guide for updating existing pages or adding new ones: package surface notes, page conventions, and the integrity check. @@ -80,7 +80,7 @@ The rest of this file is the maintenance guide for updating existing pages or ad > would file the page as a *static file* and serve the raw markdown. Editors on > Windows add a BOM unasked. `lib/frontmatter.mjs` strips a leading BOM before parsing. - `docs/Reference/Built-In/tbIDE/` — IDE Extensibility package (this is the **addin SDK**). The package is type-only — it ships **public interfaces + CoClasses** that an addin DLL binds to; every implementation behind them lives in the twinBASIC IDE itself. The user-facing surface is one entry-point factory (`tbCreateCompilerAddin`) plus 23 CoClasses grouped by role: the addin contract (`AddIn`), the root API (`Host`), the loaded `Project`, the editors collection (`Editor` / `CodeEditor` / `Editors`), the virtual file system (`FileSystem` / `FileSystemItem` / `Folder` / `File`), the in-IDE UI surface (`Toolbar` / `Toolbars` / `Button` / `ToolWindow` / `ToolWindows`), the HTML DOM inside a tool window (`HtmlElement` / `HtmlElements` / `HtmlElementProperty` / `HtmlElementProperties` / `HtmlEventProperty` / `HtmlEventProperties`), the `DebugConsole`, `KeyboardShortcuts`, `Themes`, and the single concrete user-instantiable helper class `AddinTimer`. Flat layout — one page per CoClass / Class plus the index landing. -- `docs/Reference/Contributed/` — the contributed packages, one folder each, landing page `Contributed.md` beside it. **A package's landing page opens, under its H1, with `**Author:**`** (owner): the publisher TWINSERV lists (`publisher` in `indexer/.packages/manifests/contributed.json`), or the author the package's own sources name when that is someone else (VBA_JSON: Tim Hall, published by WaynePhillipsEA). Next to the author, on the same line, `**Version:**`: the version the section documents, which is its `indexed_from` and changes with it (owner). Then `**On GitHub:**` with a link, when a repository holds the package, or the library the package says it is made from; search GitHub for the package's name and the author's account, and check that the repository holds the package's code (its history too: `TBMANLIB_*` were never in woeoio's `tbman`). A landing page with one or two sections has no `* TOC` list. A class with member pages is a folder, `/index.md` at `/tB/Packages/Contributed///` with its members beside it, so a member links to its class as `(.)`; a class documented on one page is `.md`. Each package is a chapter of the book's Packages part in `_book.yml`. A section's `indexed_from` is the four-part TWINSERV version, and its snapshot is under `indexer/snapshots/contributed/`. **Every NOTE and WARNING of a section is backed by test cases** in the package's test project, `test/package-tests//` (owner; [its README](test/package-tests/README.md)), and names them in a `` marker on the line above it, which `check_package_tests.mjs` in `test.bat` enforces. **A NOTE or WARNING is only for a real difference or limit** (owner): a statement that describes how the package works stays prose, tied to its cases by a region, the marker on a line of its own above it and `` after it (owner). A difference from the object the package replaces that gives a different result silently (tbRegExp's `\1(a)`, `{,m}`, `$~` against VBScript) is a NOTE, not a WARNING (owner). A case checks what is correct, not what the package does (owner): a defect is a failing case, recorded in the project's `expect.json`, so the project tells the package's author what to fix. A section whose project is not written yet is in that gate's `PENDING` set. **A package that does not compile on the newest BETA gets no test project** (owner: ArrayListLib, WinReg): it stays in `PENDING` until a version of it compiles. One that compiles for one architecture only is tested on that one (owner: TBMANLIB, win32; `arches` in its `expect.json`, test/package-tests/README.md). `package-tests.bat` runs the cases; a case it reports *fixed* means the callout goes. **The landing page ends, after See Also, with `## Test cases`**: one or two sentences linking to `-tests.twinproj` (owner), which the build publishes beside the section without the package's code in it (owner; one exception, owner: TBMANLIB_ConsoleComponents' project carries verbatim copies of seven of its component files, in `Sources/ComponentSources/`, because the package's own components cannot be given a console object, and its drawing can be checked only on the copies): it references the package as a linked package, which the reader puts in `%APPDATA%\twinBASIC\packages` ([WIP.PackageTests.md](WIP.PackageTests.md)). Its samples compile in the `contributed-` sample template, whose `Settings` names the package's version: **change that version with `indexed_from`** ([WIP.ExamplesBuild.md](WIP.ExamplesBuild.md#template-projects)). **A contributed package is documented and its samples compiled against the newest twinBASIC BETA installed, never an older one** (owner): the version that matters is the package's, and a statement about the compiler (such as "does not compile on BETA 1005") names that newest build. **A contributed package that does not compile on that build, or has defects that a program would meet, is listed under Experimental Packages** (owner); a minor defect that the section documents does not make it Experimental (owner: VBComDlg, whose Replace All raises no event, stays Contributed; owner: nor does a fixed limit that the section states at the top of its landing page; owner: tsJson 1.0.15.0 stays Contributed, its defects confirmed by a second agent and each stated in a WARNING with a way round it). **A package moves from Contributed to Experimental for its defects only after a separate agent has reproduced each defect independently** and ruled out misuse, a wrong expectation, a twinBASIC defect and the harness (owner): `docs/Reference/Experimental.md`, at `/tB/Packages/Experimental/`, after Contributed Packages. Its landing page's `parent:` is `Experimental Packages`, its line is in `Experimental.md` and not in `Contributed.md`, and its book chapter follows the Experimental Packages chapter. Its folder and URLs stay under `Contributed/`, so a package that is fixed moves back by changing only those three, and its pages keep their addresses. +- `docs/Reference/Contributed/` — the contributed packages, one folder each, landing page `Contributed.md` beside it. **A package's landing page opens, under its H1, with `**Author:**`** (owner): the publisher TWINSERV lists (`publisher` in `indexer/.packages/manifests/contributed.json`), or the author the package's own sources name when that is someone else (VBA_JSON: Tim Hall, published by WaynePhillipsEA). Next to the author, on the same line, `**Version:**`: the version the section documents, which is its `indexed_from` and changes with it (owner). Then `**On GitHub:**` with a link, when a repository holds the package, or the library the package says it is made from; search GitHub for the package's name and the author's account, and check that the repository holds the package's code (its history too: `TBMANLIB_*` were never in woeoio's `tbman`). A landing page with one or two sections has no `* TOC` list. A class with member pages is a folder, `/index.md` at `/tB/Packages/Contributed///` with its members beside it, so a member links to its class as `(.)`; a class documented on one page is `.md`. Each package that is not Experimental is a chapter of the book's Packages part in `_book.yml`. A section's `indexed_from` is the four-part TWINSERV version, and its snapshot is under `indexer/snapshots/contributed/`. **Every NOTE and WARNING of a section is backed by test cases** in the package's test project, `test/package-tests//` (owner; [its README](test/package-tests/README.md)), and names them in a `` marker on the line above it, which `check_package_tests.mjs` in `test.bat` enforces. **A NOTE or WARNING is only for a real difference or limit** (owner): a statement that describes how the package works stays prose, tied to its cases by a region, the marker on a line of its own above it and `` after it (owner). A difference from the object the package replaces that gives a different result silently (tbRegExp's `\1(a)`, `{,m}`, `$~` against VBScript) is a NOTE, not a WARNING (owner). A case checks what is correct, not what the package does (owner): a defect is a failing case, recorded in the project's `expect.json`, so the project tells the package's author what to fix. A section whose project is not written yet is in that gate's `PENDING` set. **A package that does not compile on the newest BETA gets no test project** (owner: ArrayListLib, WinReg): it stays in `PENDING` until a version of it compiles. One that compiles for one architecture only is tested on that one (owner: TBMANLIB, win32; `arches` in its `expect.json`, test/package-tests/README.md). `package-tests.bat` runs the cases; a case it reports *fixed* means the callout goes. **The landing page ends, after See Also, with `## Test cases`**: one or two sentences linking to `-tests.twinproj` (owner), which the build publishes beside the section without the package's code in it (owner; one exception, owner: TBMANLIB_ConsoleComponents' project carries verbatim copies of seven of its component files, in `Sources/ComponentSources/`, because the package's own components cannot be given a console object, and its drawing can be checked only on the copies): it references the package as a linked package, which the reader puts in `%APPDATA%\twinBASIC\packages` ([WIP.PackageTests.md](WIP.PackageTests.md)). Its samples compile in the `contributed-` sample template, whose `Settings` names the package's version: **change that version with `indexed_from`** ([WIP.ExamplesBuild.md](WIP.ExamplesBuild.md#template-projects)). **A contributed package is documented and its samples compiled against the newest twinBASIC BETA installed, never an older one** (owner): the version that matters is the package's, and a statement about the compiler (such as "does not compile on BETA 1005") names that newest build. **A contributed package that does not compile on that build, or has defects that a program would meet, is listed under Experimental Packages** (owner); a minor defect that the section documents does not make it Experimental (owner: VBComDlg, whose Replace All raises no event, stays Contributed; owner: nor does a fixed limit that the section states at the top of its landing page; owner: tsJson 1.0.15.0 stays Contributed, its defects confirmed by a second agent and each stated in a WARNING with a way round it). **A package moves from Contributed to Experimental for its defects only after a separate agent has reproduced each defect independently** and ruled out misuse, a wrong expectation, a twinBASIC defect and the harness (owner): `docs/Reference/Experimental.md`, at `/tB/Packages/Experimental/`, after Contributed Packages. Its landing page's `parent:` is `Experimental Packages`, its line is in `Experimental.md` and not in `Contributed.md`, and it has no chapter in the PDF book (owner: the book is for packages ready for use in a program): its entry is in `left_out:` of `docs/_book.yml`, in the list of Experimental packages, and the Experimental Packages page is left out with it. Its folder and URLs stay under `Contributed/`, so a package that is fixed moves back by changing only those three and the book (its entry leaves `left_out:` and its chapter is added after VBComDlg's), and its pages keep their addresses. A link from a book page to a left-out one opens the website. - `docs/Downloads/index.md` — the Downloads page, `/Downloads`, a top-level page at `nav_order: 4` and in `_book.yml`'s `left_out:`. **Every file the documentation publishes for readers has a card or a row there**, and the page that documents it keeps its own link (owner). Cards are `
` inside `
` (styles at the end of `custom.scss`), with the theme's `.btn` for each file. The release job publishes every same-site link on the built page that has the `download` attribute, beside the zip and the PDF, so a new download needs no change to the workflow. `{{tbdocs:size:}}` gives a published file's size and `{{tbdocs:packageTestRows}}` the test projects' rows, both expanded before render; the help add-in's size is prose ("about 51 MB" in October 2026; it is also on the Help Add-In page), because its project embeds the offline tree, this page included, so it cannot be known before render. The PDF's release URL spells it `twinBASIC.Book.pdf`: GitHub turns the space into a dot, and the spaced name 404s. The footer's **Read Offline** link (`read_offline_link` in `_config.yml`) goes to the page's `#read-offline`. - `docs/Reference/Statements.md` — alphabetical index of language statements. - `docs/Reference/Procedures and Functions.md` — alphabetical index of procedures/functions. diff --git a/docs/_book.yml b/docs/_book.yml index 3fd648f1..2806e349 100644 --- a/docs/_book.yml +++ b/docs/_book.yml @@ -600,96 +600,6 @@ parts: landing_is_target: true outline_closed: true - - title: Experimental Packages - subtitle: Community packages from TWINSERV that are not yet ready for use in a program - landing_page: /tB/Packages/Experimental/ - landing_is_target: true - outline_closed: true - - - title: ArrayListLib Package - subtitle: A list class in place of the ArrayList of .NET - landing_page: /tB/Packages/Contributed/ArrayListLib/ - page: /tB/Packages/Contributed/ArrayListLib/ - landing_is_target: true - outline_closed: true - - - title: BigNumberLib Package - subtitle: Arbitrary-precision signed integer arithmetic - landing_page: /tB/Packages/Contributed/BigNumberLib/ - page: /tB/Packages/Contributed/BigNumberLib/ - landing_is_target: true - outline_closed: true - - - title: TBMANLIB Package - subtitle: A toolkit of helpers for JSON, logs, INI files, strings, bytes, files and dictionaries - landing_page: /tB/Packages/Contributed/TBMANLIB/ - page: /tB/Packages/Contributed/TBMANLIB/ - landing_is_target: true - outline_closed: true - - - title: TBMANLIB_Aes Package - subtitle: AES encryption of text and byte arrays, through the Windows Crypto API and CNG - landing_page: /tB/Packages/Contributed/TBMANLIB_Aes/ - page: /tB/Packages/Contributed/TBMANLIB_Aes/ - landing_is_target: true - outline_closed: true - - - title: TBMANLIB_ConsoleComponents Package - subtitle: Text-interface components for console programs, drawn into the buffer of TBMANLIB_ConsoleCore - landing_page: /tB/Packages/Contributed/TBMANLIB_ConsoleComponents/ - page: /tB/Packages/Contributed/TBMANLIB_ConsoleComponents/ - landing_is_target: true - outline_closed: true - - - title: TBMANLIB_ConsoleCore Package - subtitle: A console library with colours, UTF-8 and a full-screen mode - landing_page: /tB/Packages/Contributed/TBMANLIB_ConsoleCore/ - page: /tB/Packages/Contributed/TBMANLIB_ConsoleCore/ - landing_is_target: true - outline_closed: true - - - title: TBMANLIB_Diagnostic Package - subtitle: A diagnostic report of the computer and its processes, as text, JSON or HTML - landing_page: /tB/Packages/Contributed/TBMANLIB_Diagnostic/ - page: /tB/Packages/Contributed/TBMANLIB_Diagnostic/ - landing_is_target: true - outline_closed: true - - - title: TBMANLIB_Dialog Package - subtitle: Open, Save, folder, Color, Font, Print and other dialogs in classes, with file filters and path helpers - landing_page: /tB/Packages/Contributed/TBMANLIB_Dialog/ - page: /tB/Packages/Contributed/TBMANLIB_Dialog/ - landing_is_target: true - outline_closed: true - - - title: TBMANLIB_ListBoxHScroll Package - subtitle: A horizontal scroll bar for a ListBox - landing_page: /tB/Packages/Contributed/TBMANLIB_ListBoxHScroll/ - page: /tB/Packages/Contributed/TBMANLIB_ListBoxHScroll/ - landing_is_target: true - outline_closed: true - - - title: TBMANLIB_Xml Package - subtitle: XML documents parsed, edited and written, in twinBASIC code - landing_page: /tB/Packages/Contributed/TBMANLIB_Xml/ - page: /tB/Packages/Contributed/TBMANLIB_Xml/ - landing_is_target: true - outline_closed: true - - - title: WinReg Package - subtitle: Registry keys and values, read, written, deleted and enumerated - landing_page: /tB/Packages/Contributed/WinReg/ - page: /tB/Packages/Contributed/WinReg/ - landing_is_target: true - outline_closed: true - - - title: xCalendar Package - subtitle: A calendar control, in place of the Calendar control of MSCAL.OCX - landing_page: /tB/Packages/Contributed/xCalendar/ - page: /tB/Packages/Contributed/xCalendar/ - landing_is_target: true - outline_closed: true - - title: Appendices outline_closed: false @@ -719,6 +629,30 @@ left_out: - reason: Time-limited community contests page: /Challenges + # A package moves here from its chapter when it is listed under + # Experimental Packages, and gets its chapter back (after VBComDlg's) when + # it moves back to Contributed Packages. A section's pages share its folder + # URL, so one entry covers a package; a prefix ending in `/` cannot match + # another package whose name begins the same (TBMANLIB, TBMANLIB_Aes). + - reason: Experimental packages, which do not yet work well enough to use in a program; the book is for packages ready for use + no_descent: true + page: /tB/Packages/Experimental/ + + - reason: Experimental packages, which do not yet work well enough to use in a program; the book is for packages ready for use + pages: + - /tB/Packages/Contributed/ArrayListLib/ + - /tB/Packages/Contributed/BigNumberLib/ + - /tB/Packages/Contributed/TBMANLIB/ + - /tB/Packages/Contributed/TBMANLIB_Aes/ + - /tB/Packages/Contributed/TBMANLIB_ConsoleComponents/ + - /tB/Packages/Contributed/TBMANLIB_ConsoleCore/ + - /tB/Packages/Contributed/TBMANLIB_Diagnostic/ + - /tB/Packages/Contributed/TBMANLIB_Dialog/ + - /tB/Packages/Contributed/TBMANLIB_ListBoxHScroll/ + - /tB/Packages/Contributed/TBMANLIB_Xml/ + - /tB/Packages/Contributed/WinReg/ + - /tB/Packages/Contributed/xCalendar/ + - reason: IDE pages that are still screenshots and the labels they show, or headings with nothing under them no_descent: true pages: From 3979b96e5a124341399d986e7dca82cc3726d2e1 Mon Sep 17 00:00:00 2001 From: Kuba Sunderland-Ober Date: Thu, 15 Oct 2026 21:59:20 +0200 Subject: [PATCH 2/6] GdiPlus 0.9.45.0 section: 164 pages written from its sources, the author's documentation and GDI+'s, with 320 compiled samples (283 run); listed under Experimental Packages (owner, its author) and left out of the book; its many defects stated where they are met --- WIP.md | 2 +- builder/page-baseline.json | 2 +- .../Reference/Contributed/GdiPlus/ArrowCap.md | 158 + docs/Reference/Contributed/GdiPlus/Bitmap.md | 495 ++ docs/Reference/Contributed/GdiPlus/Blur.md | 88 + .../Contributed/GdiPlus/BrightnessContrast.md | 95 + .../Contributed/GdiPlus/CachedBitmap.md | 90 + .../Contributed/GdiPlus/ColorBalance.md | 96 + .../Contributed/GdiPlus/ColorCurve.md | 93 + .../Reference/Contributed/GdiPlus/ColorLUT.md | 106 + .../Contributed/GdiPlus/ColorMatrixEffect.md | 96 + .../Contributed/GdiPlus/CustomLineCap.md | 217 + docs/Reference/Contributed/GdiPlus/Effect.md | 144 + .../GdiPlus/Enumerations/CColor.md | 186 + .../GdiPlus/Enumerations/ColorAdjustType.md | 33 + .../GdiPlus/Enumerations/ColorChannelFlags.md | 30 + .../GdiPlus/Enumerations/ColorMask.md | 44 + .../GdiPlus/Enumerations/ColorMatrixFlags.md | 29 + .../GdiPlus/Enumerations/ColorMode.md | 22 + .../GdiPlus/Enumerations/ColorShift.md | 24 + .../GdiPlus/Enumerations/CurveAdjustments.md | 35 + .../GdiPlus/Enumerations/CurveChannel.md | 29 + .../GdiPlus/Enumerations/DitherType.md | 37 + .../Enumerations/FillStyleConstants.md | 27 + .../Enumerations/GdiplusDebugEventLevel.md | 27 + .../Enumerations/GdiplusStartupParams.md | 39 + .../GdiPlus/Enumerations/GpBrushType.md | 37 + .../GdiPlus/Enumerations/GpCombineMode.md | 30 + .../GdiPlus/Enumerations/GpCompositingMode.md | 31 + .../Enumerations/GpCompositingQuality.md | 32 + .../Enumerations/GpConvertToEmfPlusFlags.md | 24 + .../GdiPlus/Enumerations/GpCoordinateSpace.md | 29 + .../Enumerations/GpCustomLineCapType.md | 22 + .../GdiPlus/Enumerations/GpDashCap.md | 29 + .../GdiPlus/Enumerations/GpDashStyle.md | 55 + .../Enumerations/GpDriverStringOptions.md | 30 + .../Contributed/GdiPlus/Enumerations/GpEMR.md | 145 + .../Enumerations/GpEmfPlusRecordType.md | 313 + .../Enumerations/GpEmfToWmfBitsFlags.md | 29 + .../GdiPlus/Enumerations/GpEmfType.md | 29 + .../GpEncoderParameterValueType.md | 36 + .../GdiPlus/Enumerations/GpEncoderValue.md | 47 + .../Enumerations/GpErrorHandlingStrategy.md | 45 + .../GdiPlus/Enumerations/GpFillmode.md | 57 + .../GdiPlus/Enumerations/GpFlushIntention.md | 26 + .../GdiPlus/Enumerations/GpFontStyle.md | 49 + .../Enumerations/GpGenericFontFamily.md | 23 + .../GdiPlus/Enumerations/GpHatchStyle.md | 83 + .../GdiPlus/Enumerations/GpHotkeyPrefix.md | 27 + .../GdiPlus/Enumerations/GpImageCodecFlags.md | 34 + .../GdiPlus/Enumerations/GpImageType.md | 27 + .../Enumerations/GpInterpolationMode.md | 57 + .../GdiPlus/Enumerations/GpLineCap.md | 39 + .../GdiPlus/Enumerations/GpLineJoin.md | 30 + .../Enumerations/GpLinearGradientMode.md | 28 + .../GdiPlus/Enumerations/GpMatrixOrder.md | 59 + .../Enumerations/GpMetafileFrameUnit.md | 32 + .../Enumerations/GpMetafileFunctions.md | 102 + .../GdiPlus/Enumerations/GpMetafileType.md | 29 + .../GdiPlus/Enumerations/GpObjectType.md | 38 + .../GdiPlus/Enumerations/GpPathPointType.md | 61 + .../GdiPlus/Enumerations/GpPenAlignment.md | 26 + .../GdiPlus/Enumerations/GpPenType.md | 32 + .../GdiPlus/Enumerations/GpPixelOffsetMode.md | 32 + .../GdiPlus/Enumerations/GpPropertyTagType.md | 38 + .../GdiPlus/Enumerations/GpQualityMode.md | 26 + .../GdiPlus/Enumerations/GpSmoothingMode.md | 56 + .../GdiPlus/Enumerations/GpStatus.md | 51 + .../GdiPlus/Enumerations/GpStringAlignment.md | 29 + .../Enumerations/GpStringDigitSubstitute.md | 28 + .../Enumerations/GpStringFormatFlags.md | 54 + .../GdiPlus/Enumerations/GpStringTrimming.md | 32 + .../GdiPlus/Enumerations/GpTestControlEnum.md | 27 + .../Enumerations/GpTextRenderingHint.md | 35 + .../GdiPlus/Enumerations/GpUnit.md | 37 + .../GdiPlus/Enumerations/GpWarpMode.md | 26 + .../GdiPlus/Enumerations/GpWrapMode.md | 35 + .../Enumerations/GraphicsCreationOptions.md | 44 + .../GdiPlus/Enumerations/GraphicsFlags.md | 24 + .../GdiPlus/Enumerations/HistogramFormat.md | 34 + .../GdiPlus/Enumerations/ImageFlags.md | 42 + .../GdiPlus/Enumerations/ImageLockMode.md | 29 + .../GdiPlus/Enumerations/ItemDataPosition.md | 24 + .../GdiPlus/Enumerations/PaletteFlags.md | 28 + .../GdiPlus/Enumerations/PaletteType.md | 37 + .../GdiPlus/Enumerations/PixelFormat.md | 73 + .../GdiPlus/Enumerations/RotateFlipType.md | 61 + .../Contributed/GdiPlus/Enumerations/index.md | 125 + docs/Reference/Contributed/GdiPlus/Font.md | 249 + .../Contributed/GdiPlus/FontCollection.md | 57 + .../Contributed/GdiPlus/FontFamily.md | 176 + .../Contributed/GdiPlus/GdiPlusAbort.md | 40 + .../Contributed/GdiPlus/GdiPlusBase.md | 152 + .../Contributed/GdiPlus/GdiPlusUser.md | 120 + .../Reference/Contributed/GdiPlus/Graphics.md | 1957 ++++ .../Contributed/GdiPlus/GraphicsPath.md | 744 ++ .../Contributed/GdiPlus/HatchBrush.md | 132 + docs/Reference/Contributed/GdiPlus/Helpers.md | 729 ++ .../GdiPlus/HueSaturationLightness.md | 97 + docs/Reference/Contributed/GdiPlus/IBrush.md | 105 + .../Contributed/GdiPlus/IDeviceContext.md | 63 + .../Contributed/GdiPlus/IImageBytes.md | 72 + .../Contributed/GdiPlus/ITransformable.md | 127 + docs/Reference/Contributed/GdiPlus/Image.md | 479 + .../Contributed/GdiPlus/ImageAttributes.md | 462 + .../Contributed/GdiPlus/ImageCodec.md | 215 + .../GdiPlus/InstalledFontCollection.md | 40 + docs/Reference/Contributed/GdiPlus/Levels.md | 95 + .../GdiPlus/LinearGradientBrush.md | 389 + docs/Reference/Contributed/GdiPlus/Matrix.md | 393 + .../Reference/Contributed/GdiPlus/Metafile.md | 260 + .../Reference/Contributed/GdiPlus/PathData.md | 164 + .../Contributed/GdiPlus/PathGradientBrush.md | 440 + .../Contributed/GdiPlus/PathIterator.md | 298 + docs/Reference/Contributed/GdiPlus/Pen.md | 508 ++ .../GdiPlus/PrivateFontCollection.md | 72 + .../Contributed/GdiPlus/RedEyeCorrection.md | 64 + docs/Reference/Contributed/GdiPlus/Region.md | 422 + docs/Reference/Contributed/GdiPlus/Sharpen.md | 85 + .../Contributed/GdiPlus/SolidBrush.md | 138 + .../Contributed/GdiPlus/StringFormat.md | 499 ++ .../Contributed/GdiPlus/TextureBrush.md | 291 + docs/Reference/Contributed/GdiPlus/Tint.md | 86 + .../Contributed/GdiPlus/Types/BitmapData.md | 48 + .../Contributed/GdiPlus/Types/BlurParams.md | 48 + .../GdiPlus/Types/BrightnessContrastParams.md | 45 + .../GdiPlus/Types/CharacterRange.md | 55 + .../Contributed/GdiPlus/Types/Color.md | 323 + .../GdiPlus/Types/ColorBalanceParams.md | 47 + .../GdiPlus/Types/ColorChannelLUT.md | 33 + .../GdiPlus/Types/ColorCurveParams.md | 50 + .../GdiPlus/Types/ColorLUTParams.md | 60 + .../Contributed/GdiPlus/Types/ColorMap.md | 42 + .../Contributed/GdiPlus/Types/ColorMatrix.md | 76 + .../Contributed/GdiPlus/Types/ColorPalette.md | 64 + .../GdiPlus/Types/GdiplusStartupInput.md | 77 + .../GdiPlus/Types/GdiplusStartupOutput.md | 68 + .../GdiPlus/Types/GpEncoderParameter.md | 105 + .../GdiPlus/Types/GpImageCodecInfo.md | 96 + .../GdiPlus/Types/GpImageItemData.md | 40 + .../Contributed/GdiPlus/Types/GpPoint.md | 170 + .../Contributed/GdiPlus/Types/GpPointF.md | 245 + .../GdiPlus/Types/GpPropertyItem.md | 99 + .../Contributed/GdiPlus/Types/GpRect.md | 293 + .../Contributed/GdiPlus/Types/GpRectF.md | 307 + .../Contributed/GdiPlus/Types/GpSize.md | 145 + .../Contributed/GdiPlus/Types/GpSizeF.md | 208 + .../Types/HueSaturationLightnessParams.md | 52 + .../Contributed/GdiPlus/Types/LevelsParams.md | 50 + .../Contributed/GdiPlus/Types/Marker.md | 39 + .../Contributed/GdiPlus/Types/MarkerPath.md | 25 + .../GdiPlus/Types/MetafileHeader.md | 111 + .../Contributed/GdiPlus/Types/PWMFRect16.md | 40 + .../GdiPlus/Types/PathPointType.md | 67 + .../Contributed/GdiPlus/Types/PathType.md | 38 + .../GdiPlus/Types/RedEyeCorrectionParams.md | 97 + .../GdiPlus/Types/SharpenParams.md | 45 + .../Contributed/GdiPlus/Types/SubPath.md | 36 + .../Contributed/GdiPlus/Types/SubPathPath.md | 26 + .../Contributed/GdiPlus/Types/TintParams.md | 45 + .../Contributed/GdiPlus/Types/TypedPoint.md | 35 + .../Contributed/GdiPlus/Types/TypedPoints.md | 43 + .../GdiPlus/Types/WmfPlaceableFileHeader.md | 49 + .../Contributed/GdiPlus/Types/index.md | 80 + .../Contributed/GdiPlus/VBGraphics.md | 201 + docs/Reference/Contributed/GdiPlus/index.md | 277 + docs/Reference/Experimental.md | 1 + docs/_book.yml | 1 + .../snapshots/contributed/GdiPlus/api.json | 7834 +++++++++++++++++ scripts/check_package_tests.mjs | 2 +- .../contributed-GdiPlus/Settings | 74 + 171 files changed, 27322 insertions(+), 3 deletions(-) create mode 100644 docs/Reference/Contributed/GdiPlus/ArrowCap.md create mode 100644 docs/Reference/Contributed/GdiPlus/Bitmap.md create mode 100644 docs/Reference/Contributed/GdiPlus/Blur.md create mode 100644 docs/Reference/Contributed/GdiPlus/BrightnessContrast.md create mode 100644 docs/Reference/Contributed/GdiPlus/CachedBitmap.md create mode 100644 docs/Reference/Contributed/GdiPlus/ColorBalance.md create mode 100644 docs/Reference/Contributed/GdiPlus/ColorCurve.md create mode 100644 docs/Reference/Contributed/GdiPlus/ColorLUT.md create mode 100644 docs/Reference/Contributed/GdiPlus/ColorMatrixEffect.md create mode 100644 docs/Reference/Contributed/GdiPlus/CustomLineCap.md create mode 100644 docs/Reference/Contributed/GdiPlus/Effect.md create mode 100644 docs/Reference/Contributed/GdiPlus/Enumerations/CColor.md create mode 100644 docs/Reference/Contributed/GdiPlus/Enumerations/ColorAdjustType.md create mode 100644 docs/Reference/Contributed/GdiPlus/Enumerations/ColorChannelFlags.md create mode 100644 docs/Reference/Contributed/GdiPlus/Enumerations/ColorMask.md create mode 100644 docs/Reference/Contributed/GdiPlus/Enumerations/ColorMatrixFlags.md create mode 100644 docs/Reference/Contributed/GdiPlus/Enumerations/ColorMode.md create mode 100644 docs/Reference/Contributed/GdiPlus/Enumerations/ColorShift.md create mode 100644 docs/Reference/Contributed/GdiPlus/Enumerations/CurveAdjustments.md create mode 100644 docs/Reference/Contributed/GdiPlus/Enumerations/CurveChannel.md create mode 100644 docs/Reference/Contributed/GdiPlus/Enumerations/DitherType.md create mode 100644 docs/Reference/Contributed/GdiPlus/Enumerations/FillStyleConstants.md create mode 100644 docs/Reference/Contributed/GdiPlus/Enumerations/GdiplusDebugEventLevel.md create mode 100644 docs/Reference/Contributed/GdiPlus/Enumerations/GdiplusStartupParams.md create mode 100644 docs/Reference/Contributed/GdiPlus/Enumerations/GpBrushType.md create mode 100644 docs/Reference/Contributed/GdiPlus/Enumerations/GpCombineMode.md create mode 100644 docs/Reference/Contributed/GdiPlus/Enumerations/GpCompositingMode.md create mode 100644 docs/Reference/Contributed/GdiPlus/Enumerations/GpCompositingQuality.md create mode 100644 docs/Reference/Contributed/GdiPlus/Enumerations/GpConvertToEmfPlusFlags.md create mode 100644 docs/Reference/Contributed/GdiPlus/Enumerations/GpCoordinateSpace.md create mode 100644 docs/Reference/Contributed/GdiPlus/Enumerations/GpCustomLineCapType.md create mode 100644 docs/Reference/Contributed/GdiPlus/Enumerations/GpDashCap.md create mode 100644 docs/Reference/Contributed/GdiPlus/Enumerations/GpDashStyle.md create mode 100644 docs/Reference/Contributed/GdiPlus/Enumerations/GpDriverStringOptions.md create mode 100644 docs/Reference/Contributed/GdiPlus/Enumerations/GpEMR.md create mode 100644 docs/Reference/Contributed/GdiPlus/Enumerations/GpEmfPlusRecordType.md create mode 100644 docs/Reference/Contributed/GdiPlus/Enumerations/GpEmfToWmfBitsFlags.md create mode 100644 docs/Reference/Contributed/GdiPlus/Enumerations/GpEmfType.md create mode 100644 docs/Reference/Contributed/GdiPlus/Enumerations/GpEncoderParameterValueType.md create mode 100644 docs/Reference/Contributed/GdiPlus/Enumerations/GpEncoderValue.md create mode 100644 docs/Reference/Contributed/GdiPlus/Enumerations/GpErrorHandlingStrategy.md create mode 100644 docs/Reference/Contributed/GdiPlus/Enumerations/GpFillmode.md create mode 100644 docs/Reference/Contributed/GdiPlus/Enumerations/GpFlushIntention.md create mode 100644 docs/Reference/Contributed/GdiPlus/Enumerations/GpFontStyle.md create mode 100644 docs/Reference/Contributed/GdiPlus/Enumerations/GpGenericFontFamily.md create mode 100644 docs/Reference/Contributed/GdiPlus/Enumerations/GpHatchStyle.md create mode 100644 docs/Reference/Contributed/GdiPlus/Enumerations/GpHotkeyPrefix.md create mode 100644 docs/Reference/Contributed/GdiPlus/Enumerations/GpImageCodecFlags.md create mode 100644 docs/Reference/Contributed/GdiPlus/Enumerations/GpImageType.md create mode 100644 docs/Reference/Contributed/GdiPlus/Enumerations/GpInterpolationMode.md create mode 100644 docs/Reference/Contributed/GdiPlus/Enumerations/GpLineCap.md create mode 100644 docs/Reference/Contributed/GdiPlus/Enumerations/GpLineJoin.md create mode 100644 docs/Reference/Contributed/GdiPlus/Enumerations/GpLinearGradientMode.md create mode 100644 docs/Reference/Contributed/GdiPlus/Enumerations/GpMatrixOrder.md create mode 100644 docs/Reference/Contributed/GdiPlus/Enumerations/GpMetafileFrameUnit.md create mode 100644 docs/Reference/Contributed/GdiPlus/Enumerations/GpMetafileFunctions.md create mode 100644 docs/Reference/Contributed/GdiPlus/Enumerations/GpMetafileType.md create mode 100644 docs/Reference/Contributed/GdiPlus/Enumerations/GpObjectType.md create mode 100644 docs/Reference/Contributed/GdiPlus/Enumerations/GpPathPointType.md create mode 100644 docs/Reference/Contributed/GdiPlus/Enumerations/GpPenAlignment.md create mode 100644 docs/Reference/Contributed/GdiPlus/Enumerations/GpPenType.md create mode 100644 docs/Reference/Contributed/GdiPlus/Enumerations/GpPixelOffsetMode.md create mode 100644 docs/Reference/Contributed/GdiPlus/Enumerations/GpPropertyTagType.md create mode 100644 docs/Reference/Contributed/GdiPlus/Enumerations/GpQualityMode.md create mode 100644 docs/Reference/Contributed/GdiPlus/Enumerations/GpSmoothingMode.md create mode 100644 docs/Reference/Contributed/GdiPlus/Enumerations/GpStatus.md create mode 100644 docs/Reference/Contributed/GdiPlus/Enumerations/GpStringAlignment.md create mode 100644 docs/Reference/Contributed/GdiPlus/Enumerations/GpStringDigitSubstitute.md create mode 100644 docs/Reference/Contributed/GdiPlus/Enumerations/GpStringFormatFlags.md create mode 100644 docs/Reference/Contributed/GdiPlus/Enumerations/GpStringTrimming.md create mode 100644 docs/Reference/Contributed/GdiPlus/Enumerations/GpTestControlEnum.md create mode 100644 docs/Reference/Contributed/GdiPlus/Enumerations/GpTextRenderingHint.md create mode 100644 docs/Reference/Contributed/GdiPlus/Enumerations/GpUnit.md create mode 100644 docs/Reference/Contributed/GdiPlus/Enumerations/GpWarpMode.md create mode 100644 docs/Reference/Contributed/GdiPlus/Enumerations/GpWrapMode.md create mode 100644 docs/Reference/Contributed/GdiPlus/Enumerations/GraphicsCreationOptions.md create mode 100644 docs/Reference/Contributed/GdiPlus/Enumerations/GraphicsFlags.md create mode 100644 docs/Reference/Contributed/GdiPlus/Enumerations/HistogramFormat.md create mode 100644 docs/Reference/Contributed/GdiPlus/Enumerations/ImageFlags.md create mode 100644 docs/Reference/Contributed/GdiPlus/Enumerations/ImageLockMode.md create mode 100644 docs/Reference/Contributed/GdiPlus/Enumerations/ItemDataPosition.md create mode 100644 docs/Reference/Contributed/GdiPlus/Enumerations/PaletteFlags.md create mode 100644 docs/Reference/Contributed/GdiPlus/Enumerations/PaletteType.md create mode 100644 docs/Reference/Contributed/GdiPlus/Enumerations/PixelFormat.md create mode 100644 docs/Reference/Contributed/GdiPlus/Enumerations/RotateFlipType.md create mode 100644 docs/Reference/Contributed/GdiPlus/Enumerations/index.md create mode 100644 docs/Reference/Contributed/GdiPlus/Font.md create mode 100644 docs/Reference/Contributed/GdiPlus/FontCollection.md create mode 100644 docs/Reference/Contributed/GdiPlus/FontFamily.md create mode 100644 docs/Reference/Contributed/GdiPlus/GdiPlusAbort.md create mode 100644 docs/Reference/Contributed/GdiPlus/GdiPlusBase.md create mode 100644 docs/Reference/Contributed/GdiPlus/GdiPlusUser.md create mode 100644 docs/Reference/Contributed/GdiPlus/Graphics.md create mode 100644 docs/Reference/Contributed/GdiPlus/GraphicsPath.md create mode 100644 docs/Reference/Contributed/GdiPlus/HatchBrush.md create mode 100644 docs/Reference/Contributed/GdiPlus/Helpers.md create mode 100644 docs/Reference/Contributed/GdiPlus/HueSaturationLightness.md create mode 100644 docs/Reference/Contributed/GdiPlus/IBrush.md create mode 100644 docs/Reference/Contributed/GdiPlus/IDeviceContext.md create mode 100644 docs/Reference/Contributed/GdiPlus/IImageBytes.md create mode 100644 docs/Reference/Contributed/GdiPlus/ITransformable.md create mode 100644 docs/Reference/Contributed/GdiPlus/Image.md create mode 100644 docs/Reference/Contributed/GdiPlus/ImageAttributes.md create mode 100644 docs/Reference/Contributed/GdiPlus/ImageCodec.md create mode 100644 docs/Reference/Contributed/GdiPlus/InstalledFontCollection.md create mode 100644 docs/Reference/Contributed/GdiPlus/Levels.md create mode 100644 docs/Reference/Contributed/GdiPlus/LinearGradientBrush.md create mode 100644 docs/Reference/Contributed/GdiPlus/Matrix.md create mode 100644 docs/Reference/Contributed/GdiPlus/Metafile.md create mode 100644 docs/Reference/Contributed/GdiPlus/PathData.md create mode 100644 docs/Reference/Contributed/GdiPlus/PathGradientBrush.md create mode 100644 docs/Reference/Contributed/GdiPlus/PathIterator.md create mode 100644 docs/Reference/Contributed/GdiPlus/Pen.md create mode 100644 docs/Reference/Contributed/GdiPlus/PrivateFontCollection.md create mode 100644 docs/Reference/Contributed/GdiPlus/RedEyeCorrection.md create mode 100644 docs/Reference/Contributed/GdiPlus/Region.md create mode 100644 docs/Reference/Contributed/GdiPlus/Sharpen.md create mode 100644 docs/Reference/Contributed/GdiPlus/SolidBrush.md create mode 100644 docs/Reference/Contributed/GdiPlus/StringFormat.md create mode 100644 docs/Reference/Contributed/GdiPlus/TextureBrush.md create mode 100644 docs/Reference/Contributed/GdiPlus/Tint.md create mode 100644 docs/Reference/Contributed/GdiPlus/Types/BitmapData.md create mode 100644 docs/Reference/Contributed/GdiPlus/Types/BlurParams.md create mode 100644 docs/Reference/Contributed/GdiPlus/Types/BrightnessContrastParams.md create mode 100644 docs/Reference/Contributed/GdiPlus/Types/CharacterRange.md create mode 100644 docs/Reference/Contributed/GdiPlus/Types/Color.md create mode 100644 docs/Reference/Contributed/GdiPlus/Types/ColorBalanceParams.md create mode 100644 docs/Reference/Contributed/GdiPlus/Types/ColorChannelLUT.md create mode 100644 docs/Reference/Contributed/GdiPlus/Types/ColorCurveParams.md create mode 100644 docs/Reference/Contributed/GdiPlus/Types/ColorLUTParams.md create mode 100644 docs/Reference/Contributed/GdiPlus/Types/ColorMap.md create mode 100644 docs/Reference/Contributed/GdiPlus/Types/ColorMatrix.md create mode 100644 docs/Reference/Contributed/GdiPlus/Types/ColorPalette.md create mode 100644 docs/Reference/Contributed/GdiPlus/Types/GdiplusStartupInput.md create mode 100644 docs/Reference/Contributed/GdiPlus/Types/GdiplusStartupOutput.md create mode 100644 docs/Reference/Contributed/GdiPlus/Types/GpEncoderParameter.md create mode 100644 docs/Reference/Contributed/GdiPlus/Types/GpImageCodecInfo.md create mode 100644 docs/Reference/Contributed/GdiPlus/Types/GpImageItemData.md create mode 100644 docs/Reference/Contributed/GdiPlus/Types/GpPoint.md create mode 100644 docs/Reference/Contributed/GdiPlus/Types/GpPointF.md create mode 100644 docs/Reference/Contributed/GdiPlus/Types/GpPropertyItem.md create mode 100644 docs/Reference/Contributed/GdiPlus/Types/GpRect.md create mode 100644 docs/Reference/Contributed/GdiPlus/Types/GpRectF.md create mode 100644 docs/Reference/Contributed/GdiPlus/Types/GpSize.md create mode 100644 docs/Reference/Contributed/GdiPlus/Types/GpSizeF.md create mode 100644 docs/Reference/Contributed/GdiPlus/Types/HueSaturationLightnessParams.md create mode 100644 docs/Reference/Contributed/GdiPlus/Types/LevelsParams.md create mode 100644 docs/Reference/Contributed/GdiPlus/Types/Marker.md create mode 100644 docs/Reference/Contributed/GdiPlus/Types/MarkerPath.md create mode 100644 docs/Reference/Contributed/GdiPlus/Types/MetafileHeader.md create mode 100644 docs/Reference/Contributed/GdiPlus/Types/PWMFRect16.md create mode 100644 docs/Reference/Contributed/GdiPlus/Types/PathPointType.md create mode 100644 docs/Reference/Contributed/GdiPlus/Types/PathType.md create mode 100644 docs/Reference/Contributed/GdiPlus/Types/RedEyeCorrectionParams.md create mode 100644 docs/Reference/Contributed/GdiPlus/Types/SharpenParams.md create mode 100644 docs/Reference/Contributed/GdiPlus/Types/SubPath.md create mode 100644 docs/Reference/Contributed/GdiPlus/Types/SubPathPath.md create mode 100644 docs/Reference/Contributed/GdiPlus/Types/TintParams.md create mode 100644 docs/Reference/Contributed/GdiPlus/Types/TypedPoint.md create mode 100644 docs/Reference/Contributed/GdiPlus/Types/TypedPoints.md create mode 100644 docs/Reference/Contributed/GdiPlus/Types/WmfPlaceableFileHeader.md create mode 100644 docs/Reference/Contributed/GdiPlus/Types/index.md create mode 100644 docs/Reference/Contributed/GdiPlus/VBGraphics.md create mode 100644 docs/Reference/Contributed/GdiPlus/index.md create mode 100644 indexer/snapshots/contributed/GdiPlus/api.json create mode 100644 test/example-projects/contributed-GdiPlus/Settings diff --git a/WIP.md b/WIP.md index 85803e54..0241ff3c 100644 --- a/WIP.md +++ b/WIP.md @@ -35,7 +35,7 @@ sibling. History goes nowhere: git keeps it. Reference documentation is **complete** for all thirteen packages: VBA, VBRUN, VB, WebView2, Assert, CustomControls, CEF, WinEventLogLib, WinNamedPipesLib, WinServicesLib, tbIDE, WinNativeCommonCtls and AppGlobalClassObject. It is adapted from primary sources: Microsoft VBA-Docs (CC-BY-4.0) for the runtime library, `.twin` source for the twinBASIC-specific packages. The CEF and WebView2 packages also carry a tutorial set. -Twenty-six **contributed** packages from TWINSERV have sections under `docs/Reference/Contributed/`: ArrayListLib, FileProps, Fmt, Generics, OLEGuids, WinReg, TwinTimerLib, tbFileSysTools, TBMANLIB, TBMANLIB_Aes, TBMANLIB_ConsoleComponents, TBMANLIB_ConsoleCore, TBMANLIB_Diagnostic, TBMANLIB_Dialog, TBMANLIB_ListBoxHScroll, TBMANLIB_RES, TBMANLIB_Xml, tbProjPacker, tbRegExp, tsJson, tsPwGen, VBA_JSON and xCalendar complete; AutoCompleteLib, BigNumberLib and VBComDlg their main class only. TBMANLIB_ConsoleCore's console claims are checked by its test cases, each on a console screen buffer of its own with its input written by `WriteConsoleInput`; TBMANLIB_ConsoleComponents' follow the source, because the samples harness cannot capture a console. Generics (seven tuple classes) and xCalendar (one control) are each one page (owner), so `analyze` in audit mode lists their classes and members as undocumented. What xCalendar's page says it does at run time comes from `test/package-tests/xCalendar/probe/`, which runs the control on a form in a built exe. Fmt documents its test code (`HelloWorldClass`, `HelloWorldModule`, `Pootle`) in one paragraph of its landing page, which `exclude_from_docs` names; Generics' `exclude_from_docs` names its test code, `HelloWorldModule`, which the page does not mention. VBComDlg's `exclude_from_docs` names `CommonDialogBase`, a module whose public procedures only its class calls. tbRegExp's `exclude_from_docs` names its private engine module, `StaticRegex`, and tbProjPacker's its helper modules, `modImpExp` and `modWin32`: the indexer counts a Public Enum as public even inside a Private Module, because a built-in package's are reached through its library symbol written with an asterisk (`*WinNativeCommonCtls`, as `ImlDrawConstants` says). By its bare name no such enum is reachable, in a built-in or a contributed package (TB5079 on BETA 1005). OLEGuids documents each interface's methods on the interface's page. What TBMANLIB_Dialog's pages say its dialogs do comes from `test/package-tests/TBMANLIB_Dialog/probe/`, which operates them in a built exe on a private desktop; run it again when the package's version changes. TBMANLIB_Dialog 1.1.0.0 has a page of its own for each class except cDialog, which keeps a page for each member, so `analyze` in audit mode lists the members of those one-page classes as undocumented; its `exclude_from_docs` names its test module, `TestModule`, and the seven COM interface declarations that cDialogEx calls inside (`IOleWindow`, `IModalWindow`, `IShellItem`, `IShellItemArray`, `IFileDialog`, `IFileOpenDialog`, `IFileSaveDialog`), which its landing page describes in a paragraph. cDialogEx 1.1.0.0 returns the name of the chosen file, not its path, ignores `InitialDir` and ignores a `Filter` that has no closing pipe, each documented as a WARNING. tbRegExp is the first section drafted by the doc-draft workflow ([WIP.Indexer.md](WIP.Indexer.md#draft-and-the-doc-draft-workflow)), then reviewed against the sources, the package's README and VBScript's own **RegExp** under `cscript`. tbRegExp 1.9.0.0 raises `vbObjectError + 3016` from a search that uses up its step budget and returns nothing (1.8.0.0's `SearchAborted` is gone); the budget is 10 steps for each character squared, at least 1,000,000 and at most 100,000,000, for the search of one match, and `RegExp.SearchStepLimit` replaces it with a fixed number, documented on its own page and in a section of the landing page. On the dev box (BETA 1005, win32) `\d+x` costs between 2.0 and 2.2 × n² steps, so it finishes on 7,000 digits (15 s) and raises on 10,000 (16 s); `(a+)+b` raises in 0.2 s on 30 or 300 `a` but takes 16 s on 3,000; `a*` matches 1,000,000 characters whole in about half a second. Its pattern syntax has a page of its own, `PatternSyntax.md`. Each one that is not Experimental has a chapter in the book's Packages part; the Experimental ones are left out of the book. **ArrayListLib, BigNumberLib, TBMANLIB, TBMANLIB_Aes, TBMANLIB_ConsoleComponents, TBMANLIB_ConsoleCore, TBMANLIB_Diagnostic, TBMANLIB_Dialog, TBMANLIB_ListBoxHScroll, TBMANLIB_Xml, WinReg and xCalendar are listed under Experimental Packages** (`docs/Reference/Experimental.md`, owner): ArrayListLib and WinReg do not compile on BETA 1005 (each documented from its source and a copy of it that builds, its samples compile-only; in a copy of ArrayListLib 1.6.151.1 with the arguments of its three `VSwap` calls passed `ByVal` and `LSetByVal` taking a `LongPtr`, a For Each over a list with no items fails, ToString of such a list never returns, Reverse keeps the middle pair of an even run in place and a second GetEnumerator over a list ignores its arguments; in a copy of WinReg's source with its four failing calls passed `ByVal`, ReadString, GetRegistryValueType and the first ConvertValueToString give wrong results), xCalendar has a grid that keeps the old month's dates when Value is set to another month, and text colour properties that have no effect, BigNumberLib 1.0.2.0 compiles, but loses the minus sign after `IsNegative = True` and in a negative operand of the greatest common divisor and the least common multiple, makes a zero from `AssignFromLong` negative, and does not return from the modular inverse of zero (all four confirmed by a second agent), TBMANLIB 1.0.0.29 does not compile in a 64-bit build (TB5001 in cSubClass, where the window procedure is passed as a Long) and has many members that fail or give wrong results, TBMANLIB_ConsoleComponents cannot take a cConsole of the published TBMANLIB_ConsoleCore (it embeds a copy of it, the same package at 1.0.0.1, whose types the compiler treats as different; checked in a project made by the IDE's own import, in either order), TBMANLIB_ConsoleCore reads keys wrongly, TBMANLIB_Diagnostic cannot create its Dictionary and misplaces List items, TBMANLIB_Dialog 1.1.0.0 has classes that fail at their main task (cDialogFindReplace reports nothing, cDialogPageSetup ignores paper and orientation, cDialogEx returns names without their folder, cDialogPassword shows the password in its confirmation boxes; every defect confirmed by a second agent, owner), TBMANLIB_ListBoxHScroll 1.0.0.1 moves the thumb 20 px per arrow and one page per track click while the list box scrolls its contents by its own step, so thumb and text disagree (confirmed by a second agent, owner), TBMANLIB_Aes runs other cipher modes than the ones named (its default CBC is ECB) and fails the NIST test vectors, and TBMANLIB_Xml's parser misreads self-closing elements and entities and does not return for some malformed text (and its XPath engine reads the step `..` and `and` with `or` wrongly). TBMANLIB_Xml's `exclude_from_docs` names its test module, `mXmlTests`, which its landing page describes in a paragraph, and the five types of its XPath engine (`XPathTokenType`, `XPathAxisType`, `XPathOperator`, `XPathStep`, `XPathPredicate`), which no public member takes or returns and which the mXPath page mentions in a paragraph; tsPwGen's names its five test modules and its six internal modules, and tsJson's its test and internal modules likewise, which their landing pages describe in a paragraph each. See *Where things live* for how a package moves between the two lists. +Twenty-six **contributed** packages from TWINSERV have sections under `docs/Reference/Contributed/`: ArrayListLib, FileProps, Fmt, Generics, OLEGuids, WinReg, TwinTimerLib, tbFileSysTools, TBMANLIB, TBMANLIB_Aes, TBMANLIB_ConsoleComponents, TBMANLIB_ConsoleCore, TBMANLIB_Diagnostic, TBMANLIB_Dialog, TBMANLIB_ListBoxHScroll, TBMANLIB_RES, TBMANLIB_Xml, tbProjPacker, tbRegExp, tsJson, tsPwGen, VBA_JSON and xCalendar complete; AutoCompleteLib, BigNumberLib and VBComDlg their main class only. TBMANLIB_ConsoleCore's console claims are checked by its test cases, each on a console screen buffer of its own with its input written by `WriteConsoleInput`; TBMANLIB_ConsoleComponents' follow the source, because the samples harness cannot capture a console. Generics (seven tuple classes) and xCalendar (one control) are each one page (owner), so `analyze` in audit mode lists their classes and members as undocumented. What xCalendar's page says it does at run time comes from `test/package-tests/xCalendar/probe/`, which runs the control on a form in a built exe. Fmt documents its test code (`HelloWorldClass`, `HelloWorldModule`, `Pootle`) in one paragraph of its landing page, which `exclude_from_docs` names; Generics' `exclude_from_docs` names its test code, `HelloWorldModule`, which the page does not mention. VBComDlg's `exclude_from_docs` names `CommonDialogBase`, a module whose public procedures only its class calls. tbRegExp's `exclude_from_docs` names its private engine module, `StaticRegex`, and tbProjPacker's its helper modules, `modImpExp` and `modWin32`: the indexer counts a Public Enum as public even inside a Private Module, because a built-in package's are reached through its library symbol written with an asterisk (`*WinNativeCommonCtls`, as `ImlDrawConstants` says). By its bare name no such enum is reachable, in a built-in or a contributed package (TB5079 on BETA 1005). OLEGuids documents each interface's methods on the interface's page. What TBMANLIB_Dialog's pages say its dialogs do comes from `test/package-tests/TBMANLIB_Dialog/probe/`, which operates them in a built exe on a private desktop; run it again when the package's version changes. TBMANLIB_Dialog 1.1.0.0 has a page of its own for each class except cDialog, which keeps a page for each member, so `analyze` in audit mode lists the members of those one-page classes as undocumented; its `exclude_from_docs` names its test module, `TestModule`, and the seven COM interface declarations that cDialogEx calls inside (`IOleWindow`, `IModalWindow`, `IShellItem`, `IShellItemArray`, `IFileDialog`, `IFileOpenDialog`, `IFileSaveDialog`), which its landing page describes in a paragraph. cDialogEx 1.1.0.0 returns the name of the chosen file, not its path, ignores `InitialDir` and ignores a `Filter` that has no closing pipe, each documented as a WARNING. tbRegExp is the first section drafted by the doc-draft workflow ([WIP.Indexer.md](WIP.Indexer.md#draft-and-the-doc-draft-workflow)), then reviewed against the sources, the package's README and VBScript's own **RegExp** under `cscript`. tbRegExp 1.9.0.0 raises `vbObjectError + 3016` from a search that uses up its step budget and returns nothing (1.8.0.0's `SearchAborted` is gone); the budget is 10 steps for each character squared, at least 1,000,000 and at most 100,000,000, for the search of one match, and `RegExp.SearchStepLimit` replaces it with a fixed number, documented on its own page and in a section of the landing page. On the dev box (BETA 1005, win32) `\d+x` costs between 2.0 and 2.2 × n² steps, so it finishes on 7,000 digits (15 s) and raises on 10,000 (16 s); `(a+)+b` raises in 0.2 s on 30 or 300 `a` but takes 16 s on 3,000; `a*` matches 1,000,000 characters whole in about half a second. Its pattern syntax has a page of its own, `PatternSyntax.md`. Each one that is not Experimental has a chapter in the book's Packages part; the Experimental ones are left out of the book. **ArrayListLib, BigNumberLib, GdiPlus, TBMANLIB, TBMANLIB_Aes, TBMANLIB_ConsoleComponents, TBMANLIB_ConsoleCore, TBMANLIB_Diagnostic, TBMANLIB_Dialog, TBMANLIB_ListBoxHScroll, TBMANLIB_Xml, WinReg and xCalendar are listed under Experimental Packages** (`docs/Reference/Experimental.md`, owner): ArrayListLib and WinReg do not compile on BETA 1005 (each documented from its source and a copy of it that builds, its samples compile-only; in a copy of ArrayListLib 1.6.151.1 with the arguments of its three `VSwap` calls passed `ByVal` and `LSetByVal` taking a `LongPtr`, a For Each over a list with no items fails, ToString of such a list never returns, Reverse keeps the middle pair of an even run in place and a second GetEnumerator over a list ignores its arguments; in a copy of WinReg's source with its four failing calls passed `ByVal`, ReadString, GetRegistryValueType and the first ConvertValueToString give wrong results), xCalendar has a grid that keeps the old month's dates when Value is set to another month, and text colour properties that have no effect, BigNumberLib 1.0.2.0 compiles, but loses the minus sign after `IsNegative = True` and in a negative operand of the greatest common divisor and the least common multiple, makes a zero from `AssignFromLong` negative, and does not return from the modular inverse of zero (all four confirmed by a second agent), TBMANLIB 1.0.0.29 does not compile in a 64-bit build (TB5001 in cSubClass, where the window procedure is passed as a Long) and has many members that fail or give wrong results, TBMANLIB_ConsoleComponents cannot take a cConsole of the published TBMANLIB_ConsoleCore (it embeds a copy of it, the same package at 1.0.0.1, whose types the compiler treats as different; checked in a project made by the IDE's own import, in either order), TBMANLIB_ConsoleCore reads keys wrongly, TBMANLIB_Diagnostic cannot create its Dictionary and misplaces List items, TBMANLIB_Dialog 1.1.0.0 has classes that fail at their main task (cDialogFindReplace reports nothing, cDialogPageSetup ignores paper and orientation, cDialogEx returns names without their folder, cDialogPassword shows the password in its confirmation boxes; every defect confirmed by a second agent, owner), TBMANLIB_ListBoxHScroll 1.0.0.1 moves the thumb 20 px per arrow and one page per track click while the list box scrolls its contents by its own step, so thumb and text disagree (confirmed by a second agent, owner), TBMANLIB_Aes runs other cipher modes than the ones named (its default CBC is ECB) and fails the NIST test vectors, and TBMANLIB_Xml's parser misreads self-closing elements and entities and does not return for some malformed text (and its XPath engine reads the step `..` and `and` with `or` wrongly). TBMANLIB_Xml's `exclude_from_docs` names its test module, `mXmlTests`, which its landing page describes in a paragraph, and the five types of its XPath engine (`XPathTokenType`, `XPathAxisType`, `XPathOperator`, `XPathStep`, `XPathPredicate`), which no public member takes or returns and which the mXPath page mentions in a paragraph; tsPwGen's names its five test modules and its six internal modules, and tsJson's its test and internal modules likewise, which their landing pages describe in a paragraph each. See *Where things live* for how a package moves between the two lists. The rest of this file is the maintenance guide for updating existing pages or adding new ones: package surface notes, page conventions, and the integrity check. diff --git a/builder/page-baseline.json b/builder/page-baseline.json index a923a7d6..7a227504 100644 --- a/builder/page-baseline.json +++ b/builder/page-baseline.json @@ -1,5 +1,5 @@ { "src": "docs", - "pages": 1286, + "pages": 1450, "staticFiles": 1011 } diff --git a/docs/Reference/Contributed/GdiPlus/ArrowCap.md b/docs/Reference/Contributed/GdiPlus/ArrowCap.md new file mode 100644 index 00000000..ff490ca6 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/ArrowCap.md @@ -0,0 +1,158 @@ +--- +title: ArrowCap +parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/ArrowCap +--- + +# ArrowCap class +{: .no_toc } + +A line cap in the shape of an arrowhead, filled or outlined: a mark that a [**Pen**](Pen) draws at the start or at the end of a line. + +**ArrowCap** inherits from [**CustomLineCap**](CustomLineCap), so it has all the properties of that class, such as [**BaseCap**](CustomLineCap#basecap), [**BaseInset**](CustomLineCap#baseinset) and [**WidthScale**](CustomLineCap#widthscale), and the same limits. It adds the size of the arrowhead, the inset of its middle and whether it is filled. An arrow cap is attached to a pen with [**CustomStartCap**](Pen#customstartcap) or [**CustomEndCap**](Pen#customendcap). The class mirrors the GDI+ [AdjustableArrowCap](https://learn.microsoft.com/en-us/windows/win32/api/gdipluslinecaps/nl-gdipluslinecaps-adjustablearrowcap) class, and the name **AdjustableArrowCap** is an alias of **ArrowCap**. + +* TOC +{:toc} + +## Creating + +Syntax: *cap* **= ArrowCap**( *height*, *width* [, *isFilled*] ) + +Syntax: *cap* **= ArrowCap**( *size* [, *isFilled*] ) + +Each form can also be written with **New**: *cap* **= New ArrowCap**( ... ). The two are one thing. + +*height* +: *required* A **Single**: the length of the arrowhead, from its tip to its base. + +*width* +: *required* A **Single**: the width of the arrowhead at its base. + +*size* +: *required* A **GpSizeF** that holds the width and the height. + +*isFilled* +: *optional* A **Boolean**: **True** for a filled arrowhead and **False** for an outline. The default is **True**. + +Note that the height comes before the width. Both are multiples of the pen width, and a pen narrower than 2 counts as 2. A new arrow cap has the base cap **LineCapTriangle**. + +### Clone + +Syntax: *copy* **=** *cap*.**Clone**( ) + +Returns a new **ArrowCap** with the same settings. + +> [!WARNING] 0.9.45.0 +> The copy is not usable: it does not hold the arrow, so each of its properties reports **InvalidParameter** in **LastResult** and returns 0 or **False**. Make a second cap with the same values instead. + +## Properties + +### Height + +Syntax: *cap*.**Height** [ **=** *height* ] + +Gets or sets the length of the arrowhead, a **Single**. + +### Width + +Syntax: *cap*.**Width** [ **=** *width* ] + +Gets or sets the width of the arrowhead at its base, a **Single**. + +### Size + +Syntax: *cap*.**Size** [ **=** *size* ] + +Gets or sets the width and the height together, as a **GpSizeF**. + +### MiddleInset + +Syntax: *cap*.**MiddleInset** [ **=** *inset* ] + +Sets the distance, a **Single**, by which the middle of the base of the arrowhead is moved towards the tip. The default is 0, which leaves a plain triangle. A larger value cuts a notch into the base, like the tail of a dart. + +> [!WARNING] 0.9.45.0 +> Reading **MiddleInset** always returns 0, whatever was set. The setting itself works. + +### FillState + +Syntax: *cap*.**FillState** [ **=** *isFilled* ] + +Gets or sets whether the arrowhead is filled, a **Boolean**. When it is not, only the outline is drawn. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim cap As ArrowCap = ArrowCap(3, 4) +Debug.Print cap.Height & " " & cap.Width & " " & cap.FillState + +cap.Height = 7 +cap.Width = 5 +cap.FillState = False +Debug.Print cap.Height & " " & cap.Width & " " & cap.FillState + +Dim size As GpSizeF = cap.Size +Debug.Print size.Width & " " & size.Height + +cap.Size = GpSizeF(9, 8) +Debug.Print cap.Width & " " & cap.Height + +cap.MiddleInset = 1.5 +Debug.Print cap.MiddleInset +' Output: +' 3 4 True +' 7 5 False +' 5 7 +' 9 8 +' 0 +``` + +## Inherited from CustomLineCap + +[**BaseCap**](CustomLineCap#basecap), [**BaseInset**](CustomLineCap#baseinset), [**WidthScale**](CustomLineCap#widthscale), [**StrokeJoin**](CustomLineCap#strokejoin), [**StrokeCap**](CustomLineCap#strokecap), [**StartStrokeCap**](CustomLineCap#startstrokecap), [**EndStrokeCap**](CustomLineCap#endstrokecap), [**SetStrokeCaps**](CustomLineCap#setstrokecaps) and [**GetStrokeCaps**](CustomLineCap#getstrokecaps) work as on that page, with the same warnings: assigning **StartStrokeCap** or **EndStrokeCap**, and calling **SetStrokeCaps** with a cap, never return. + +> [!WARNING] 0.9.45.0 +> A pen that has an arrow cap returns it from [**CustomStartCap**](Pen#customstartcap) or [**CustomEndCap**](Pen#customendcap) as an **ArrowCap** that is not usable, like a clone: its members report **InvalidParameter** and return 0. + +## Example + +A filled arrowhead at the end of a line. The listing shows the columns 20 to 35. **#** is a pixel of the pen. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim bmp As Bitmap = Bitmap(36!, 12!) +Dim g As Graphics = Graphics(bmp) +Dim linePen As Pen = Pen(Color(255, 255, 0, 0), 2) +Dim cap As ArrowCap = ArrowCap(3, 3, True) +linePen.CustomEndCap = cap + +g.Clear Color(255, 255, 255, 255) +g.DrawLine linePen, 2, 6, 30, 6 + +Dim x As Long, y As Long, row As String +For y = 2 To 10 + row = "" + For x = 20 To 35 + row = row & IIf(bmp.Pixel(x, y).argb = &HFFFFFFFF, ".", "#") + Next + Debug.Print row +Next +' Output: +' ................ +' ................ +' ....##.......... +' ########........ +' ##########...... +' ....####........ +' ....##.......... +' ................ +' ................ +``` + +## See Also + +- [AdjustableArrowCap](https://learn.microsoft.com/en-us/windows/win32/api/gdipluslinecaps/nl-gdipluslinecaps-adjustablearrowcap) -- Microsoft's documentation of the GDI+ class +- [CustomLineCap](CustomLineCap) class +- [Pen](Pen) class +- [GpLineCap](Enumerations/GpLineCap) enumeration diff --git a/docs/Reference/Contributed/GdiPlus/Bitmap.md b/docs/Reference/Contributed/GdiPlus/Bitmap.md new file mode 100644 index 00000000..63986096 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Bitmap.md @@ -0,0 +1,495 @@ +--- +title: Bitmap +parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Bitmap +--- + +# Bitmap class +{: .no_toc } + +A raster picture that a program can draw on, read pixel by pixel, convert and filter. + +A **Bitmap** inherits every member of [**Image**](Image): its size, resolution, pixel format, frames and properties. This page describes what it adds. A **Bitmap** is also what a [**Graphics**](Graphics) draws on when the drawing is meant to go to memory: `Graphics(bmp)` draws into `bmp`. The class mirrors the GDI+ [Bitmap](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusheaders/nl-gdiplusheaders-bitmap) class. + +* TOC +{:toc} + +## Creating + +Syntax: *bmp* **= Bitmap**( *width*, *height* [ , *format* ] ) + +Syntax: *bmp* **= Bitmap**( *size* [ , *format* ] ) + +Syntax: *bmp* **= Bitmap**( *width*, *height*, *target* ) + +Syntax: *bmp* **= Bitmap**( *size*, *target* ) + +Syntax: *bmp* **= Bitmap**( *width*, *height*, *stride*, *format*, *scan0* ) + +Syntax: *bmp* **= Bitmap**( *size*, *stride*, *format*, *scan0* ) + +Syntax: *bmp* **= Bitmap**( *filename* [ , *useEmbeddedColorManagement* ] ) + +Syntax: *bmp* **= Bitmap**( *stream* [ , *useEmbeddedColorManagement* ] ) + +Syntax: *bmp* **= Bitmap**( *hbm*, *hpal* ) + +Syntax: *bmp* **= Bitmap**( *hicon* ) + +Syntax: *bmp* **= Bitmap**( *hInstance*, *bitmapName* ) + +Syntax: *bmp* **= Bitmap**( *surface* ) + +Syntax: *bmp* **= Bitmap**( *bi*, *data* ) + +Each form is also available as **New Bitmap**( ... ) with the same arguments. + +*width*, *height* +: *required* **Single** values for the size in pixels. GDI+ truncates them to whole pixels. + +*size* +: *required* A [**GpSizeF**](Types/GpSizeF) for the same. + +*format* +: *optional* A [**PixelFormat**](Enumerations/PixelFormat). The default is **PixelFormat32bppARGB**. + +*target* +: *required* A [**Graphics**](Graphics). The bitmap takes the resolution of that **Graphics**, and its pixel format is **PixelFormat32bppPARGB**. + +*stride*, *scan0* +: *required* The bitmap does not allocate its pixels but uses the memory that starts at *scan0*, a **Byte** passed by reference. *stride* is the number of bytes from one row to the next and must be a multiple of 4. The memory must stay valid, and unmoved, for the life of the bitmap, and a change to it changes the bitmap. + +*filename*, *stream* +: *required* A **String** naming an image file, or an **IStream** to read one from. The file is decoded into a bitmap. *useEmbeddedColorManagement* is *optional*, as for [**Image**](Image#creating). + +*hbm*, *hpal* +: *required* The handle of a GDI bitmap, and of a palette (0 for none). The handle stays the property of the caller. + +*hicon* +: *required* The handle of an icon. + +*hInstance*, *bitmapName* +: *required* A module handle and the name of a bitmap resource in it. + +*surface*, *bi*, *data* +: *required* A DirectDraw 7 surface, or a `BITMAPINFO` structure with the pixel data that belongs to it, for the two forms that read those. + +A constructor that fails creates an unusable object whose **LastResult** tells why: a resource that does not exist gives **InvalidParameter**. + +> [!WARNING] 0.9.45.0 +> Two integer arguments do not create a bitmap of that size. `Bitmap(8, 6)` binds to the form that takes a GDI bitmap handle and a palette handle, treats 8 and 6 as handles, and returns an unusable object with **LastResult** 7 (**Win32Error**), without any error being raised. Pass **Single** values: `Bitmap(8!, 6!)`, or give a format, as in `Bitmap(8, 6, PixelFormat32bppARGB)`. The same goes for **New Bitmap**. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim bmp As Bitmap = Bitmap(8!, 6!) +Debug.Print bmp.LastResult & " " & bmp.Width & " " & bmp.Height & " " & Hex$(bmp.PixelFormat) + +Dim wrong As Bitmap = Bitmap(8, 6) +Debug.Print wrong.LastResult & " " & wrong.Width + +Dim rgb24 As Bitmap = Bitmap(GpSizeF(5, 4), PixelFormat24bppRGB) +Debug.Print rgb24.Width & " " & rgb24.Height & " " & Hex$(rgb24.PixelFormat) + +Dim g As Graphics = Graphics(bmp) +Dim matching As Bitmap = Bitmap(5!, 6!, g) +Debug.Print Hex$(matching.PixelFormat) +' Output: +' 0 8 6 26200A +' 7 0 +' 5 4 21808 +' E200B +``` + +The memory form lets a program share its own pixel array with GDI+. The bytes of a 32-bit pixel are in the order blue, green, red, alpha. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim px(0 To 15) As Byte ' 2 x 2 pixels of 4 bytes +px(0) = &H44: px(1) = &H33: px(2) = &H22: px(3) = &HFF +Dim shared As Bitmap = Bitmap(2!, 2!, 8, PixelFormat32bppARGB, px(0)) +Debug.Print Hex$(shared.Pixel(0, 0).argb) + +px(0) = &H11 ' changes the bitmap too +Debug.Print Hex$(shared.Pixel(0, 0).argb) +' Output: +' FF223344 +' FF223311 +``` + +## Copying + +### Clone + +Syntax: *copy* **=** *bmp*.**Clone**( *rect*, *format* ) + +Syntax: *copy* **=** *bmp*.**Clone**( *x*, *y*, *width*, *height*, *format* ) + +*rect* +: *required* A [**GpRect**](Types/GpRect) or a [**GpRectF**](Types/GpRectF) naming the part of the bitmap to copy. + +*x*, *y*, *width*, *height* +: *required* **Single** values for the same. + +*format* +: *required* The [**PixelFormat**](Enumerations/PixelFormat) of the copy. + +Returns a new **Bitmap** with the pixels of that part, converted to *format*. The rectangle must lie inside the bitmap. The copy does not share memory with the original. + +> [!NOTE] 0.9.45.0 +> The no-argument **Clone** of [**Image**](Image#clone) is hidden: `bmp.Clone()` on a **Bitmap** does not compile. Copy the whole bitmap by giving its rectangle. + +### CloneI + +Syntax: *copy* **=** *bmp*.**CloneI**( *x*, *y*, *width*, *height*, *format* ) + +The same with **Long** arguments. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim bmp As Bitmap = Bitmap(4!, 3!) +bmp.Pixel(1, 1) = Color(255, 60, 100, 7) + +Dim part As Bitmap = bmp.CloneI(1, 1, 2, 2, PixelFormat24bppRGB) +Debug.Print part.Width & " " & part.Height & " " & Hex$(part.PixelFormat) +Debug.Print Hex$(part.Pixel(0, 0).argb) + +Dim whole As Bitmap = bmp.Clone(GpRect(0, 0, 4, 3), PixelFormat32bppARGB) +Debug.Print Hex$(whole.Pixel(1, 1).argb) +' Output: +' 2 2 21808 +' FF3C6407 +' FF3C6407 +``` + +## Pixels + +### Pixel + +Syntax: *c* **=** *bmp*.**Pixel**( *x*, *y* ) + +Syntax: *bmp*.**Pixel**( *x*, *y* ) **=** *c* + +Gets or sets one pixel as a [**Color**](Types/Color). **Pixel** is the default member, so `bmp(x, y)` is the same. Coordinates count from 0 at the upper left corner. A pixel outside the bitmap fails with **InvalidParameter** and leaves the bitmap alone. In a bitmap with a palette, setting a pixel is not supported. + +The call goes to GDI+ for every pixel. To read or write many, use [**LockBits**](#lockbits). + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim bmp As Bitmap = Bitmap(3!, 2!) +bmp.Pixel(2, 1) = Color(&H80, 1, 2, 3) +Debug.Print Hex$(bmp(2, 1).argb) +Debug.Print bmp.LastResult + +Dim c As Color = bmp.Pixel(2, 1) +Debug.Print Hex$(c.A) & " " & Hex$(c.R) & " " & Hex$(c.G) & " " & Hex$(c.B) +' Output: +' 80010203 +' 0 +' 80 1 2 3 +``` + +### LockBits + +Syntax: *status* **=** *bmp*.**LockBits**( *rect*, *flags*, *format*, *lockedBitmapData* ) + +*rect* +: *required* A [**GpRect**](Types/GpRect) naming the part of the bitmap to lock. + +*flags* +: *required* A **Long** that combines [**ImageLockMode**](Enumerations/ImageLockMode) values: **ImageLockModeRead**, **ImageLockModeWrite**, or both. Writes reach the bitmap only when it was locked with **ImageLockModeWrite**. + +*format* +: *required* The [**PixelFormat**](Enumerations/PixelFormat) in which the program wants the pixels. GDI+ converts to it when the bitmap has another. + +*lockedBitmapData* +: *required* A [**BitmapData**](Types/BitmapData) that receives the size, stride, format and the address of the first pixel. + +Locks the rectangle in memory and fills in *lockedBitmapData*. The pixels are rows of **Stride** bytes that start at **Scan0**; with a 32-bit format each pixel is four bytes in the order blue, green, red, alpha, which is also the byte order of a **Long** holding `&HAARRGGBB`. Every lock must be paired with [**UnlockBits**](#unlockbits), and the bitmap cannot be drawn on or locked again in between. + +### UnlockBits + +Syntax: *status* **=** *bmp*.**UnlockBits**( *lockedBitmapData* ) + +Unlocks what **LockBits** locked and, for a lock with **ImageLockModeWrite**, copies the program's changes into the bitmap. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim bmp As Bitmap = Bitmap(4!, 3!) +bmp.Pixel(0, 0) = Color(255, 0, 0, 7) + +Dim bd As BitmapData +Debug.Print bmp.LockBits(GpRect(0, 0, 4, 3), ImageLockModeRead Or ImageLockModeWrite, PixelFormat32bppARGB, bd) +Debug.Print bd.Width & " " & bd.Height & " " & bd.Stride & " " & Hex$(bd.PixelFormat) + +Dim v As Long +GetMem4 bd.Scan0, v ' the first pixel +Debug.Print Hex$(v) +PutMem4 bd.Scan0, &HFF112233 ' red 11, green 22... as &HAARRGGBB +Debug.Print bmp.UnlockBits(bd) +Debug.Print Hex$(bmp.Pixel(0, 0).argb) +' Output: +' 0 +' 4 3 16 26200A +' FF000007 +' 0 +' FF112233 +``` + +## Converting + +### ConvertFormat + +Syntax: *status* **=** *bmp*.**ConvertFormat**( *format*, *ditherType*, *paletteType*, *palette*, *alphaThresholdPercent* ) + +*format* +: *required* The [**PixelFormat**](Enumerations/PixelFormat) to convert to. + +*ditherType* +: *required* A [**DitherType**](Enumerations/DitherType) for a conversion to a format with fewer colours. + +*paletteType* +: *required* A [**PaletteType**](Enumerations/PaletteType) for a conversion to an indexed format. + +*palette* +: *required* A [**ColorPalette**](Types/ColorPalette) that supplies the colours when *paletteType* is **PaletteTypeCustom**, and receives them for some other types. + +*alphaThresholdPercent* +: *required* A **Single** from 0 to 100: the alpha value, in percent, below which a pixel becomes transparent in a format that has only on-off transparency. + +Converts the bitmap itself, in place, to the new pixel format. It needs GDI+ 1.1 (Windows 7 or later). A conversion that GDI+ refuses returns an error and leaves the bitmap as it was. + +> [!NOTE] 0.9.45.0 +> The fixed palette types, such as **PaletteTypeFixedBW**, need a *palette* that GDI+ has prepared. A blank [**ColorPalette**](Types/ColorPalette) makes the call fail with **InvalidParameter**. A palette that the program fills in itself works with **PaletteTypeCustom**, as below. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim bmp As Bitmap = Bitmap(4!, 4!) +Dim g As Graphics = Graphics(bmp) +g.Clear(Color(255, 255, 255, 255)) +bmp.Pixel(0, 0) = Color(255, 0, 0, 0) + +Dim pal As ColorPalette +pal.flags = PaletteFlagsGrayScale +pal.count = 2 +pal.entries(0) = &HFF000000 +pal.entries(1) = &HFFFFFFFF + +Debug.Print bmp.ConvertFormat(PixelFormat1bppIndexed, DitherTypeSolid, PaletteTypeCustom, pal, 0!) +Debug.Print Hex$(bmp.PixelFormat) +Debug.Print bmp.PaletteSize +' Output: +' 0 +' 30101 +' 16 +``` + +### ApplyEffect + +Syntax: *status* **=** *bmp*.**ApplyEffect**( *effect*, *roi* ) + +*effect* +: *required* An [**Effect**](Effect) such as a [**Blur**](Blur). + +*roi* +: *required* A [**GpRect**](Types/GpRect): the part of the bitmap the effect changes. + +Applies the effect to the pixels in *roi*, in place. It needs GDI+ 1.1 (Windows 7 or later). The effect keeps the auxiliary data that GDI+ returns, if any, in [**AuxData**](Effect#auxdata). + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim bmp As Bitmap = Bitmap(8!, 8!) +Dim g As Graphics = Graphics(bmp) +g.Clear(Color(255, 200, 100, 50)) + +Debug.Print bmp.ApplyEffect(BrightnessContrast(50, 0), GpRect(0, 0, 8, 8)) +Debug.Print Hex$(bmp.Pixel(4, 4).argb) +' Output: +' 0 +' FFFA9664 +``` + +### GetHistogram + +Syntax: *h* **=** *bmp*.**GetHistogram**( *format* ) + +Syntax: *status* **=** *bmp*.**GetHistogram**( *format*, *h*( ) ) + +*format* +: *required* A [**HistogramFormat**](Enumerations/HistogramFormat) naming the channels to count. + +Returns the number of pixels for each value of each channel as a two-dimensional array of **UINT**: the first index runs from 1 to 256 (value + 1), the second from 1 to 4 for the four channels. With **HistogramFormatARGB** the channels are, in order, alpha, red, green and blue. The second form fills an array the program passes. It needs GDI+ 1.1. + +### HistogramSize + +Syntax: *n* **=** *bmp*.**HistogramSize**( *format* ) + +Returns the number of entries in the histogram of that format, which is 256 for the formats tested. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim bmp As Bitmap = Bitmap(8!, 8!) +Dim g As Graphics = Graphics(bmp) +g.Clear(Color(255, 10, 20, 30)) + +Dim h() As UINT = bmp.GetHistogram(HistogramFormatARGB) +Debug.Print UBound(h, 1) & " " & UBound(h, 2) & " " & bmp.HistogramSize(HistogramFormatARGB) +Debug.Print h(256, 1) & " " & h(11, 2) & " " & h(21, 3) & " " & h(31, 4) ' 64 pixels each +' Output: +' 256 4 256 +' 64 64 64 64 +``` + +### SetResolution + +Syntax: *status* **=** *bmp*.**SetResolution**( *xDpi*, *yDpi* ) + +Sets the resolution in dots per inch, as **Long** values. The pixels are not changed. The resolution decides how big the bitmap is when it is drawn in a physical unit. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim bmp As Bitmap = Bitmap(10!, 10!) +Debug.Print bmp.SetResolution(300, 150) +Debug.Print bmp.HorizontalResolution & " " & bmp.VerticalResolution +' Output: +' 0 +' 300 150 +``` + +## GDI interoperability + +### GetHBitmap + +Syntax: *status* **=** *bmp*.**GetHBitmap**( *background*, *hbm* ) + +*background* +: *required* A **Color**. Pixels that are not opaque are blended with it, because a GDI bitmap has no alpha channel. + +*hbm* +: *required* A **LongPtr** that receives the handle of a new GDI bitmap. + +The program owns the handle and must release it with the GDI function `DeleteObject`. + +### GetHIcon + +Syntax: *status* **=** *bmp*.**GetHIcon**( *hIcon* ) + +*hIcon* +: *required* A **LongPtr** that receives the handle of a new icon. + +The program must release the handle with the Windows function `DestroyIcon`. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim bmp As Bitmap = Bitmap(8!, 8!) +Dim g As Graphics = Graphics(bmp) +g.Clear(Color(&H80, 10, 20, 30)) ' half transparent + +Dim hbm As LongPtr +Debug.Print bmp.GetHBitmap(Color(255, 255, 255, 255), hbm) +Dim flat As Bitmap = Bitmap(hbm, 0) ' blended with white +Debug.Print Hex$(flat.Pixel(1, 1).argb) +' Output: +' 0 +' FF84898E +``` + +## Saving + +A bitmap saves with [**Image.Save**](Image#save), **SaveAdd** and **SaveAddImage**, which a **Bitmap** inherits. + +> [!WARNING] 0.9.45.0 +> **Save** does not work with the encoder parameter array that it requires: the call returns **InvalidParameter** and leaves an empty file for an array of one element, ignores the parameters for a longer one in a 64-bit program, and stops a 32-bit program. The warning at [**Image.Save**](Image#save) gives the details. + +A picture can still be saved without parameters by passing a GDI bitmap made with [**GetHBitmap**](#gethbitmap) to GDI+ and calling its save function directly. The module below does that for a PNG. It flattens the picture over white, because the intermediate GDI bitmap has no alpha channel. + +```tb check_build slot=file projname=gdiplus-bitmap-save +Module PngSaver + Private Declare PtrSafe Function FromHBitmap Lib "gdiplus" Alias "GdipCreateBitmapFromHBITMAP" (ByVal hbm As LongPtr, ByVal hpal As LongPtr, nb As LongPtr) As Long + Private Declare PtrSafe Function SaveImage Lib "gdiplus" Alias "GdipSaveImageToFile" (ByVal img As LongPtr, ByVal path As LongPtr, clsid As GDIP_UUID, ByVal ep As LongPtr) As Long + Private Declare PtrSafe Function DisposeImage Lib "gdiplus" Alias "GdipDisposeImage" (ByVal img As LongPtr) As Long + Private Declare PtrSafe Function DeleteObject Lib "gdi32" (ByVal h As LongPtr) As Long + Private Declare PtrSafe Function CreateDirectoryW Lib "kernel32" (ByVal path As LongPtr, ByVal sa As LongPtr) As Long + + Public Sub MakeDir(ByVal folder As String) + CreateDirectoryW StrPtr(folder), 0 + End Sub + + ' Returns 0 when the file was written. + Public Function SavePng(bmp As Bitmap, ByVal path As String) As Long + Dim hbm As LongPtr, native As LongPtr + bmp.GetHBitmap Color(255, 255, 255, 255), hbm + Dim st As Long = FromHBitmap(hbm, 0, native) + If st = 0 Then + Dim clsid As GDIP_UUID = ImageCodecPNG() + st = SaveImage(native, StrPtr(path), clsid, 0) + DisposeImage native + End If + DeleteObject hbm + Return st + End Function +End Module +``` + +The picture can then be loaded again as a **Bitmap**, with the pixels as they were drawn. + +```tb check_build check_run projname=gdiplus-bitmap-save +Dim user As GdiPlusUser = GdiPlusUser() + +Dim bmp As Bitmap = Bitmap(16!, 8!) +Dim g As Graphics = Graphics(bmp) +g.Clear(Color(255, 200, 100, 50)) + +Dim dir As String = Environ$("TEMP") & "\tbdocs-gdiplus-bitmap" +PngSaver.MakeDir dir +Dim path As String = dir & "\sample.png" +Debug.Print PngSaver.SavePng(bmp, path) + +Dim loaded As Bitmap = Bitmap(path) +Debug.Print loaded.LastResult & " " & loaded.Width & " " & loaded.Height +Debug.Print Hex$(loaded.Pixel(3, 3).argb) +' Output: +' 0 +' 0 16 8 +' FFC86432 +``` + +## Example + +The example draws a gradient of grays, makes a copy that is converted to 24 bits, and reads pixels through the default member. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim bmp As Bitmap = Bitmap(4!, 1!) +Dim x As Long +For x = 0 To 3 + bmp(x, 0) = Color(255, x * 80, x * 80, x * 80) +Next + +Dim small As Bitmap = bmp.CloneI(1, 0, 2, 1, PixelFormat24bppRGB) +Debug.Print small.Width +Debug.Print Hex$(small(0, 0).argb) & " " & Hex$(small(1, 0).argb) +' Output: +' 2 +' FF505050 FFA0A0A0 +``` + +## See Also + +- [Bitmap](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusheaders/nl-gdiplusheaders-bitmap) -- Microsoft's documentation of the GDI+ class +- [Image](Image) class +- [Graphics](Graphics) class +- [CachedBitmap](CachedBitmap) class +- [Effect](Effect) class +- [BitmapData](Types/BitmapData) type +- [ColorPalette](Types/ColorPalette) type diff --git a/docs/Reference/Contributed/GdiPlus/Blur.md b/docs/Reference/Contributed/GdiPlus/Blur.md new file mode 100644 index 00000000..800ca85d --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Blur.md @@ -0,0 +1,88 @@ +--- +title: Blur +parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Blur +--- + +# Blur class +{: .no_toc } + +An [**Effect**](Effect) that blurs a picture. + +The blur spreads each pixel over its neighbours, as far as the radius reaches. The class mirrors the GDI+ [Blur](https://learn.microsoft.com/en-us/windows/win32/api/gdipluseffects/nl-gdipluseffects-blur) class and inherits the members of [**Effect**](Effect). + +* TOC +{:toc} + +## Creating + +Syntax: *fx* **= Blur**( ) + +Syntax: *fx* **= Blur**( *params* ) + +Syntax: *fx* **= Blur**( *radius*, *expandEdge* ) + +Each form is also available as **New Blur**( ... ) with the same arguments. + +*params* +: *required* A [**BlurParams**](Types/BlurParams) for the parameters. + +*radius* +: *required* A **Single**: the blur radius in pixels, from 0 to 255. A larger radius gives a stronger blur. + +*expandEdge* +: *required* A **Boolean**. **True** lets the blur spread beyond the edges of the picture. **False** keeps the size of the picture. + +A constructor that fails creates an unusable object whose **LastResult** tells why. The form without arguments leaves the parameters at the defaults of GDI+. + +## Parameters + +Syntax: *fx*.**Parameters** [ **=** *params* ] + +Syntax: *params* **=** *fx*.**Parameters**( *size* ) + +Gets or sets the [**BlurParams**](Types/BlurParams). + +> [!WARNING] 0.9.45.0 +> The getter returns zeros and sets **LastResult** to 2 (**InvalidParameter**) unless it is given *size*, the size of the structure: `fx.Parameters(LenB(Of BlurParams))`. See [**Effect**](Effect#parameters). + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim fx As Blur = Blur(10!, True) +Dim p As BlurParams = fx.Parameters(LenB(Of BlurParams)) +Debug.Print fx.LastResult & " " & p.radius & " " & p.expandEdge + +fx.Parameters = BlurParams(4!, False) +Debug.Print fx.Parameters(LenB(Of BlurParams)).radius +' Output: +' 0 10 -1 +' 4 +``` + +## Example + +The example blurs a picture of one white pixel on black and shows how the light spreads. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim bmp As Bitmap = Bitmap(9!, 9!) +Dim g As Graphics = Graphics(bmp) +g.Clear(Color(255, 0, 0, 0)) +bmp.Pixel(4, 4) = Color(255, 255, 255, 255) + +Debug.Print bmp.ApplyEffect(Blur(2!, False), GpRect(0, 0, 9, 9)) +Debug.Print Hex$(bmp.Pixel(4, 4).argb) & " " & Hex$(bmp.Pixel(3, 4).argb) & " " & Hex$(bmp.Pixel(2, 4).argb) & " " & Hex$(bmp.Pixel(0, 0).argb) +' Output: +' 0 +' FF666666 FF3E3E3E FF0E0E0E FF000000 +``` + +## See Also + +- [Blur](https://learn.microsoft.com/en-us/windows/win32/api/gdipluseffects/nl-gdipluseffects-blur) -- Microsoft's documentation of the GDI+ class +- [Effect](Effect) class +- [Sharpen](Sharpen) class +- [BlurParams](Types/BlurParams) type +- [Bitmap](Bitmap) class diff --git a/docs/Reference/Contributed/GdiPlus/BrightnessContrast.md b/docs/Reference/Contributed/GdiPlus/BrightnessContrast.md new file mode 100644 index 00000000..03f06fcf --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/BrightnessContrast.md @@ -0,0 +1,95 @@ +--- +title: BrightnessContrast +parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/BrightnessContrast +--- + +# BrightnessContrast class +{: .no_toc } + +An [**Effect**](Effect) that changes the brightness and the contrast of a picture. + +The class mirrors the GDI+ [BrightnessContrast](https://learn.microsoft.com/en-us/windows/win32/api/gdipluseffects/nl-gdipluseffects-brightnesscontrast) class and inherits the members of [**Effect**](Effect). + +* TOC +{:toc} + +## Creating + +Syntax: *fx* **= BrightnessContrast**( ) + +Syntax: *fx* **= BrightnessContrast**( *params* ) + +Syntax: *fx* **= BrightnessContrast**( *brightness*, *contrast* ) + +Each form is also available as **New BrightnessContrast**( ... ) with the same arguments. + +*params* +: *required* A [**BrightnessContrastParams**](Types/BrightnessContrastParams) for the parameters. + +*brightness* +: *required* A **Long** from -255 to 255. A positive value lightens the picture by adding that amount to each colour value, and a negative one darkens it. 0 changes nothing. + +*contrast* +: *required* A **Long** from -100 to 100. A positive value increases the difference between light and dark, and a negative one decreases it. 0 changes nothing. + +A constructor that fails creates an unusable object whose **LastResult** tells why. + +## Parameters + +Syntax: *fx*.**Parameters** [ **=** *params* ] + +Syntax: *params* **=** *fx*.**Parameters**( *size* ) + +Gets or sets the [**BrightnessContrastParams**](Types/BrightnessContrastParams). + +> [!WARNING] 0.9.45.0 +> The getter returns zeros and sets **LastResult** to 2 (**InvalidParameter**) unless it is given *size*, the size of the structure: `fx.Parameters(LenB(Of BrightnessContrastParams))`. See [**Effect**](Effect#parameters). + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim fx As BrightnessContrast = BrightnessContrast(50, 0) +Dim p As BrightnessContrastParams = fx.Parameters(LenB(Of BrightnessContrastParams)) +Debug.Print fx.LastResult & " " & p.brightness & " " & p.contrast + +fx.Parameters = BrightnessContrastParams(-20, 30) +Debug.Print fx.Parameters(LenB(Of BrightnessContrastParams)).contrast +' Output: +' 0 50 0 +' 30 +``` + +## Example + +The example applies three settings of the effect to three bitmaps of the same colour. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim lighter As Bitmap = Bitmap(8!, 8!) +Dim darker As Bitmap = Bitmap(8!, 8!) +Dim contrasty As Bitmap = Bitmap(8!, 8!) +Graphics(lighter).Clear(Color(255, 200, 100, 50)) +Graphics(darker).Clear(Color(255, 200, 100, 50)) +Graphics(contrasty).Clear(Color(255, 200, 100, 50)) + +lighter.ApplyEffect BrightnessContrast(50, 0), GpRect(0, 0, 8, 8) +darker.ApplyEffect BrightnessContrast(-50, 0), GpRect(0, 0, 8, 8) +contrasty.ApplyEffect BrightnessContrast(0, 50), GpRect(0, 0, 8, 8) +Debug.Print Hex$(lighter.Pixel(4, 4).argb) +Debug.Print Hex$(darker.Pixel(4, 4).argb) +Debug.Print Hex$(contrasty.Pixel(4, 4).argb) +' Output: +' FFFA9664 +' FF963200 +' FFFF4900 +``` + +## See Also + +- [BrightnessContrast](https://learn.microsoft.com/en-us/windows/win32/api/gdipluseffects/nl-gdipluseffects-brightnesscontrast) -- Microsoft's documentation of the GDI+ class +- [Effect](Effect) class +- [HueSaturationLightness](HueSaturationLightness) class +- [Levels](Levels) class +- [BrightnessContrastParams](Types/BrightnessContrastParams) type diff --git a/docs/Reference/Contributed/GdiPlus/CachedBitmap.md b/docs/Reference/Contributed/GdiPlus/CachedBitmap.md new file mode 100644 index 00000000..912cb317 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/CachedBitmap.md @@ -0,0 +1,90 @@ +--- +title: CachedBitmap +parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/CachedBitmap +--- + +# CachedBitmap class +{: .no_toc } + +A copy of a bitmap in the format of one particular [**Graphics**](Graphics), for drawing it again and again quickly. + +A [**Bitmap**](Bitmap) is converted to the format of the destination every time it is drawn. A **CachedBitmap** does that conversion once, when it is created, so that [**Graphics.DrawCachedBitmap**](Graphics#drawcachedbitmap) can copy the pixels without converting them. It suits a picture that is drawn many times unchanged. The class has no members of its own besides the constructor, and the copy does not follow later changes to the bitmap. It mirrors the GDI+ [CachedBitmap](https://learn.microsoft.com/en-us/windows/win32/api/gdipluscachedbitmap/nl-gdipluscachedbitmap-cachedbitmap) class. + +## Creating + +Syntax: *cached* **= CachedBitmap**( *bitmap*, *gr* ) + +Syntax: *cached* **= New CachedBitmap**( *bitmap*, *gr* ) + +*bitmap* +: *required* The [**Bitmap**](Bitmap) to copy. + +*gr* +: *required* The [**Graphics**](Graphics) whose pixel format and settings the copy is made for. + +A constructor that fails creates an unusable object whose **LastResult** tells why. + +> [!NOTE] 0.9.45.0 +> A **CachedBitmap** is valid for the **Graphics** it was made for, and for another with the same pixel format. If the format of the destination changes (for example, the display resolution or colour depth changes), the cached copy has to be made again, and drawing it on a destination with another format fails with **WrongState**. + +## Drawing + +Draw it with [**Graphics.DrawCachedBitmapI**](Graphics#drawcachedbitmapi), which takes the position as two **Long** values, or with [**DrawCachedBitmap**](Graphics#drawcachedbitmap), which takes a [**GpPoint**](Types/GpPoint). The copy is drawn without scaling, and with its upper left corner at that position. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim tile As Bitmap = Bitmap(4!, 4!) +Dim tg As Graphics = Graphics(tile) +tg.Clear(Color(255, 255, 0, 0)) + +Dim target As Bitmap = Bitmap(10!, 10!) +Dim g As Graphics = Graphics(target) + +Dim cached As CachedBitmap = CachedBitmap(tile, g) +Debug.Print cached.LastResult + +Debug.Print g.DrawCachedBitmapI(cached, 2, 2) +Debug.Print Hex$(target.Pixel(3, 3).argb) +Debug.Print Hex$(target.Pixel(0, 0).argb) +' Output: +' 0 +' 0 +' FFFF0000 +' 0 +``` + +## Example + +The example paints the same cached tile at three positions. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim tile As Bitmap = Bitmap(2!, 2!) +Dim tg As Graphics = Graphics(tile) +tg.Clear(Color(255, 0, 128, 0)) + +Dim target As Bitmap = Bitmap(8!, 2!) +Dim g As Graphics = Graphics(target) +Dim cached As CachedBitmap = CachedBitmap(tile, g) + +Dim x As Long +For x = 0 To 6 Step 3 + g.DrawCachedBitmapI cached, x, 0 +Next + +For x = 0 To 7 + Debug.Print Hex$(target.Pixel(x, 0).A) & " "; +Next +Debug.Print +' Output: +' FF FF 0 FF FF 0 FF FF +``` + +## See Also + +- [CachedBitmap](https://learn.microsoft.com/en-us/windows/win32/api/gdipluscachedbitmap/nl-gdipluscachedbitmap-cachedbitmap) -- Microsoft's documentation of the GDI+ class +- [Bitmap](Bitmap) class +- [Graphics](Graphics) class diff --git a/docs/Reference/Contributed/GdiPlus/ColorBalance.md b/docs/Reference/Contributed/GdiPlus/ColorBalance.md new file mode 100644 index 00000000..f7618f40 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/ColorBalance.md @@ -0,0 +1,96 @@ +--- +title: ColorBalance +parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/ColorBalance +--- + +# ColorBalance class +{: .no_toc } + +An [**Effect**](Effect) that shifts the balance between the opposite colours cyan and red, magenta and green, and yellow and blue. + +The class mirrors the GDI+ [ColorBalance](https://learn.microsoft.com/en-us/windows/win32/api/gdipluseffects/nl-gdipluseffects-colorbalance) class and inherits the members of [**Effect**](Effect). + +* TOC +{:toc} + +## Creating + +Syntax: *fx* **= ColorBalance**( ) + +Syntax: *fx* **= ColorBalance**( *params* ) + +Syntax: *fx* **= ColorBalance**( *cyanRed*, *magentaGreen*, *yellowBlue* ) + +Each form is also available as **New ColorBalance**( ... ) with the same arguments. + +*params* +: *required* A [**ColorBalanceParams**](Types/ColorBalanceParams) for the parameters. + +*cyanRed* +: *required* A **Long** from -100 to 100. A positive value adds red, and a negative one adds cyan. + +*magentaGreen* +: *required* A **Long** from -100 to 100. A positive value adds green, and a negative one adds magenta. + +*yellowBlue* +: *required* A **Long** from -100 to 100. A positive value adds blue, and a negative one adds yellow. + +A value of 0 changes nothing. A constructor that fails creates an unusable object whose **LastResult** tells why. + +> [!WARNING] 0.9.45.0 +> The form with *params* stops the program with an access violation, in 32-bit and 64-bit programs. The forms without arguments and with the three values work. To use a structure, create the effect without arguments and set [**Parameters**](#parameters). + +## Parameters + +Syntax: *fx*.**Parameters** [ **=** *params* ] + +Syntax: *params* **=** *fx*.**Parameters**( *size* ) + +Gets or sets the [**ColorBalanceParams**](Types/ColorBalanceParams). + +> [!WARNING] 0.9.45.0 +> The getter returns zeros and sets **LastResult** to 2 (**InvalidParameter**) unless it is given *size*, the size of the structure: `fx.Parameters(LenB(Of ColorBalanceParams))`. See [**Effect**](Effect#parameters). + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim fx As ColorBalance = ColorBalance(10, -20, 30) +Dim p As ColorBalanceParams = fx.Parameters(LenB(Of ColorBalanceParams)) +Debug.Print fx.LastResult & " " & p.cyanRed & " " & p.magentaGreen & " " & p.yellowBlue +' Output: +' 0 10 -20 30 +``` + +## Example + +The example pushes the colour 200, 100, 50 fully toward red, toward cyan, and toward blue. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim red As Bitmap = Bitmap(4!, 4!) +Dim cyan As Bitmap = Bitmap(4!, 4!) +Dim blue As Bitmap = Bitmap(4!, 4!) +Graphics(red).Clear(Color(255, 200, 100, 50)) +Graphics(cyan).Clear(Color(255, 200, 100, 50)) +Graphics(blue).Clear(Color(255, 200, 100, 50)) + +red.ApplyEffect ColorBalance(100, 0, 0), GpRect(0, 0, 4, 4) +cyan.ApplyEffect ColorBalance(-100, 0, 0), GpRect(0, 0, 4, 4) +blue.ApplyEffect ColorBalance(0, 0, 100), GpRect(0, 0, 4, 4) +Debug.Print Hex$(red.Pixel(1, 1).argb) +Debug.Print Hex$(cyan.Pixel(1, 1).argb) +Debug.Print Hex$(blue.Pixel(1, 1).argb) +' Output: +' FFFF6432 +' FF006432 +' FFC86464 +``` + +## See Also + +- [ColorBalance](https://learn.microsoft.com/en-us/windows/win32/api/gdipluseffects/nl-gdipluseffects-colorbalance) -- Microsoft's documentation of the GDI+ class +- [Effect](Effect) class +- [Tint](Tint) class +- [ColorBalanceParams](Types/ColorBalanceParams) type diff --git a/docs/Reference/Contributed/GdiPlus/ColorCurve.md b/docs/Reference/Contributed/GdiPlus/ColorCurve.md new file mode 100644 index 00000000..38e42d78 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/ColorCurve.md @@ -0,0 +1,93 @@ +--- +title: ColorCurve +parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/ColorCurve +--- + +# ColorCurve class +{: .no_toc } + +An [**Effect**](Effect) that adjusts the exposure, density, contrast, highlights, shadows, midtones or saturation of a picture, for all colour channels or for one. + +Each setting of the effect makes one kind of adjustment, chosen by [**CurveAdjustments**](Enumerations/CurveAdjustments), on one channel, chosen by [**CurveChannel**](Enumerations/CurveChannel). To make several adjustments, apply several effects one after the other. The class mirrors the GDI+ [ColorCurve](https://learn.microsoft.com/en-us/windows/win32/api/gdipluseffects/nl-gdipluseffects-colorcurve) class and inherits the members of [**Effect**](Effect). + +* TOC +{:toc} + +## Creating + +Syntax: *fx* **= ColorCurve**( ) + +Syntax: *fx* **= ColorCurve**( *params* ) + +Syntax: *fx* **= ColorCurve**( *adjustment*, *channel*, *value* ) + +Each form is also available as **New ColorCurve**( ... ) with the same arguments. + +*params* +: *required* A [**ColorCurveParams**](Types/ColorCurveParams) for the parameters. + +*adjustment* +: *required* A [**CurveAdjustments**](Enumerations/CurveAdjustments) member: the kind of adjustment. + +*channel* +: *required* A [**CurveChannel**](Enumerations/CurveChannel) member: **CurveChannelAll**, or one of red, green and blue. + +*value* +: *required* A **Long**: the strength of the adjustment. Its range depends on *adjustment*: -255 to 255 for **AdjustExposure** and **AdjustDensity**, -100 to 100 for **AdjustContrast**, **AdjustHighlight**, **AdjustShadow** and **AdjustMidtone**, and 0 to 255 for **AdjustWhiteSaturation** and **AdjustBlackSaturation**. 0 changes nothing for the first two groups. + +A constructor that fails creates an unusable object whose **LastResult** tells why. + +> [!WARNING] 0.9.45.0 +> The form with *params* stops the program with an access violation, in 32-bit and 64-bit programs. The forms without arguments and with the three values work. To use a structure, create the effect without arguments and set [**Parameters**](#parameters). + +## Parameters + +Syntax: *fx*.**Parameters** [ **=** *params* ] + +Syntax: *params* **=** *fx*.**Parameters**( *size* ) + +Gets or sets the [**ColorCurveParams**](Types/ColorCurveParams). + +> [!WARNING] 0.9.45.0 +> The getter returns zeros and sets **LastResult** to 2 (**InvalidParameter**) unless it is given *size*, the size of the structure: `fx.Parameters(LenB(Of ColorCurveParams))`. See [**Effect**](Effect#parameters). + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim fx As ColorCurve = ColorCurve(AdjustContrast, CurveChannelRed, 20) +Dim p As ColorCurveParams = fx.Parameters(LenB(Of ColorCurveParams)) +Debug.Print fx.LastResult & " " & p.adjustment & " " & p.channel & " " & p.value +' Output: +' 0 2 1 20 +``` + +## Example + +The example raises the exposure of all channels, and the density of the red channel alone. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim exposed As Bitmap = Bitmap(4!, 4!) +Dim dense As Bitmap = Bitmap(4!, 4!) +Graphics(exposed).Clear(Color(255, 200, 100, 50)) +Graphics(dense).Clear(Color(255, 200, 100, 50)) + +exposed.ApplyEffect ColorCurve(AdjustExposure, CurveChannelAll, 50), GpRect(0, 0, 4, 4) +dense.ApplyEffect ColorCurve(AdjustDensity, CurveChannelRed, 50), GpRect(0, 0, 4, 4) +Debug.Print Hex$(exposed.Pixel(1, 1).argb) +Debug.Print Hex$(dense.Pixel(1, 1).argb) +' Output: +' FFFA9664 +' FFFA6432 +``` + +## See Also + +- [ColorCurve](https://learn.microsoft.com/en-us/windows/win32/api/gdipluseffects/nl-gdipluseffects-colorcurve) -- Microsoft's documentation of the GDI+ class +- [Effect](Effect) class +- [Levels](Levels) class +- [ColorCurveParams](Types/ColorCurveParams) type +- [CurveAdjustments](Enumerations/CurveAdjustments) enumeration +- [CurveChannel](Enumerations/CurveChannel) enumeration diff --git a/docs/Reference/Contributed/GdiPlus/ColorLUT.md b/docs/Reference/Contributed/GdiPlus/ColorLUT.md new file mode 100644 index 00000000..f425315d --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/ColorLUT.md @@ -0,0 +1,106 @@ +--- +title: ColorLUT +parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/ColorLUT +--- + +# ColorLUT class +{: .no_toc } + +An [**Effect**](Effect) that replaces the value of each colour channel through a lookup table. + +A lookup table (LUT) has 256 entries, one for each possible value of a channel. The pixel value *v* becomes the table entry number *v*. The effect has one table for blue, green, red and alpha, so it can express any curve, inversion or posterisation of a channel. The class mirrors the GDI+ [ColorLUT](https://learn.microsoft.com/en-us/windows/win32/api/gdipluseffects/nl-gdipluseffects-colorlut) class and inherits the members of [**Effect**](Effect). + +* TOC +{:toc} + +## Creating + +Syntax: *fx* **= ColorLUT**( ) + +Syntax: *fx* **= ColorLUT**( *params* ) + +Syntax: *fx* **= ColorLUT**( *lutB*, *lutG*, *lutR*, *lutA* ) + +Each form is also available as **New ColorLUT**( ... ) with the same arguments. + +*params* +: *required* A [**ColorLUTParams**](Types/ColorLUTParams) for the parameters. + +*lutB*, *lutG*, *lutR*, *lutA* +: *required* Arrays of 256 **Byte** values, any lower bound: the tables for blue, green, red and alpha. An array of another length leaves the tables unchanged. + +A constructor that fails creates an unusable object whose **LastResult** tells why. + +> [!WARNING] 0.9.45.0 +> The form with *params* stops the program with an access violation, in 32-bit and 64-bit programs. Create the effect without arguments and set [**Parameters**](#parameters). + +> [!WARNING] 0.9.45.0 +> The form with four arrays copies the alpha table from the array *lutB*, not from *lutA*, so the alpha channel is mapped through the blue table. With the blue table of the example below, the result is transparent. Fill the four tables of a [**ColorLUTParams**](Types/ColorLUTParams) yourself and set **Parameters**. + +## Parameters + +Syntax: *fx*.**Parameters** [ **=** *params* ] + +Syntax: *params* **=** *fx*.**Parameters**( *size* ) + +Gets or sets the [**ColorLUTParams**](Types/ColorLUTParams). + +> [!WARNING] 0.9.45.0 +> The getter returns zeros and sets **LastResult** to 2 (**InvalidParameter**) unless it is given *size*, the size of the structure: `fx.Parameters(LenB(Of ColorLUTParams))`. See [**Effect**](Effect#parameters). + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim tables As ColorLUTParams +Dim i As Long +For i = 0 To 255 + tables.lutB.b(i) = 255 - i ' invert blue + tables.lutG.b(i) = i + tables.lutR.b(i) = i + tables.lutA.b(i) = i +Next + +Dim fx As ColorLUT = ColorLUT() +fx.Parameters = tables +Dim p As ColorLUTParams = fx.Parameters(LenB(Of ColorLUTParams)) +Debug.Print fx.LastResult & " " & p.lutB.b(10) & " " & p.lutG.b(10) & " " & p.lutA.b(10) +' Output: +' 0 245 10 10 +``` + +## Example + +The example inverts the blue channel and leaves the others alone. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim bmp As Bitmap = Bitmap(4!, 4!) +Graphics(bmp).Clear(Color(255, 200, 100, 50)) + +Dim tables As ColorLUTParams +Dim i As Long +For i = 0 To 255 + tables.lutB.b(i) = 255 - i + tables.lutG.b(i) = i + tables.lutR.b(i) = i + tables.lutA.b(i) = i +Next + +Dim fx As ColorLUT = ColorLUT() +fx.Parameters = tables + +Debug.Print bmp.ApplyEffect(fx, GpRect(0, 0, 4, 4)) +Debug.Print Hex$(bmp.Pixel(1, 1).argb) +' Output: +' 0 +' FFC864CD +``` + +## See Also + +- [ColorLUT](https://learn.microsoft.com/en-us/windows/win32/api/gdipluseffects/nl-gdipluseffects-colorlut) -- Microsoft's documentation of the GDI+ class +- [Effect](Effect) class +- [ColorCurve](ColorCurve) class +- [ColorLUTParams](Types/ColorLUTParams) type diff --git a/docs/Reference/Contributed/GdiPlus/ColorMatrixEffect.md b/docs/Reference/Contributed/GdiPlus/ColorMatrixEffect.md new file mode 100644 index 00000000..300f06be --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/ColorMatrixEffect.md @@ -0,0 +1,96 @@ +--- +title: ColorMatrixEffect +parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/ColorMatrixEffect +--- + +# ColorMatrixEffect class +{: .no_toc } + +An [**Effect**](Effect) that transforms the colours of a picture with a 5 by 5 colour matrix. + +It does with a [**Bitmap**](Bitmap) what [**ImageAttributes.SetColorMatrix**](ImageAttributes#setcolormatrix) does while drawing, and uses the same [**ColorMatrix**](Types/ColorMatrix): the page of **ImageAttributes** explains how the matrix is read. The class mirrors the GDI+ [ColorMatrixEffect](https://learn.microsoft.com/en-us/windows/win32/api/gdipluseffects/nl-gdipluseffects-colormatrixeffect) class and inherits the members of [**Effect**](Effect). + +* TOC +{:toc} + +## Creating + +Syntax: *fx* **= ColorMatrixEffect**( ) + +Syntax: *fx* **= ColorMatrixEffect**( *params* ) + +Each form is also available as **New ColorMatrixEffect**( ... ) with the same arguments. + +*params* +: *required* A [**ColorMatrix**](Types/ColorMatrix). + +A constructor that fails creates an unusable object whose **LastResult** tells why. The effect created without arguments has the default matrix of GDI+. + +> [!WARNING] 0.9.45.0 +> The form with *params* stops the program with an access violation, in 32-bit and 64-bit programs. Create the effect without arguments and set [**Parameters**](#parameters). + +## Parameters + +Syntax: *fx*.**Parameters** [ **=** *params* ] + +Syntax: *params* **=** *fx*.**Parameters**( *size* ) + +Gets or sets the [**ColorMatrix**](Types/ColorMatrix). + +> [!WARNING] 0.9.45.0 +> The getter returns zeros and sets **LastResult** to 2 (**InvalidParameter**) unless it is given *size*, the size of the structure: `fx.Parameters(LenB(Of ColorMatrix))`. See [**Effect**](Effect#parameters). + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim cm As ColorMatrix +Dim i As Long +For i = 0 To 4 + cm.m(i, i) = 1 +Next +cm.m(2, 0) = 1 ' blue += red + +Dim fx As ColorMatrixEffect = ColorMatrixEffect() +fx.Parameters = cm +Debug.Print fx.LastResult + +Dim back As ColorMatrix = fx.Parameters(LenB(Of ColorMatrix)) +Debug.Print back.m(2, 0) & " " & back.m(0, 2) & " " & back.m(1, 1) +' Output: +' 0 +' 1 0 1 +``` + +## Example + +The example swaps the red and blue channels of a bitmap. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim bmp As Bitmap = Bitmap(4!, 4!) +Graphics(bmp).Clear(Color(255, 200, 100, 50)) + +Dim swap As ColorMatrix +swap.m(2, 0) = 1 ' blue = red +swap.m(1, 1) = 1 ' green = green +swap.m(0, 2) = 1 ' red = blue +swap.m(3, 3) = 1 ' alpha = alpha +swap.m(4, 4) = 1 + +Dim fx As ColorMatrixEffect = ColorMatrixEffect() +fx.Parameters = swap +Debug.Print bmp.ApplyEffect(fx, GpRect(0, 0, 4, 4)) +Debug.Print Hex$(bmp.Pixel(1, 1).argb) +' Output: +' 0 +' FF3264C8 +``` + +## See Also + +- [ColorMatrixEffect](https://learn.microsoft.com/en-us/windows/win32/api/gdipluseffects/nl-gdipluseffects-colormatrixeffect) -- Microsoft's documentation of the GDI+ class +- [Effect](Effect) class +- [ImageAttributes](ImageAttributes) class +- [ColorMatrix](Types/ColorMatrix) type diff --git a/docs/Reference/Contributed/GdiPlus/CustomLineCap.md b/docs/Reference/Contributed/GdiPlus/CustomLineCap.md new file mode 100644 index 00000000..cff99904 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/CustomLineCap.md @@ -0,0 +1,217 @@ +--- +title: CustomLineCap +parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/CustomLineCap +--- + +# CustomLineCap class +{: .no_toc } + +A line cap whose shape is a path: a mark that a [**Pen**](Pen) draws at the start or at the end of a line. + +A **CustomLineCap** is made from one or two [**GraphicsPath**](GraphicsPath) objects: a path that is filled with the colour of the pen, and a path that is outlined with it. It is attached to a pen with [**CustomStartCap**](Pen#customstartcap) or [**CustomEndCap**](Pen#customendcap). [**ArrowCap**](ArrowCap), the arrow-shaped cap, inherits from this class. The class mirrors the GDI+ [CustomLineCap](https://learn.microsoft.com/en-us/windows/win32/api/gdipluslinecaps/nl-gdipluslinecaps-customlinecap) class. + +* TOC +{:toc} + +## Creating + +Syntax: *cap* **= CustomLineCap**( *fillPath*, *strokePath* [, *baseCap* [, *baseInset*]] ) + +Syntax: *cap* **= New CustomLineCap**( *fillPath*, *strokePath* [, *baseCap* [, *baseInset*]] ) + +*fillPath* +: *required* A [**GraphicsPath**](GraphicsPath) that is filled, or **Nothing**. + +*strokePath* +: *required* A **GraphicsPath** that is outlined, or **Nothing**. At least one of the two paths must be given; both are accepted. + +*baseCap* +: *optional* A [**GpLineCap**](Enumerations/GpLineCap) value for the shape of the line where it meets the cap. The default is **LineCapFlat**. + +*baseInset* +: *optional* A **Long**: the distance between the end of the line and the base of the cap, as a multiple of the pen width. The default is 0. + +The two forms are one thing. The paths use their own coordinate system, with its origin at the end of the line. The x axis runs across the line. The y axis runs along it: the negative y values are back along the line, towards the other end, and the positive y values lie beyond the end of the line. The cap is scaled by the width of the pen, and a pen narrower than 2 counts as 2. + +> [!NOTE] 0.9.45.0 +> *baseInset* is a **Long**, so a fraction is cut off. The [**BaseInset**](#baseinset) property takes a **Single**. + +The example draws a line that ends in a small filled rectangle. The path is two units wide and one unit long, behind the end of the line, and the pen is 2 wide: the cap is 4 rows tall and 2 columns long. **#** is a pixel of the pen. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim fill As GraphicsPath = New GraphicsPath() +fill.AddRectangle(-1, -1, 2, 1) +Dim noStroke As GraphicsPath + +Dim cap As CustomLineCap = New CustomLineCap(fill, noStroke) +Dim linePen As Pen = Pen(Color(255, 255, 0, 0), 2) +linePen.CustomEndCap = cap + +Dim bmp As Bitmap = Bitmap(30!, 10!) +Dim g As Graphics = Graphics(bmp) +g.Clear Color(255, 255, 255, 255) +g.DrawLine linePen, 2, 5, 20, 5 + +Dim x As Long, y As Long, row As String +For y = 1 To 8 + row = "" + For x = 0 To 29 + row = row & IIf(bmp.Pixel(x, y).argb = &HFFFFFFFF, ".", "#") + Next + Debug.Print row +Next +' Output: +' .............................. +' .............................. +' ..................##.......... +' ..##################.......... +' ..##################.......... +' ..................##.......... +' .............................. +' .............................. +``` + +### Clone + +Syntax: *copy* **=** *cap*.**Clone**( ) + +Returns a new **CustomLineCap** with the same paths and settings. + +## Properties + +### BaseCap + +Syntax: *cap*.**BaseCap** [ **=** *baseCap* ] + +Gets or sets the [**GpLineCap**](Enumerations/GpLineCap) that gives the shape of the line where it meets the cap. + +### BaseInset + +Syntax: *cap*.**BaseInset** [ **=** *inset* ] + +Gets or sets the distance between the end of the line and the base of the cap, a **Single** that is a multiple of the pen width. A positive value ends the line earlier, so that it does not run into the cap. + +### WidthScale + +Syntax: *cap*.**WidthScale** [ **=** *scale* ] + +Gets or sets the factor, a **Single**, by which the cap is scaled in addition to the scaling by the pen width. The default is 1. + +### StrokeJoin + +Syntax: *cap*.**StrokeJoin** [ **=** *lineJoin* ] + +Gets or sets the [**GpLineJoin**](Enumerations/GpLineJoin) of the corners of the stroke path. The default is **LineJoinMiter**. + +### StrokeCap + +Syntax: *cap*.**StrokeCap** = *lineCap* + +Sets the [**GpLineCap**](Enumerations/GpLineCap) of both ends of each line of the stroke path. The property cannot be read: read [**StartStrokeCap**](#startstrokecap) and [**EndStrokeCap**](#endstrokecap). + +### StartStrokeCap + +Syntax: *lineCap* **=** *cap*.**StartStrokeCap** + +Reads the [**GpLineCap**](Enumerations/GpLineCap) of the start of each line of the stroke path. The default is **LineCapFlat**. + +> [!WARNING] 0.9.45.0 +> Assigning **StartStrokeCap** never returns. Assign [**StrokeCap**](#strokecap) to set both ends. + +### EndStrokeCap + +Syntax: *lineCap* **=** *cap*.**EndStrokeCap** + +Reads the [**GpLineCap**](Enumerations/GpLineCap) of the end of each line of the stroke path. The default is **LineCapFlat**. + +> [!WARNING] 0.9.45.0 +> Assigning **EndStrokeCap** never returns. Assign [**StrokeCap**](#strokecap) to set both ends. + +### SetStrokeCaps + +Syntax: *status* **=** *cap*.**SetStrokeCaps**( [ *startCap* [, *endCap*]] ) + +Sets the start cap and the end cap of the stroke lines separately, and returns a [**GpStatus**](Enumerations/GpStatus). A cap that is left out, or given as -1, is not changed. + +> [!WARNING] 0.9.45.0 +> **SetStrokeCaps** never returns, unless both caps are left out. Assign [**StrokeCap**](#strokecap) to set both ends. + +### GetStrokeCaps + +Syntax: *status* **=** *cap*.**GetStrokeCaps**( [ *startCap* [, *endCap*]] ) + +Reads the start cap and the end cap into the variables given, and returns a [**GpStatus**](Enumerations/GpStatus). A variable that is left out is not read. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim fill As GraphicsPath = New GraphicsPath() +fill.AddRectangle(-1, -1, 2, 1) +Dim noStroke As GraphicsPath + +Dim cap As CustomLineCap = New CustomLineCap(fill, noStroke, LineCapRound, 1) +Debug.Print cap.BaseCap & " " & cap.BaseInset & " " & cap.WidthScale & " " & cap.StrokeJoin + +cap.BaseCap = LineCapSquare +cap.BaseInset = 0.5 +cap.WidthScale = 2 +cap.StrokeJoin = LineJoinBevel +Debug.Print cap.BaseCap & " " & cap.BaseInset & " " & cap.WidthScale & " " & cap.StrokeJoin + +cap.StrokeCap = LineCapRound +Dim startCap As GpLineCap, endCap As GpLineCap +Debug.Print cap.GetStrokeCaps(startCap, endCap) & " " & startCap & " " & endCap +Debug.Print cap.StartStrokeCap & " " & cap.EndStrokeCap +' Output: +' 2 1 1 0 +' 1 0.5 2 1 +' 0 2 2 +' 2 2 +``` + +## Example + +A line that stops short of its cap: the base inset ends the line 3 pen widths early, and the cap stays where it was. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim fill As GraphicsPath = New GraphicsPath() +fill.AddRectangle(-1, -1, 2, 1) +Dim noStroke As GraphicsPath + +Dim cap As CustomLineCap = New CustomLineCap(fill, noStroke) +cap.BaseInset = 3 + +Dim linePen As Pen = Pen(Color(255, 255, 0, 0), 2) +linePen.CustomEndCap = cap + +Dim bmp As Bitmap = Bitmap(30!, 10!) +Dim g As Graphics = Graphics(bmp) +g.Clear Color(255, 255, 255, 255) +g.DrawLine linePen, 2, 5, 20, 5 + +Dim x As Long, row As String +For x = 0 To 29 + row = row & IIf(bmp.Pixel(x, 4).argb = &HFFFFFFFF, ".", "#") +Next +Debug.Print row + +Dim copy As CustomLineCap = cap.Clone() +Debug.Print copy.BaseInset +' Output: +' ..############....##.......... +' 3 +``` + +## See Also + +- [CustomLineCap](https://learn.microsoft.com/en-us/windows/win32/api/gdipluslinecaps/nl-gdipluslinecaps-customlinecap) -- Microsoft's documentation of the GDI+ class +- [ArrowCap](ArrowCap) class +- [Pen](Pen) class +- [GraphicsPath](GraphicsPath) class +- [GpLineCap](Enumerations/GpLineCap) enumeration +- [GpLineJoin](Enumerations/GpLineJoin) enumeration diff --git a/docs/Reference/Contributed/GdiPlus/Effect.md b/docs/Reference/Contributed/GdiPlus/Effect.md new file mode 100644 index 00000000..5b8f28a7 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Effect.md @@ -0,0 +1,144 @@ +--- +title: Effect +parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Effect +--- + +# Effect class +{: .no_toc } + +The base class of the image effects that [**Bitmap.ApplyEffect**](Bitmap#applyeffect) applies: blur, sharpening, brightness, colour balance and others. + +An effect is an object with parameters. A program creates one of the eleven effect classes below, sets its parameters, and passes it to [**Bitmap.ApplyEffect**](Bitmap#applyeffect), which changes the pixels of the bitmap, or to [**Graphics.DrawImage**](Graphics#drawimage), which draws a picture through it. **Effect** itself cannot be created: it holds the members that every effect shares. The effects need GDI+ 1.1 (Windows 7 or later), and the class mirrors the GDI+ [Effect](https://learn.microsoft.com/en-us/windows/win32/api/gdipluseffects/nl-gdipluseffects-effect) class. + +* TOC +{:toc} + +## The effects + +| Class | What it does | Parameters | +|:------|:-------------|:-----------| +| [**Blur**](Blur) | Blurs the picture. | [**BlurParams**](Types/BlurParams) | +| [**Sharpen**](Sharpen) | Sharpens the edges. | [**SharpenParams**](Types/SharpenParams) | +| [**BrightnessContrast**](BrightnessContrast) | Changes brightness and contrast. | [**BrightnessContrastParams**](Types/BrightnessContrastParams) | +| [**HueSaturationLightness**](HueSaturationLightness) | Changes hue, saturation and lightness. | [**HueSaturationLightnessParams**](Types/HueSaturationLightnessParams) | +| [**Levels**](Levels) | Sets the highlights, midtones and shadows. | [**LevelsParams**](Types/LevelsParams) | +| [**Tint**](Tint) | Tints the picture with a hue. | [**TintParams**](Types/TintParams) | +| [**ColorBalance**](ColorBalance) | Shifts the balance between opposite colours. | [**ColorBalanceParams**](Types/ColorBalanceParams) | +| [**ColorMatrixEffect**](ColorMatrixEffect) | Transforms the colours with a matrix. | [**ColorMatrix**](Types/ColorMatrix) | +| [**ColorLUT**](ColorLUT) | Replaces colour values through lookup tables. | [**ColorLUTParams**](Types/ColorLUTParams) | +| [**ColorCurve**](ColorCurve) | Adjusts exposure, density, contrast and more. | [**ColorCurveParams**](Types/ColorCurveParams) | +| [**RedEyeCorrection**](RedEyeCorrection) | Corrects red eyes in areas of the picture. | [**RedEyeCorrectionParams**](Types/RedEyeCorrectionParams) | + +Every effect class has the same shape: + +- It is created with `Blur(...)` or `New Blur(...)`, with no arguments, with a parameters structure, or with the individual values. +- Its **Parameters** property gets or sets the parameters structure. +- It inherits the members described below. + +## Creating + +An **Effect** cannot be created. Create one of the eleven effect classes in the table above, with the function of its name or with `New`: `Blur(5!, False)` or `New Blur(5!, False)`. + +## Parameters + +Every effect class has a **Parameters** property of its own type, listed on the page of the class. + +Syntax: *effect*.**Parameters** [ **=** *params* ] + +Syntax: *params* **=** *effect*.**Parameters**( *size* ) + +The setter replaces the parameters. The getter reads them, and needs *size*, the size of the parameters structure in bytes (`LenB(Of BlurParams)`). + +> [!WARNING] 0.9.45.0 +> Without *size*, the getter returns a structure of zeros and sets **LastResult** to 2 (**InvalidParameter**), because GDI+ is given a buffer size of 0. Pass the size every time: `blur.Parameters(LenB(Of BlurParams)).radius`. + +## Auxiliary data + +Some effects return data besides the changed pixels, as a block of memory that the effect owns. [**Bitmap.ApplyEffect**](Bitmap#applyeffect) stores it in the effect, and frees the earlier block. + +### UseAuxData + +Syntax: *effect*.**UseAuxData** [ **=** *flag* ] + +A **Boolean**: whether **ApplyEffect** asks GDI+ for the auxiliary data. The default is **False**. + +### AuxData + +Syntax: *p* **=** *effect*.**AuxData** + +Returns the address of the auxiliary data, a **LongPtr**, or 0 when there is none. The property is read-only. + +### AuxDataSize + +Syntax: *n* **=** *effect*.**AuxDataSize** + +Returns the size of the auxiliary data in bytes, a **Long**. The property is read-only. + +### SetAuxData + +Syntax: *effect*.**SetAuxData**( *auxData*, *auxDataSize* ) + +Replaces the auxiliary data with the block at *auxData*, of *auxDataSize* bytes, and frees the earlier block with the GDI+ allocator. The block must have been allocated with that allocator; passing 0 and 0 discards the data. **ApplyEffect** calls it. A program rarely does. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim fx As Blur = Blur(2!, False) +Debug.Print fx.UseAuxData +Debug.Print fx.AuxData & " " & fx.AuxDataSize + +fx.UseAuxData = True +Debug.Print fx.UseAuxData +' Output: +' False +' 0 0 +' True +``` + +## ParameterSize + +Syntax: *n* **=** *effect*.**ParameterSize** + +Returns the size in bytes of the parameters that the effect takes, as GDI+ states it. + +> [!WARNING] 0.9.45.0 +> **ParameterSize** always returns 0. The property assigns the status of the call, not the size, to its return value. Use `LenB(Of BlurParams)` and the like instead. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim fx As BrightnessContrast = BrightnessContrast(10, 20) +Debug.Print fx.LastResult +Debug.Print fx.ParameterSize ' not the size +Debug.Print LenB(Of BrightnessContrastParams) +' Output: +' 0 +' 0 +' 8 +``` + +## Example + +The example applies two effects in a row to a bitmap, each to a part of it. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim bmp As Bitmap = Bitmap(8!, 4!) +Dim g As Graphics = Graphics(bmp) +g.Clear(Color(255, 200, 100, 50)) + +bmp.ApplyEffect BrightnessContrast(50, 0), GpRect(0, 0, 4, 4) +bmp.ApplyEffect BrightnessContrast(-50, 0), GpRect(4, 0, 4, 4) + +Debug.Print Hex$(bmp.Pixel(0, 0).argb) & " " & Hex$(bmp.Pixel(7, 0).argb) +' Output: +' FFFA9664 FF963200 +``` + +## See Also + +- [Effect](https://learn.microsoft.com/en-us/windows/win32/api/gdipluseffects/nl-gdipluseffects-effect) -- Microsoft's documentation of the GDI+ class +- [Bitmap](Bitmap) class +- [Graphics](Graphics) class diff --git a/docs/Reference/Contributed/GdiPlus/Enumerations/CColor.md b/docs/Reference/Contributed/GdiPlus/Enumerations/CColor.md new file mode 100644 index 00000000..7ce9d1d2 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Enumerations/CColor.md @@ -0,0 +1,186 @@ +--- +title: CColor +parent: Enumerations +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Enumerations/CColor +--- + +# CColor enumeration +{: .no_toc } + +Names 140 common colours, and one fully transparent colour, as 32-bit ARGB values. + +This enumeration belongs to the package; GDI+ has no counterpart. Each member is a **Long** in the layout of a [**Color**](../Types/Color): alpha in the highest byte, then red, green and blue. Every member is opaque (alpha 255), except **Transparent**. The names and the red, green and blue values are those of the named colours of HTML and CSS. + +A member can be written with or without the name of the enumeration: `White` or `CColor.White`. The exact way to use one is to give it to the **Color** function, as in `Color(CColor.Orange)`, which keeps all four bytes. + +> [!WARNING] 0.9.45.0 +> A member passed straight to a method that has an overload taking a **Long** (the *rgb* parameters of **SolidBrush**, **Pen**, **Graphics.Clear** and others) binds to that overload, which reads the value as `&H00RRGGBB` and sets the alpha to 255. The red, green and blue of an opaque member come out right, but the alpha is lost: `SolidBrush(CColor.Transparent)` is opaque white, not transparent. Write `SolidBrush(Color(CColor.Transparent))` instead. + +> [!NOTE] 0.9.45.0 +> A **CColor** member is not a VB colour. A VB colour constant such as **vbRed**, and the result of **RGB**, put red in the lowest byte and have no alpha. The **BGR** property of a **Color** returns its value in that layout. + +| Member | Value | Description | +|:-------|:------|:------------| +| **AliceBlue**{: #AliceBlue } | `&HFFF0F8FF` | Opaque, `#F0F8FF`. | +| **AntiqueWhite**{: #AntiqueWhite } | `&HFFFAEBD7` | Opaque, `#FAEBD7`. | +| **Aqua**{: #Aqua } | `&HFF00FFFF` | Opaque, `#00FFFF`. | +| **Aquamarine**{: #Aquamarine } | `&HFF7FFFD4` | Opaque, `#7FFFD4`. | +| **Azure**{: #Azure } | `&HFFF0FFFF` | Opaque, `#F0FFFF`. | +| **Beige**{: #Beige } | `&HFFF5F5DC` | Opaque, `#F5F5DC`. | +| **Bisque**{: #Bisque } | `&HFFFFE4C4` | Opaque, `#FFE4C4`. | +| **Black**{: #Black } | `&HFF000000` | Opaque, `#000000`. | +| **BlanchedAlmond**{: #BlanchedAlmond } | `&HFFFFEBCD` | Opaque, `#FFEBCD`. | +| **Blue**{: #Blue } | `&HFF0000FF` | Opaque, `#0000FF`. | +| **BlueViolet**{: #BlueViolet } | `&HFF8A2BE2` | Opaque, `#8A2BE2`. | +| **Brown**{: #Brown } | `&HFFA52A2A` | Opaque, `#A52A2A`. | +| **BurlyWood**{: #BurlyWood } | `&HFFDEB887` | Opaque, `#DEB887`. | +| **CadetBlue**{: #CadetBlue } | `&HFF5F9EA0` | Opaque, `#5F9EA0`. | +| **Chartreuse**{: #Chartreuse } | `&HFF7FFF00` | Opaque, `#7FFF00`. | +| **Chocolate**{: #Chocolate } | `&HFFD2691E` | Opaque, `#D2691E`. | +| **Coral**{: #Coral } | `&HFFFF7F50` | Opaque, `#FF7F50`. | +| **CornflowerBlue**{: #CornflowerBlue } | `&HFF6495ED` | Opaque, `#6495ED`. | +| **Cornsilk**{: #Cornsilk } | `&HFFFFF8DC` | Opaque, `#FFF8DC`. | +| **Crimson**{: #Crimson } | `&HFFDC143C` | Opaque, `#DC143C`. | +| **Cyan**{: #Cyan } | `&HFF00FFFF` | Opaque, `#00FFFF`. | +| **DarkBlue**{: #DarkBlue } | `&HFF00008B` | Opaque, `#00008B`. | +| **DarkCyan**{: #DarkCyan } | `&HFF008B8B` | Opaque, `#008B8B`. | +| **DarkGoldenrod**{: #DarkGoldenrod } | `&HFFB8860B` | Opaque, `#B8860B`. | +| **DarkGray**{: #DarkGray } | `&HFFA9A9A9` | Opaque, `#A9A9A9`. | +| **DarkGreen**{: #DarkGreen } | `&HFF006400` | Opaque, `#006400`. | +| **DarkKhaki**{: #DarkKhaki } | `&HFFBDB76B` | Opaque, `#BDB76B`. | +| **DarkMagenta**{: #DarkMagenta } | `&HFF8B008B` | Opaque, `#8B008B`. | +| **DarkOliveGreen**{: #DarkOliveGreen } | `&HFF556B2F` | Opaque, `#556B2F`. | +| **DarkOrange**{: #DarkOrange } | `&HFFFF8C00` | Opaque, `#FF8C00`. | +| **DarkOrchid**{: #DarkOrchid } | `&HFF9932CC` | Opaque, `#9932CC`. | +| **DarkRed**{: #DarkRed } | `&HFF8B0000` | Opaque, `#8B0000`. | +| **DarkSalmon**{: #DarkSalmon } | `&HFFE9967A` | Opaque, `#E9967A`. | +| **DarkSeaGreen**{: #DarkSeaGreen } | `&HFF8FBC8B` | Opaque, `#8FBC8B`. | +| **DarkSlateBlue**{: #DarkSlateBlue } | `&HFF483D8B` | Opaque, `#483D8B`. | +| **DarkSlateGray**{: #DarkSlateGray } | `&HFF2F4F4F` | Opaque, `#2F4F4F`. | +| **DarkTurquoise**{: #DarkTurquoise } | `&HFF00CED1` | Opaque, `#00CED1`. | +| **DarkViolet**{: #DarkViolet } | `&HFF9400D3` | Opaque, `#9400D3`. | +| **DeepPink**{: #DeepPink } | `&HFFFF1493` | Opaque, `#FF1493`. | +| **DeepSkyBlue**{: #DeepSkyBlue } | `&HFF00BFFF` | Opaque, `#00BFFF`. | +| **DimGray**{: #DimGray } | `&HFF696969` | Opaque, `#696969`. | +| **DodgerBlue**{: #DodgerBlue } | `&HFF1E90FF` | Opaque, `#1E90FF`. | +| **Firebrick**{: #Firebrick } | `&HFFB22222` | Opaque, `#B22222`. | +| **FloralWhite**{: #FloralWhite } | `&HFFFFFAF0` | Opaque, `#FFFAF0`. | +| **ForestGreen**{: #ForestGreen } | `&HFF228B22` | Opaque, `#228B22`. | +| **Fuchsia**{: #Fuchsia } | `&HFFFF00FF` | Opaque, `#FF00FF`. | +| **Gainsboro**{: #Gainsboro } | `&HFFDCDCDC` | Opaque, `#DCDCDC`. | +| **GhostWhite**{: #GhostWhite } | `&HFFF8F8FF` | Opaque, `#F8F8FF`. | +| **Gold**{: #Gold } | `&HFFFFD700` | Opaque, `#FFD700`. | +| **Goldenrod**{: #Goldenrod } | `&HFFDAA520` | Opaque, `#DAA520`. | +| **Gray**{: #Gray } | `&HFF808080` | Opaque, `#808080`. | +| **Green**{: #Green } | `&HFF008000` | Opaque, `#008000`. | +| **GreenYellow**{: #GreenYellow } | `&HFFADFF2F` | Opaque, `#ADFF2F`. | +| **Honeydew**{: #Honeydew } | `&HFFF0FFF0` | Opaque, `#F0FFF0`. | +| **HotPink**{: #HotPink } | `&HFFFF69B4` | Opaque, `#FF69B4`. | +| **IndianRed**{: #IndianRed } | `&HFFCD5C5C` | Opaque, `#CD5C5C`. | +| **Indigo**{: #Indigo } | `&HFF4B0082` | Opaque, `#4B0082`. | +| **Ivory**{: #Ivory } | `&HFFFFFFF0` | Opaque, `#FFFFF0`. | +| **Khaki**{: #Khaki } | `&HFFF0E68C` | Opaque, `#F0E68C`. | +| **Lavender**{: #Lavender } | `&HFFE6E6FA` | Opaque, `#E6E6FA`. | +| **LavenderBlush**{: #LavenderBlush } | `&HFFFFF0F5` | Opaque, `#FFF0F5`. | +| **LawnGreen**{: #LawnGreen } | `&HFF7CFC00` | Opaque, `#7CFC00`. | +| **LemonChiffon**{: #LemonChiffon } | `&HFFFFFACD` | Opaque, `#FFFACD`. | +| **LightBlue**{: #LightBlue } | `&HFFADD8E6` | Opaque, `#ADD8E6`. | +| **LightCoral**{: #LightCoral } | `&HFFF08080` | Opaque, `#F08080`. | +| **LightCyan**{: #LightCyan } | `&HFFE0FFFF` | Opaque, `#E0FFFF`. | +| **LightGoldenrodYellow**{: #LightGoldenrodYellow } | `&HFFFAFAD2` | Opaque, `#FAFAD2`. | +| **LightGray**{: #LightGray } | `&HFFD3D3D3` | Opaque, `#D3D3D3`. | +| **LightGreen**{: #LightGreen } | `&HFF90EE90` | Opaque, `#90EE90`. | +| **LightPink**{: #LightPink } | `&HFFFFB6C1` | Opaque, `#FFB6C1`. | +| **LightSalmon**{: #LightSalmon } | `&HFFFFA07A` | Opaque, `#FFA07A`. | +| **LightSeaGreen**{: #LightSeaGreen } | `&HFF20B2AA` | Opaque, `#20B2AA`. | +| **LightSkyBlue**{: #LightSkyBlue } | `&HFF87CEFA` | Opaque, `#87CEFA`. | +| **LightSlateGray**{: #LightSlateGray } | `&HFF778899` | Opaque, `#778899`. | +| **LightSteelBlue**{: #LightSteelBlue } | `&HFFB0C4DE` | Opaque, `#B0C4DE`. | +| **LightYellow**{: #LightYellow } | `&HFFFFFFE0` | Opaque, `#FFFFE0`. | +| **Lime**{: #Lime } | `&HFF00FF00` | Opaque, `#00FF00`. | +| **LimeGreen**{: #LimeGreen } | `&HFF32CD32` | Opaque, `#32CD32`. | +| **Linen**{: #Linen } | `&HFFFAF0E6` | Opaque, `#FAF0E6`. | +| **Magenta**{: #Magenta } | `&HFFFF00FF` | Opaque, `#FF00FF`. | +| **Maroon**{: #Maroon } | `&HFF800000` | Opaque, `#800000`. | +| **MediumAquamarine**{: #MediumAquamarine } | `&HFF66CDAA` | Opaque, `#66CDAA`. | +| **MediumBlue**{: #MediumBlue } | `&HFF0000CD` | Opaque, `#0000CD`. | +| **MediumOrchid**{: #MediumOrchid } | `&HFFBA55D3` | Opaque, `#BA55D3`. | +| **MediumPurple**{: #MediumPurple } | `&HFF9370DB` | Opaque, `#9370DB`. | +| **MediumSeaGreen**{: #MediumSeaGreen } | `&HFF3CB371` | Opaque, `#3CB371`. | +| **MediumSlateBlue**{: #MediumSlateBlue } | `&HFF7B68EE` | Opaque, `#7B68EE`. | +| **MediumSpringGreen**{: #MediumSpringGreen } | `&HFF00FA9A` | Opaque, `#00FA9A`. | +| **MediumTurquoise**{: #MediumTurquoise } | `&HFF48D1CC` | Opaque, `#48D1CC`. | +| **MediumVioletRed**{: #MediumVioletRed } | `&HFFC71585` | Opaque, `#C71585`. | +| **MidnightBlue**{: #MidnightBlue } | `&HFF191970` | Opaque, `#191970`. | +| **MintCream**{: #MintCream } | `&HFFF5FFFA` | Opaque, `#F5FFFA`. | +| **MistyRose**{: #MistyRose } | `&HFFFFE4E1` | Opaque, `#FFE4E1`. | +| **Moccasin**{: #Moccasin } | `&HFFFFE4B5` | Opaque, `#FFE4B5`. | +| **NavajoWhite**{: #NavajoWhite } | `&HFFFFDEAD` | Opaque, `#FFDEAD`. | +| **Navy**{: #Navy } | `&HFF000080` | Opaque, `#000080`. | +| **OldLace**{: #OldLace } | `&HFFFDF5E6` | Opaque, `#FDF5E6`. | +| **Olive**{: #Olive } | `&HFF808000` | Opaque, `#808000`. | +| **OliveDrab**{: #OliveDrab } | `&HFF6B8E23` | Opaque, `#6B8E23`. | +| **Orange**{: #Orange } | `&HFFFFA500` | Opaque, `#FFA500`. | +| **OrangeRed**{: #OrangeRed } | `&HFFFF4500` | Opaque, `#FF4500`. | +| **Orchid**{: #Orchid } | `&HFFDA70D6` | Opaque, `#DA70D6`. | +| **PaleGoldenrod**{: #PaleGoldenrod } | `&HFFEEE8AA` | Opaque, `#EEE8AA`. | +| **PaleGreen**{: #PaleGreen } | `&HFF98FB98` | Opaque, `#98FB98`. | +| **PaleTurquoise**{: #PaleTurquoise } | `&HFFAFEEEE` | Opaque, `#AFEEEE`. | +| **PaleVioletRed**{: #PaleVioletRed } | `&HFFDB7093` | Opaque, `#DB7093`. | +| **PapayaWhip**{: #PapayaWhip } | `&HFFFFEFD5` | Opaque, `#FFEFD5`. | +| **PeachPuff**{: #PeachPuff } | `&HFFFFDAB9` | Opaque, `#FFDAB9`. | +| **Peru**{: #Peru } | `&HFFCD853F` | Opaque, `#CD853F`. | +| **Pink**{: #Pink } | `&HFFFFC0CB` | Opaque, `#FFC0CB`. | +| **Plum**{: #Plum } | `&HFFDDA0DD` | Opaque, `#DDA0DD`. | +| **PowderBlue**{: #PowderBlue } | `&HFFB0E0E6` | Opaque, `#B0E0E6`. | +| **Purple**{: #Purple } | `&HFF800080` | Opaque, `#800080`. | +| **Red**{: #Red } | `&HFFFF0000` | Opaque, `#FF0000`. | +| **RosyBrown**{: #RosyBrown } | `&HFFBC8F8F` | Opaque, `#BC8F8F`. | +| **RoyalBlue**{: #RoyalBlue } | `&HFF4169E1` | Opaque, `#4169E1`. | +| **SaddleBrown**{: #SaddleBrown } | `&HFF8B4513` | Opaque, `#8B4513`. | +| **Salmon**{: #Salmon } | `&HFFFA8072` | Opaque, `#FA8072`. | +| **SandyBrown**{: #SandyBrown } | `&HFFF4A460` | Opaque, `#F4A460`. | +| **SeaGreen**{: #SeaGreen } | `&HFF2E8B57` | Opaque, `#2E8B57`. | +| **SeaShell**{: #SeaShell } | `&HFFFFF5EE` | Opaque, `#FFF5EE`. | +| **Sienna**{: #Sienna } | `&HFFA0522D` | Opaque, `#A0522D`. | +| **Silver**{: #Silver } | `&HFFC0C0C0` | Opaque, `#C0C0C0`. | +| **SkyBlue**{: #SkyBlue } | `&HFF87CEEB` | Opaque, `#87CEEB`. | +| **SlateBlue**{: #SlateBlue } | `&HFF6A5ACD` | Opaque, `#6A5ACD`. | +| **SlateGray**{: #SlateGray } | `&HFF708090` | Opaque, `#708090`. | +| **Snow**{: #Snow } | `&HFFFFFAFA` | Opaque, `#FFFAFA`. | +| **SpringGreen**{: #SpringGreen } | `&HFF00FF7F` | Opaque, `#00FF7F`. | +| **SteelBlue**{: #SteelBlue } | `&HFF4682B4` | Opaque, `#4682B4`. | +| **Tan**{: #Tan } | `&HFFD2B48C` | Opaque, `#D2B48C`. | +| **Teal**{: #Teal } | `&HFF008080` | Opaque, `#008080`. | +| **Thistle**{: #Thistle } | `&HFFD8BFD8` | Opaque, `#D8BFD8`. | +| **Tomato**{: #Tomato } | `&HFFFF6347` | Opaque, `#FF6347`. | +| **Transparent**{: #Transparent } | `&H00FFFFFF` | White with alpha 0: fully transparent. | +| **Turquoise**{: #Turquoise } | `&HFF40E0D0` | Opaque, `#40E0D0`. | +| **Violet**{: #Violet } | `&HFFEE82EE` | Opaque, `#EE82EE`. | +| **Wheat**{: #Wheat } | `&HFFF5DEB3` | Opaque, `#F5DEB3`. | +| **White**{: #White } | `&HFFFFFFFF` | Opaque, `#FFFFFF`. | +| **WhiteSmoke**{: #WhiteSmoke } | `&HFFF5F5F5` | Opaque, `#F5F5F5`. | +| **Yellow**{: #Yellow } | `&HFFFFFF00` | Opaque, `#FFFF00`. | +| **YellowGreen**{: #YellowGreen } | `&HFF9ACD32` | Opaque, `#9ACD32`. | + +## Used by + +- [**Color**](../Types/Color) type: the **Color** function takes a member as its *argb* argument + +## Example + +```tb check_build check_run +Dim orange As Color = Color(CColor.Orange) +Debug.Print Hex$(orange.Value) +Debug.Print orange.Alpha, orange.Red, orange.Green, orange.Blue +Debug.Print Hex$(orange.BGR) +' Output: +' FFFFA500 +' 255 255 165 0 +' A5FF +``` + +## See Also + +- [Enumerations](.) -- all the enumerations of the package diff --git a/docs/Reference/Contributed/GdiPlus/Enumerations/ColorAdjustType.md b/docs/Reference/Contributed/GdiPlus/Enumerations/ColorAdjustType.md new file mode 100644 index 00000000..7177ed0f --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Enumerations/ColorAdjustType.md @@ -0,0 +1,33 @@ +--- +title: ColorAdjustType +parent: Enumerations +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Enumerations/ColorAdjustType +--- + +# ColorAdjustType enumeration +{: .no_toc } + +Specifies which kinds of GDI+ objects use the colour adjustment settings of an **ImageAttributes** object. + +An [**ImageAttributes**](../ImageAttributes) keeps separate settings for each category. Settings given for **ColorAdjustTypeDefault** apply to every category that has none of its own. Most methods of the class take a member of this enumeration as an optional argument that defaults to **ColorAdjustTypeDefault**. + +| Member | Value | Description | +|:-------|:------|:------------| +| **ColorAdjustTypeDefault**{: #ColorAdjustTypeDefault } | `0` | Settings for every category that has no settings of its own. | +| **ColorAdjustTypeBitmap**{: #ColorAdjustTypeBitmap } | `1` | Settings for bitmapped images. | +| **ColorAdjustTypeBrush**{: #ColorAdjustTypeBrush } | `2` | Settings for brush operations in metafiles. | +| **ColorAdjustTypePen**{: #ColorAdjustTypePen } | `3` | Settings for pen operations in metafiles. | +| **ColorAdjustTypeText**{: #ColorAdjustTypeText } | `4` | Settings for text drawn in metafiles. | +| **ColorAdjustTypeCount**{: #ColorAdjustTypeCount } | `5` | The number of categories, used internally. It is not a category. | +| **ColorAdjustTypeAny**{: #ColorAdjustTypeAny } | `6` | Reserved. | + +## Used by + +- [**ImageAttributes**](../ImageAttributes) class: [**ClearColorKey**](../ImageAttributes#clearcolorkey), [**ClearColorMatrices**](../ImageAttributes#clearcolormatrices), [**ClearColorMatrix**](../ImageAttributes#clearcolormatrix), [**ClearGamma**](../ImageAttributes#cleargamma), [**ClearNoOp**](../ImageAttributes#clearnoop), [**ClearOutputChannel**](../ImageAttributes#clearoutputchannel), [**ClearOutputChannelColorProfile**](../ImageAttributes#clearoutputchannelcolorprofile), [**ClearRemapTable**](../ImageAttributes#clearremaptable), [**ClearThreshold**](../ImageAttributes#clearthreshold), [**GetAdjustedPalette**](../ImageAttributes#getadjustedpalette), [**Reset**](../ImageAttributes#reset), [**SetColorKey**](../ImageAttributes#setcolorkey), [**SetColorMatrices**](../ImageAttributes#setcolormatrices), [**SetColorMatrix**](../ImageAttributes#setcolormatrix), [**SetGamma**](../ImageAttributes#setgamma), [**SetNoOp**](../ImageAttributes#setnoop), [**SetOutputChannel**](../ImageAttributes#setoutputchannel), [**SetOutputChannelColorProfile**](../ImageAttributes#setoutputchannelcolorprofile), [**SetRemapTable**](../ImageAttributes#setremaptable), [**SetThreshold**](../ImageAttributes#setthreshold), [**SetToIdentity**](../ImageAttributes#settoidentity) + +## See Also + +- [ColorAdjustType](https://learn.microsoft.com/en-us/windows/win32/api/gdipluscolormatrix/ne-gdipluscolormatrix-coloradjusttype) -- Microsoft's documentation of the GDI+ enumeration +- [Enumerations](.) -- all the enumerations of the package +- [ImageAttributes](../ImageAttributes) class diff --git a/docs/Reference/Contributed/GdiPlus/Enumerations/ColorChannelFlags.md b/docs/Reference/Contributed/GdiPlus/Enumerations/ColorChannelFlags.md new file mode 100644 index 00000000..b455109c --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Enumerations/ColorChannelFlags.md @@ -0,0 +1,30 @@ +--- +title: ColorChannelFlags +parent: Enumerations +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Enumerations/ColorChannelFlags +--- + +# ColorChannelFlags enumeration +{: .no_toc } + +Selects one of the four CMYK channels, for the output channel setting of an **ImageAttributes** object. + +**ImageAttributes.SetOutputChannel** takes one member to convert the colours of an image to the intensity of that channel. + +| Member | Value | Description | +|:-------|:------|:------------| +| **ColorChannelFlagsC**{: #ColorChannelFlagsC } | `0` | The cyan channel. | +| **ColorChannelFlagsM**{: #ColorChannelFlagsM } | `1` | The magenta channel. | +| **ColorChannelFlagsY**{: #ColorChannelFlagsY } | `2` | The yellow channel. | +| **ColorChannelFlagsK**{: #ColorChannelFlagsK } | `3` | The black channel. | +| **ColorChannelFlagsLast**{: #ColorChannelFlagsLast } | `4` | Not a channel. The package passes it when it switches the output channel setting off. | + +## Used by + +- [**ImageAttributes**](../ImageAttributes) class: [**SetOutputChannel**](../ImageAttributes#setoutputchannel) + +## See Also + +- [Enumerations](.) -- all the enumerations of the package +- [ImageAttributes](../ImageAttributes) class diff --git a/docs/Reference/Contributed/GdiPlus/Enumerations/ColorMask.md b/docs/Reference/Contributed/GdiPlus/Enumerations/ColorMask.md new file mode 100644 index 00000000..342a46c5 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Enumerations/ColorMask.md @@ -0,0 +1,44 @@ +--- +title: ColorMask +parent: Enumerations +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Enumerations/ColorMask +--- + +# ColorMask enumeration +{: .no_toc } + +Gives the bit mask that selects a channel of an ARGB value. + +Each mask is `&HFF` shifted left by the matching member of [ColorShift](ColorShift). No public member takes or returns this enumeration. + +> [!NOTE] 0.9.45.0 +> **AlphaMask** has the sign bit set, so shifting the masked value right by **AlphaShift** copies the sign bit and gives -1 for an alpha of 255. Mask the result with `&HFF` again, or use the **Alpha** property of a [**Color**](../Types/Color). + +| Member | Value | Description | +|:-------|:------|:------------| +| **AlphaMask**{: #AlphaMask } | `&HFF000000` | Selects the alpha channel. | +| **RedMask**{: #RedMask } | `&H00FF0000` | Selects the red channel. | +| **GreenMask**{: #GreenMask } | `&H0000FF00` | Selects the green channel. | +| **BlueMask**{: #BlueMask } | `&H000000FF` | Selects the blue channel. | + +## Example + +```tb check_build check_run +Dim argb As Long = CColor.Orange +Debug.Print (argb And RedMask) >> RedShift +Debug.Print (argb And GreenMask) >> GreenShift +Debug.Print (argb And BlueMask) >> BlueShift +Debug.Print (argb And AlphaMask) >> AlphaShift +Debug.Print ((argb And AlphaMask) >> AlphaShift) And &HFF +' Output: +' 255 +' 165 +' 0 +' -1 +' 255 +``` + +## See Also + +- [Enumerations](.) -- all the enumerations of the package diff --git a/docs/Reference/Contributed/GdiPlus/Enumerations/ColorMatrixFlags.md b/docs/Reference/Contributed/GdiPlus/Enumerations/ColorMatrixFlags.md new file mode 100644 index 00000000..d2d0dfc7 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Enumerations/ColorMatrixFlags.md @@ -0,0 +1,29 @@ +--- +title: ColorMatrixFlags +parent: Enumerations +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Enumerations/ColorMatrixFlags +--- + +# ColorMatrixFlags enumeration +{: .no_toc } + +Specifies which colours a colour matrix and a grayscale matrix of an **ImageAttributes** object change. + +The members are alternatives, not bits to combine. A gray shade is any colour with equal red, green and blue components. + +| Member | Value | Description | +|:-------|:------|:------------| +| **ColorMatrixFlagsDefault**{: #ColorMatrixFlagsDefault } | `0` | All colour values, gray shades included, are adjusted by the same colour matrix. | +| **ColorMatrixFlagsSkipGrays**{: #ColorMatrixFlagsSkipGrays } | `1` | Colours are adjusted, but gray shades are not. | +| **ColorMatrixFlagsAltGray**{: #ColorMatrixFlagsAltGray } | `2` | Colours are adjusted by one matrix and gray shades by another. | + +## Used by + +- [**ImageAttributes**](../ImageAttributes) class: [**SetColorMatrices**](../ImageAttributes#setcolormatrices), [**SetColorMatrix**](../ImageAttributes#setcolormatrix) + +## See Also + +- [ColorMatrixFlags](https://learn.microsoft.com/en-us/windows/win32/api/gdipluscolormatrix/ne-gdipluscolormatrix-colormatrixflags) -- Microsoft's documentation of the GDI+ enumeration +- [Enumerations](.) -- all the enumerations of the package +- [ImageAttributes](../ImageAttributes) class diff --git a/docs/Reference/Contributed/GdiPlus/Enumerations/ColorMode.md b/docs/Reference/Contributed/GdiPlus/Enumerations/ColorMode.md new file mode 100644 index 00000000..51a2e327 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Enumerations/ColorMode.md @@ -0,0 +1,22 @@ +--- +title: ColorMode +parent: Enumerations +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Enumerations/ColorMode +--- + +# ColorMode enumeration +{: .no_toc } + +Names the two layouts of a colour value: 32 bits per colour or 64 bits per colour. + +No public member takes or returns this enumeration. A [**Color**](../Types/Color) is always 32-bit ARGB. + +| Member | Value | Description | +|:-------|:------|:------------| +| **ColorModeARGB32**{: #ColorModeARGB32 } | `0` | A colour is a 32-bit ARGB value, 8 bits for each of alpha, red, green and blue. | +| **ColorModeARGB64**{: #ColorModeARGB64 } | `1` | A colour is a 64-bit ARGB value, 16 bits for each of alpha, red, green and blue. | + +## See Also + +- [Enumerations](.) -- all the enumerations of the package diff --git a/docs/Reference/Contributed/GdiPlus/Enumerations/ColorShift.md b/docs/Reference/Contributed/GdiPlus/Enumerations/ColorShift.md new file mode 100644 index 00000000..57d55a88 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Enumerations/ColorShift.md @@ -0,0 +1,24 @@ +--- +title: ColorShift +parent: Enumerations +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Enumerations/ColorShift +--- + +# ColorShift enumeration +{: .no_toc } + +Gives the number of bits to shift an ARGB value right to bring a channel to the lowest byte. + +The values are used with [ColorMask](ColorMask). No public member takes or returns this enumeration. + +| Member | Value | Description | +|:-------|:------|:------------| +| **AlphaShift**{: #AlphaShift } | `24` | The alpha channel is in bits 24 to 31. | +| **RedShift**{: #RedShift } | `16` | The red channel is in bits 16 to 23. | +| **GreenShift**{: #GreenShift } | `8` | The green channel is in bits 8 to 15. | +| **BlueShift**{: #BlueShift } | `0` | The blue channel is in bits 0 to 7. | + +## See Also + +- [Enumerations](.) -- all the enumerations of the package diff --git a/docs/Reference/Contributed/GdiPlus/Enumerations/CurveAdjustments.md b/docs/Reference/Contributed/GdiPlus/Enumerations/CurveAdjustments.md new file mode 100644 index 00000000..97bc44a5 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Enumerations/CurveAdjustments.md @@ -0,0 +1,35 @@ +--- +title: CurveAdjustments +parent: Enumerations +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Enumerations/CurveAdjustments +--- + +# CurveAdjustments enumeration +{: .no_toc } + +Names the eight adjustments of the **ColorCurve** effect. + +The adjustment is the *adjustment* field of a **ColorCurveParams** and the colour channel it works on is the *channel* field, a [CurveChannel](CurveChannel). The *value* says how much to adjust. + +| Member | Value | Description | +|:-------|:------|:------------| +| **AdjustExposure**{: #AdjustExposure } | `0` | Simulates increasing or decreasing the exposure. | +| **AdjustDensity**{: #AdjustDensity } | `1` | Simulates increasing or decreasing the density of film. | +| **AdjustContrast**{: #AdjustContrast } | `2` | Increases or decreases the contrast of the image. | +| **AdjustHighlight**{: #AdjustHighlight } | `3` | Increases or decreases the value of a colour channel that is already above half intensity. This affects the bright areas of the image more than the dark ones. | +| **AdjustShadow**{: #AdjustShadow } | `4` | Increases or decreases the value of a colour channel that is already below half intensity. This affects the dark areas of the image more than the bright ones. | +| **AdjustMidtone**{: #AdjustMidtone } | `5` | Adjusts the middle range of intensities. | +| **AdjustWhiteSaturation**{: #AdjustWhiteSaturation } | `6` | Sets the intensity at which white saturation occurs. | +| **AdjustBlackSaturation**{: #AdjustBlackSaturation } | `7` | Sets the intensity at which black saturation occurs. | + +## Used by + +- [**ColorCurve**](../ColorCurve) class: [constructor](../ColorCurve#creating) +- [**ColorCurveParams**](../Types/ColorCurveParams) type: **adjustment**, the **ColorCurveParams** function + +## See Also + +- [CurveAdjustments](https://learn.microsoft.com/en-us/windows/win32/api/gdipluseffects/ne-gdipluseffects-curveadjustments) -- Microsoft's documentation of the GDI+ enumeration +- [Enumerations](.) -- all the enumerations of the package +- [ColorCurve](../ColorCurve) class diff --git a/docs/Reference/Contributed/GdiPlus/Enumerations/CurveChannel.md b/docs/Reference/Contributed/GdiPlus/Enumerations/CurveChannel.md new file mode 100644 index 00000000..6955fc1f --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Enumerations/CurveChannel.md @@ -0,0 +1,29 @@ +--- +title: CurveChannel +parent: Enumerations +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Enumerations/CurveChannel +--- + +# CurveChannel enumeration +{: .no_toc } + +Specifies which colour channels a **ColorCurve** adjustment affects. + +| Member | Value | Description | +|:-------|:------|:------------| +| **CurveChannelAll**{: #CurveChannelAll } | `0` | The adjustment affects all channels: red, green and blue. | +| **CurveChannelRed**{: #CurveChannelRed } | `1` | The adjustment affects the red channel only. | +| **CurveChannelGreen**{: #CurveChannelGreen } | `2` | The adjustment affects the green channel only. | +| **CurveChannelBlue**{: #CurveChannelBlue } | `3` | The adjustment affects the blue channel only. | + +## Used by + +- [**ColorCurve**](../ColorCurve) class: [constructor](../ColorCurve#creating) +- [**ColorCurveParams**](../Types/ColorCurveParams) type: **channel**, the **ColorCurveParams** function + +## See Also + +- [CurveChannel](https://learn.microsoft.com/en-us/windows/win32/api/gdipluseffects/ne-gdipluseffects-curvechannel) -- Microsoft's documentation of the GDI+ enumeration +- [Enumerations](.) -- all the enumerations of the package +- [ColorCurve](../ColorCurve) class diff --git a/docs/Reference/Contributed/GdiPlus/Enumerations/DitherType.md b/docs/Reference/Contributed/GdiPlus/Enumerations/DitherType.md new file mode 100644 index 00000000..419e9507 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Enumerations/DitherType.md @@ -0,0 +1,37 @@ +--- +title: DitherType +parent: Enumerations +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Enumerations/DitherType +--- + +# DitherType enumeration +{: .no_toc } + +Identifies the algorithms that are available for dithering when a bitmap is converted to another pixel format. + +The ordered and spiral dithers must be used with a fixed palette. Error diffusion can be used with any palette. **DitherTypeMax** is not an algorithm. + +| Member | Value | Description | +|:-------|:------|:------------| +| **DitherTypeNone**{: #DitherTypeNone } | `0` | No dithering. | +| **DitherTypeSolid**{: #DitherTypeSolid } | `1` | A solid colour: the nearest matching colour is picked, with no halftone or dither. It can be used with an arbitrary palette. | +| **DitherTypeOrdered4x4**{: #DitherTypeOrdered4x4 } | `2` | An ordered dither with a 4 by 4 matrix. It is the only ordered dither that can also be used for conversions to 16 bits per pixel. | +| **DitherTypeOrdered8x8**{: #DitherTypeOrdered8x8 } | `3` | An ordered dither with an 8 by 8 matrix. | +| **DitherTypeOrdered16x16**{: #DitherTypeOrdered16x16 } | `4` | An ordered dither with a 16 by 16 matrix. | +| **DitherTypeSpiral4x4**{: #DitherTypeSpiral4x4 } | `5` | A spiral dither with a 4 by 4 matrix. | +| **DitherTypeSpiral8x8**{: #DitherTypeSpiral8x8 } | `6` | A spiral dither with an 8 by 8 matrix. | +| **DitherTypeDualSpiral4x4**{: #DitherTypeDualSpiral4x4 } | `7` | A dual spiral dither with a 4 by 4 matrix. | +| **DitherTypeDualSpiral8x8**{: #DitherTypeDualSpiral8x8 } | `8` | A dual spiral dither with an 8 by 8 matrix. | +| **DitherTypeErrorDiffusion**{: #DitherTypeErrorDiffusion } | `9` | Error diffusion. | +| **DitherTypeMax**{: #DitherTypeMax } | `10` | One more than the highest dither type. It is not an algorithm. | + +## Used by + +- [**Bitmap**](../Bitmap) class: [**ConvertFormat**](../Bitmap#convertformat) + +## See Also + +- [DitherType](https://learn.microsoft.com/en-us/windows/win32/api/gdipluspixelformats/ne-gdipluspixelformats-dithertype) -- Microsoft's documentation of the GDI+ enumeration +- [Enumerations](.) -- all the enumerations of the package +- [Bitmap](../Bitmap) class diff --git a/docs/Reference/Contributed/GdiPlus/Enumerations/FillStyleConstants.md b/docs/Reference/Contributed/GdiPlus/Enumerations/FillStyleConstants.md new file mode 100644 index 00000000..6b24a25e --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Enumerations/FillStyleConstants.md @@ -0,0 +1,27 @@ +--- +title: FillStyleConstants +parent: Enumerations +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Enumerations/FillStyleConstants +--- + +# FillStyleConstants enumeration +{: .no_toc } + +Selects whether the shapes that [**VBGraphics**](../VBGraphics) draws are filled. + +The enumeration is declared inside the **VBGraphics** class. Its members are used without a qualifier, or with the name of the enumeration. The names follow the VB6 constants of the same names. + +| Member | Value | Description | +|:-------|:------|:------------| +| **vbFSSolid**{: #vbFSSolid } | `0` | A box drawn by **Line** and a circle or an ellipse drawn by **Circle** are filled with the **FillColor** of the object. | +| **vbFSTransparent**{: #vbFSTransparent } | `1` | Shapes are not filled. This is the default. | + +## Used by + +- [**VBGraphics**](../VBGraphics) class: [**FillStyle**](../VBGraphics#fillstyle) + +## See Also + +- [Enumerations](.) -- all the enumerations of the package +- [VBGraphics](../VBGraphics) class diff --git a/docs/Reference/Contributed/GdiPlus/Enumerations/GdiplusDebugEventLevel.md b/docs/Reference/Contributed/GdiPlus/Enumerations/GdiplusDebugEventLevel.md new file mode 100644 index 00000000..5dddfb50 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Enumerations/GdiplusDebugEventLevel.md @@ -0,0 +1,27 @@ +--- +title: GdiplusDebugEventLevel +parent: Enumerations +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Enumerations/GdiplusDebugEventLevel +--- + +# GdiplusDebugEventLevel enumeration +{: .no_toc } + +Specifies the severity of a debug event that GDI+ reports to a debug callback. + +The *level* argument of a **DebugEventProc** callback is one of these members. GDI+ calls the callback on debug builds only, for assertions and warnings. The callback is the **DebugEventCallback** field of the [**GdiplusStartupInput**](../Types/GdiplusStartupInput). + +| Member | Value | Description | +|:-------|:------|:------------| +| **DebugEventLevelFatal**{: #DebugEventLevelFatal } | `0` | A fatal event. The assertion has failed. | +| **DebugEventLevelWarning**{: #DebugEventLevelWarning } | `1` | A warning. | + +## Used by + +- the *level* argument of the **DebugEventProc** callback + +## See Also + +- [GdiplusDebugEventLevel](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusinit/ne-gdiplusinit-debugeventlevel) -- Microsoft's documentation of the GDI+ enumeration +- [Enumerations](.) -- all the enumerations of the package diff --git a/docs/Reference/Contributed/GdiPlus/Enumerations/GdiplusStartupParams.md b/docs/Reference/Contributed/GdiPlus/Enumerations/GdiplusStartupParams.md new file mode 100644 index 00000000..14c550e3 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Enumerations/GdiplusStartupParams.md @@ -0,0 +1,39 @@ +--- +title: GdiplusStartupParams +parent: Enumerations +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Enumerations/GdiplusStartupParams +--- + +# GdiplusStartupParams enumeration +{: .no_toc } + +Specifies options for the start-up of GDI+. + +GDI+ version 1 ignores these values. They apply when the **GdiplusVersion** of the [**GdiplusStartupInput**](../Types/GdiplusStartupInput) is 2 or higher. The default input of the **GdiPlusUser** constructor function uses **GdiplusStartupDefault**. + +> [!NOTE] 0.9.45.0 +> **GdiplusStartupReserved1** and **GdiplusStartupReserved2** have the values 5 and 6, because the package gives no value to them and they follow **GdiplusStartupReserved0**. They are not single bits. + +The members combine with **Or**. + +| Member | Value | Description | +|:-------|:------|:------------| +| **GdiplusStartupDefault**{: #GdiplusStartupDefault } | `0` | The default behaviour. | +| **GdiplusStartupNoSetRound**{: #GdiplusStartupNoSetRound } | `1` | No set round for start-up. Microsoft gives no further description. | +| **GdiplusStartupSetPSValue**{: #GdiplusStartupSetPSValue } | `2` | A pixel shader value for start-up. Microsoft gives no further description. | +| **GdiplusStartupReserved0**{: #GdiplusStartupReserved0 } | `4` | Reserved. | +| **GdiplusStartupReserved1**{: #GdiplusStartupReserved1 } | `5` | Reserved. | +| **GdiplusStartupReserved2**{: #GdiplusStartupReserved2 } | `6` | Reserved. | +| **GdiplusStartupTransparencyMask**{: #GdiplusStartupTransparencyMask } | `&HFF00_0000` | A transparency mask for start-up: the highest byte. | + +## Used by + +- [**GdiplusStartupInput**](../Types/GdiplusStartupInput) type: **StartupParameters** +- [**GdiPlusUser**](../GdiPlusUser) class: [constructor](../GdiPlusUser#creating) + +## See Also + +- [GdiplusStartupParams](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusinit/ne-gdiplusinit-gdiplusstartupparams) -- Microsoft's documentation of the GDI+ enumeration +- [Enumerations](.) -- all the enumerations of the package +- [GdiPlusUser](../GdiPlusUser) class diff --git a/docs/Reference/Contributed/GdiPlus/Enumerations/GpBrushType.md b/docs/Reference/Contributed/GdiPlus/Enumerations/GpBrushType.md new file mode 100644 index 00000000..d7bcf3d7 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Enumerations/GpBrushType.md @@ -0,0 +1,37 @@ +--- +title: GpBrushType +parent: Enumerations +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Enumerations/GpBrushType +--- + +# GpBrushType enumeration +{: .no_toc } + +Names the kind of fill that a brush produces. + +| Member | Value | Description | +|:-------|:------|:------------| +| **BrushTypeSolidColor**{: #BrushTypeSolidColor } | `0` | A solid colour fill. | +| **BrushTypeHatchFill**{: #BrushTypeHatchFill } | `1` | A hatch fill. | +| **BrushTypeTextureFill**{: #BrushTypeTextureFill } | `2` | A fill made of tiles of an image. | +| **BrushTypePathGradient**{: #BrushTypePathGradient } | `3` | A gradient that follows the shape of a path. | +| **BrushTypeLinearGradient**{: #BrushTypeLinearGradient } | `4` | A linear gradient. | + +## Used by + +- [**HatchBrush**](../HatchBrush) class: [**Type**](../HatchBrush#type) +- [**IBrush**](../IBrush) interface: [**Type**](../IBrush#type) +- [**LinearGradientBrush**](../LinearGradientBrush) class: [**Type**](../LinearGradientBrush#type) +- [**PathGradientBrush**](../PathGradientBrush) class: [**Type**](../PathGradientBrush#type) +- [**SolidBrush**](../SolidBrush) class: [**Type**](../SolidBrush#type) +- [**TextureBrush**](../TextureBrush) class: [**Type**](../TextureBrush#type) + +## See Also + +- [BrushType](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusenums/ne-gdiplusenums-brushtype) -- Microsoft's documentation of the GDI+ enumeration +- [Enumerations](.) -- all the enumerations of the package +- [HatchBrush](../HatchBrush) class +- [IBrush](../IBrush) interface +- [LinearGradientBrush](../LinearGradientBrush) class +- [PathGradientBrush](../PathGradientBrush) class diff --git a/docs/Reference/Contributed/GdiPlus/Enumerations/GpCombineMode.md b/docs/Reference/Contributed/GdiPlus/Enumerations/GpCombineMode.md new file mode 100644 index 00000000..a0cceeec --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Enumerations/GpCombineMode.md @@ -0,0 +1,30 @@ +--- +title: GpCombineMode +parent: Enumerations +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Enumerations/GpCombineMode +--- + +# GpCombineMode enumeration +{: .no_toc } + +Selects how a new region or clip shape is combined with an existing one. + +| Member | Value | Description | +|:-------|:------|:------------| +| **CombineModeReplace**{: #CombineModeReplace } | `0` | The existing region is replaced by the new one. | +| **CombineModeIntersect**{: #CombineModeIntersect } | `1` | The result is the area that the existing and the new region have in common. | +| **CombineModeUnion**{: #CombineModeUnion } | `2` | The result is every area that is in either region. | +| **CombineModeXor**{: #CombineModeXor } | `3` | The result is the areas that are in exactly one of the two regions. | +| **CombineModeExclude**{: #CombineModeExclude } | `4` | The result is the existing region without the area that it shares with the new region. | +| **CombineModeComplement**{: #CombineModeComplement } | `5` | The result is the new region without the area that it shares with the existing region. | + +## Used by + +- [**Graphics**](../Graphics) class: [**SetClip**](../Graphics#setclip) + +## See Also + +- [CombineMode](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusenums/ne-gdiplusenums-combinemode) -- Microsoft's documentation of the GDI+ enumeration +- [Enumerations](.) -- all the enumerations of the package +- [Graphics](../Graphics) class diff --git a/docs/Reference/Contributed/GdiPlus/Enumerations/GpCompositingMode.md b/docs/Reference/Contributed/GdiPlus/Enumerations/GpCompositingMode.md new file mode 100644 index 00000000..54bf6a45 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Enumerations/GpCompositingMode.md @@ -0,0 +1,31 @@ +--- +title: GpCompositingMode +parent: Enumerations +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Enumerations/GpCompositingMode +--- + +# GpCompositingMode enumeration +{: .no_toc } + +Selects how a drawn colour is combined with the colour already on the surface. + +The setting is the **CompositingMode** property of [**Graphics**](../Graphics). It matters only for colours that are not fully opaque. + +> [!NOTE] timeless +> Text drawn with [**TextRenderingHintClearTypeGridFit**](GpTextRenderingHint) cannot be combined with **CompositingModeSourceCopy**. This is a limit of GDI+. + +| Member | Value | Description | +|:-------|:------|:------------| +| **CompositingModeSourceOver**{: #CompositingModeSourceOver } | `0` | The drawn colour is blended with the background according to its alpha value. | +| **CompositingModeSourceCopy**{: #CompositingModeSourceCopy } | `1` | The drawn colour replaces the background colour, alpha value included. | + +## Used by + +- [**Graphics**](../Graphics) class: [**CompositingMode**](../Graphics#compositingmode) + +## See Also + +- [CompositingMode](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusenums/ne-gdiplusenums-compositingmode) -- Microsoft's documentation of the GDI+ enumeration +- [Enumerations](.) -- all the enumerations of the package +- [Graphics](../Graphics) class diff --git a/docs/Reference/Contributed/GdiPlus/Enumerations/GpCompositingQuality.md b/docs/Reference/Contributed/GdiPlus/Enumerations/GpCompositingQuality.md new file mode 100644 index 00000000..83af6119 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Enumerations/GpCompositingQuality.md @@ -0,0 +1,32 @@ +--- +title: GpCompositingQuality +parent: Enumerations +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Enumerations/GpCompositingQuality +--- + +# GpCompositingQuality enumeration +{: .no_toc } + +Selects whether gamma correction is applied when colours are blended with the background. + +Without gamma correction the colours are assumed to be in a linear colour space (gamma 1.0) and are blended as they are. With it they are assumed to be sRGB (gamma 2.2): GDI+ converts them to a linear space, blends them, and converts the result back. The blend is more accurate and takes more time. The first four members have the values of [GpQualityMode](GpQualityMode). + +| Member | Value | Description | +|:-------|:------|:------------| +| **CompositingQualityInvalid**{: #CompositingQualityInvalid } | `-1` | Not a valid setting. GDI+ uses it internally. | +| **CompositingQualityDefault**{: #CompositingQualityDefault } | `0` | Gamma correction is not applied. | +| **CompositingQualityHighSpeed**{: #CompositingQualityHighSpeed } | `1` | Gamma correction is not applied. | +| **CompositingQualityHighQuality**{: #CompositingQualityHighQuality } | `2` | Gamma correction is applied. | +| **CompositingQualityGammaCorrected**{: #CompositingQualityGammaCorrected } | `3` | Gamma correction is applied. | +| **CompositingQualityAssumeLinear**{: #CompositingQualityAssumeLinear } | `4` | Gamma correction is not applied. | + +## Used by + +- [**Graphics**](../Graphics) class: [**CompositingQuality**](../Graphics#compositingquality) + +## See Also + +- [CompositingQuality](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusenums/ne-gdiplusenums-compositingquality) -- Microsoft's documentation of the GDI+ enumeration +- [Enumerations](.) -- all the enumerations of the package +- [Graphics](../Graphics) class diff --git a/docs/Reference/Contributed/GdiPlus/Enumerations/GpConvertToEmfPlusFlags.md b/docs/Reference/Contributed/GdiPlus/Enumerations/GpConvertToEmfPlusFlags.md new file mode 100644 index 00000000..7d6288d1 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Enumerations/GpConvertToEmfPlusFlags.md @@ -0,0 +1,24 @@ +--- +title: GpConvertToEmfPlusFlags +parent: Enumerations +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Enumerations/GpConvertToEmfPlusFlags +--- + +# GpConvertToEmfPlusFlags enumeration +{: .no_toc } + +Reports what happened to records during the conversion of a metafile to the EMF+ format. + +The members combine with **Or**. They describe the outcome of **Metafile.ConvertToEmfPlus**. No public member takes or returns this enumeration. + +| Member | Value | Description | +|:-------|:------|:------------| +| **ConvertToEmfPlusFlagsDefault**{: #ConvertToEmfPlusFlagsDefault } | `&H00000000` | The conversion met nothing special. | +| **ConvertToEmfPlusFlagsRopUsed**{: #ConvertToEmfPlusFlagsRopUsed } | `&H00000001` | A raster operation could not be converted. | +| **ConvertToEmfPlusFlagsText**{: #ConvertToEmfPlusFlagsText } | `&H00000002` | Text records were converted. | +| **ConvertToEmfPlusFlagsInvalidRecord**{: #ConvertToEmfPlusFlagsInvalidRecord } | `&H00000004` | A record was not valid and was not converted. | + +## See Also + +- [Enumerations](.) -- all the enumerations of the package diff --git a/docs/Reference/Contributed/GdiPlus/Enumerations/GpCoordinateSpace.md b/docs/Reference/Contributed/GdiPlus/Enumerations/GpCoordinateSpace.md new file mode 100644 index 00000000..a4958cc1 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Enumerations/GpCoordinateSpace.md @@ -0,0 +1,29 @@ +--- +title: GpCoordinateSpace +parent: Enumerations +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Enumerations/GpCoordinateSpace +--- + +# GpCoordinateSpace enumeration +{: .no_toc } + +Names the three coordinate spaces that GDI+ converts between. + +Drawing calls give their points in world coordinates. The world transformation turns them into page coordinates, and the page unit and page scale turn those into device coordinates, which are pixels on the surface. + +| Member | Value | Description | +|:-------|:------|:------------| +| **CoordinateSpaceWorld**{: #CoordinateSpaceWorld } | `0` | World coordinates, the coordinates that drawing calls use. | +| **CoordinateSpacePage**{: #CoordinateSpacePage } | `1` | Page coordinates, the result of the world transformation. | +| **CoordinateSpaceDevice**{: #CoordinateSpaceDevice } | `2` | Device coordinates, in the units of the surface. | + +## Used by + +- [**Graphics**](../Graphics) class: [**TransformPoints**](../Graphics#transformpoints) + +## See Also + +- [CoordinateSpace](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusenums/ne-gdiplusenums-coordinatespace) -- Microsoft's documentation of the GDI+ enumeration +- [Enumerations](.) -- all the enumerations of the package +- [Graphics](../Graphics) class diff --git a/docs/Reference/Contributed/GdiPlus/Enumerations/GpCustomLineCapType.md b/docs/Reference/Contributed/GdiPlus/Enumerations/GpCustomLineCapType.md new file mode 100644 index 00000000..64a11dd8 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Enumerations/GpCustomLineCapType.md @@ -0,0 +1,22 @@ +--- +title: GpCustomLineCapType +parent: Enumerations +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Enumerations/GpCustomLineCapType +--- + +# GpCustomLineCapType enumeration +{: .no_toc } + +Tells whether a custom line cap is built from paths or is an adjustable arrow. + +The package reads this value from GDI+ to decide which class wraps a cap, [**CustomLineCap**](../CustomLineCap) or [**ArrowCap**](../ArrowCap). No public member takes or returns it. + +| Member | Value | Description | +|:-------|:------|:------------| +| **CustomLineCapTypeDefault**{: #CustomLineCapTypeDefault } | `0` | A cap built from a fill path or a stroke path. | +| **CustomLineCapTypeAdjustableArrow**{: #CustomLineCapTypeAdjustableArrow } | `1` | An adjustable arrow cap. | + +## See Also + +- [Enumerations](.) -- all the enumerations of the package diff --git a/docs/Reference/Contributed/GdiPlus/Enumerations/GpDashCap.md b/docs/Reference/Contributed/GdiPlus/Enumerations/GpDashCap.md new file mode 100644 index 00000000..40a17c81 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Enumerations/GpDashCap.md @@ -0,0 +1,29 @@ +--- +title: GpDashCap +parent: Enumerations +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Enumerations/GpDashCap +--- + +# GpDashCap enumeration +{: .no_toc } + +Selects the shape at both ends of each dash of a dashed line. + +The enumeration has fewer members than [GpLineCap](GpLineCap), whose **Flat**, **Round** and **Triangle** members it repeats with the same values. The package declares the dash cap of a pen as a **GpLineCap**; the *dashCap* argument of **Pen.SetLineCap** is the one place that takes this enumeration. + +| Member | Value | Description | +|:-------|:------|:------------| +| **DashCapFlat**{: #DashCapFlat } | `0` | A square end that stops at the end of the dash. | +| **DashCapRound**{: #DashCapRound } | `2` | A rounded end. | +| **DashCapTriangle**{: #DashCapTriangle } | `3` | A triangular end. | + +## Used by + +- [**Pen**](../Pen) class: [**SetLineCap**](../Pen#setlinecap) + +## See Also + +- [DashCap](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusenums/ne-gdiplusenums-dashcap) -- Microsoft's documentation of the GDI+ enumeration +- [Enumerations](.) -- all the enumerations of the package +- [Pen](../Pen) class diff --git a/docs/Reference/Contributed/GdiPlus/Enumerations/GpDashStyle.md b/docs/Reference/Contributed/GdiPlus/Enumerations/GpDashStyle.md new file mode 100644 index 00000000..4afca306 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Enumerations/GpDashStyle.md @@ -0,0 +1,55 @@ +--- +title: GpDashStyle +parent: Enumerations +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Enumerations/GpDashStyle +--- + +# GpDashStyle enumeration +{: .no_toc } + +Selects the line style of a pen: solid, one of four predefined dash patterns, or a custom pattern. + +The lengths in a predefined pattern are multiples of the pen width. Setting **DashStyle** on a pen replaces its dash pattern with the predefined one, and setting the **DashPattern** of a pen changes its style to **DashStyleCustom**. + +| Member | Value | Description | +|:-------|:------|:------------| +| **DashStyleSolid**{: #DashStyleSolid } | `0` | A solid line. | +| **DashStyleDash**{: #DashStyleDash } | `1` | A line of dashes. | +| **DashStyleDot**{: #DashStyleDot } | `2` | A line of dots. | +| **DashStyleDashDot**{: #DashStyleDashDot } | `3` | A line that alternates a dash and a dot. | +| **DashStyleDashDotDot**{: #DashStyleDashDotDot } | `4` | A line that alternates a dash and two dots. | +| **DashStyleCustom**{: #DashStyleCustom } | `5` | A user-defined pattern, set with the **DashPattern** property of the pen. | + +## Used by + +- [**Pen**](../Pen) class: [**DashStyle**](../Pen#dashstyle) + +## Example + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim p As Pen = Pen(Color(CColor.Red), 1) +Debug.Print p.DashStyle = DashStyleSolid +Debug.Print p.DashPatternCount + +p.DashStyle = DashStyleDash +Debug.Print p.DashPatternCount + +Dim pattern(1) As Single +pattern(0) = 2 +pattern(1) = 1 +p.DashPattern = pattern +Debug.Print p.DashStyle = DashStyleCustom +' Output: +' True +' 0 +' 2 +' True +``` + +## See Also + +- [DashStyle](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusenums/ne-gdiplusenums-dashstyle) -- Microsoft's documentation of the GDI+ enumeration +- [Enumerations](.) -- all the enumerations of the package +- [Pen](../Pen) class diff --git a/docs/Reference/Contributed/GdiPlus/Enumerations/GpDriverStringOptions.md b/docs/Reference/Contributed/GdiPlus/Enumerations/GpDriverStringOptions.md new file mode 100644 index 00000000..75aa9d94 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Enumerations/GpDriverStringOptions.md @@ -0,0 +1,30 @@ +--- +title: GpDriverStringOptions +parent: Enumerations +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Enumerations/GpDriverStringOptions +--- + +# GpDriverStringOptions enumeration +{: .no_toc } + +Specifies the spacing, orientation and quality of the rendering of driver strings. + +A driver string is an array of glyph indexes or Unicode values that **Graphics.DrawDriverString** draws at positions the caller gives. The members combine with **Or**. + +| Member | Value | Description | +|:-------|:------|:------------| +| **DriverStringOptionsCmapLookup**{: #DriverStringOptionsCmapLookup } | `1` | The array holds Unicode character values. When the flag is not set, each value is an index of a glyph in the font. | +| **DriverStringOptionsVertical**{: #DriverStringOptionsVertical } | `2` | The string is displayed vertically. | +| **DriverStringOptionsRealizedAdvance**{: #DriverStringOptionsRealizedAdvance } | `4` | The positions of the glyphs are calculated from the position of the first glyph. When the flag is not set, they come from an array of coordinates. | +| **DriverStringOptionsLimitSubpixel**{: #DriverStringOptionsLimitSubpixel } | `8` | Less memory is used for the cache of antialiased glyphs, which also lowers the quality. When the flag is not set, more memory is used and the quality is higher. | + +## Used by + +- [**Graphics**](../Graphics) class: [**DrawDriverString**](../Graphics#drawdriverstring), [**MeasureDriverString**](../Graphics#measuredriverstring) + +## See Also + +- [DriverStringOptions](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusenums/ne-gdiplusenums-driverstringoptions) -- Microsoft's documentation of the GDI+ enumeration +- [Enumerations](.) -- all the enumerations of the package +- [Graphics](../Graphics) class diff --git a/docs/Reference/Contributed/GdiPlus/Enumerations/GpEMR.md b/docs/Reference/Contributed/GdiPlus/Enumerations/GpEMR.md new file mode 100644 index 00000000..1940febd --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Enumerations/GpEMR.md @@ -0,0 +1,145 @@ +--- +title: GpEMR +parent: Enumerations +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Enumerations/GpEMR +--- + +# GpEMR enumeration +{: .no_toc } + +Gives the numbers of the record types of an enhanced metafile (EMF), the **EMR_** constants of the Windows header files. + +Each record of an enhanced metafile begins with one of these numbers. Most records store one GDI call, and the name of the member says which: **EMR_POLYGON** stores a **Polygon** call. Members from **EMR_SETICMMODE** on exist from Windows 95 and Windows NT 4.0, and from **EMR_RESERVED_105** on from Windows 2000. Several numbers are reserved or not used. **EMR_MIN** and **EMR_MAX** are the lowest and the highest valid numbers. [GpEmfPlusRecordType](GpEmfPlusRecordType) repeats these numbers as its **EmfRecordType** members. + +| Member | Value | +|:-------|:------| +| **EMR_HEADER**{: #EMR_HEADER } | `1` | +| **EMR_POLYBEZIER**{: #EMR_POLYBEZIER } | `2` | +| **EMR_POLYGON**{: #EMR_POLYGON } | `3` | +| **EMR_POLYLINE**{: #EMR_POLYLINE } | `4` | +| **EMR_POLYBEZIERTO**{: #EMR_POLYBEZIERTO } | `5` | +| **EMR_POLYLINETO**{: #EMR_POLYLINETO } | `6` | +| **EMR_POLYPOLYLINE**{: #EMR_POLYPOLYLINE } | `7` | +| **EMR_POLYPOLYGON**{: #EMR_POLYPOLYGON } | `8` | +| **EMR_SETWINDOWEXTEX**{: #EMR_SETWINDOWEXTEX } | `9` | +| **EMR_SETWINDOWORGEX**{: #EMR_SETWINDOWORGEX } | `10` | +| **EMR_SETVIEWPORTEXTEX**{: #EMR_SETVIEWPORTEXTEX } | `11` | +| **EMR_SETVIEWPORTORGEX**{: #EMR_SETVIEWPORTORGEX } | `12` | +| **EMR_SETBRUSHORGEX**{: #EMR_SETBRUSHORGEX } | `13` | +| **EMR_EOF**{: #EMR_EOF } | `14` | +| **EMR_SETPIXELV**{: #EMR_SETPIXELV } | `15` | +| **EMR_SETMAPPERFLAGS**{: #EMR_SETMAPPERFLAGS } | `16` | +| **EMR_SETMAPMODE**{: #EMR_SETMAPMODE } | `17` | +| **EMR_SETBKMODE**{: #EMR_SETBKMODE } | `18` | +| **EMR_SETPOLYFILLMODE**{: #EMR_SETPOLYFILLMODE } | `19` | +| **EMR_SETROP2**{: #EMR_SETROP2 } | `20` | +| **EMR_SETSTRETCHBLTMODE**{: #EMR_SETSTRETCHBLTMODE } | `21` | +| **EMR_SETTEXTALIGN**{: #EMR_SETTEXTALIGN } | `22` | +| **EMR_SETCOLORADJUSTMENT**{: #EMR_SETCOLORADJUSTMENT } | `23` | +| **EMR_SETTEXTCOLOR**{: #EMR_SETTEXTCOLOR } | `24` | +| **EMR_SETBKCOLOR**{: #EMR_SETBKCOLOR } | `25` | +| **EMR_OFFSETCLIPRGN**{: #EMR_OFFSETCLIPRGN } | `26` | +| **EMR_MOVETOEX**{: #EMR_MOVETOEX } | `27` | +| **EMR_SETMETARGN**{: #EMR_SETMETARGN } | `28` | +| **EMR_EXCLUDECLIPRECT**{: #EMR_EXCLUDECLIPRECT } | `29` | +| **EMR_INTERSECTCLIPRECT**{: #EMR_INTERSECTCLIPRECT } | `30` | +| **EMR_SCALEVIEWPORTEXTEX**{: #EMR_SCALEVIEWPORTEXTEX } | `31` | +| **EMR_SCALEWINDOWEXTEX**{: #EMR_SCALEWINDOWEXTEX } | `32` | +| **EMR_SAVEDC**{: #EMR_SAVEDC } | `33` | +| **EMR_RESTOREDC**{: #EMR_RESTOREDC } | `34` | +| **EMR_SETWORLDTRANSFORM**{: #EMR_SETWORLDTRANSFORM } | `35` | +| **EMR_MODIFYWORLDTRANSFORM**{: #EMR_MODIFYWORLDTRANSFORM } | `36` | +| **EMR_SELECTOBJECT**{: #EMR_SELECTOBJECT } | `37` | +| **EMR_CREATEPEN**{: #EMR_CREATEPEN } | `38` | +| **EMR_CREATEBRUSHINDIRECT**{: #EMR_CREATEBRUSHINDIRECT } | `39` | +| **EMR_DELETEOBJECT**{: #EMR_DELETEOBJECT } | `40` | +| **EMR_ANGLEARC**{: #EMR_ANGLEARC } | `41` | +| **EMR_ELLIPSE**{: #EMR_ELLIPSE } | `42` | +| **EMR_RECTANGLE**{: #EMR_RECTANGLE } | `43` | +| **EMR_ROUNDRECT**{: #EMR_ROUNDRECT } | `44` | +| **EMR_ARC**{: #EMR_ARC } | `45` | +| **EMR_CHORD**{: #EMR_CHORD } | `46` | +| **EMR_PIE**{: #EMR_PIE } | `47` | +| **EMR_SELECTPALETTE**{: #EMR_SELECTPALETTE } | `48` | +| **EMR_CREATEPALETTE**{: #EMR_CREATEPALETTE } | `49` | +| **EMR_SETPALETTEENTRIES**{: #EMR_SETPALETTEENTRIES } | `50` | +| **EMR_RESIZEPALETTE**{: #EMR_RESIZEPALETTE } | `51` | +| **EMR_REALIZEPALETTE**{: #EMR_REALIZEPALETTE } | `52` | +| **EMR_EXTFLOODFILL**{: #EMR_EXTFLOODFILL } | `53` | +| **EMR_LINETO**{: #EMR_LINETO } | `54` | +| **EMR_ARCTO**{: #EMR_ARCTO } | `55` | +| **EMR_POLYDRAW**{: #EMR_POLYDRAW } | `56` | +| **EMR_SETARCDIRECTION**{: #EMR_SETARCDIRECTION } | `57` | +| **EMR_SETMITERLIMIT**{: #EMR_SETMITERLIMIT } | `58` | +| **EMR_BEGINPATH**{: #EMR_BEGINPATH } | `59` | +| **EMR_ENDPATH**{: #EMR_ENDPATH } | `60` | +| **EMR_CLOSEFIGURE**{: #EMR_CLOSEFIGURE } | `61` | +| **EMR_FILLPATH**{: #EMR_FILLPATH } | `62` | +| **EMR_STROKEANDFILLPATH**{: #EMR_STROKEANDFILLPATH } | `63` | +| **EMR_STROKEPATH**{: #EMR_STROKEPATH } | `64` | +| **EMR_FLATTENPATH**{: #EMR_FLATTENPATH } | `65` | +| **EMR_WIDENPATH**{: #EMR_WIDENPATH } | `66` | +| **EMR_SELECTCLIPPATH**{: #EMR_SELECTCLIPPATH } | `67` | +| **EMR_ABORTPATH**{: #EMR_ABORTPATH } | `68` | +| **EMR_GDICOMMENT**{: #EMR_GDICOMMENT } | `70` | +| **EMR_FILLRGN**{: #EMR_FILLRGN } | `71` | +| **EMR_FRAMERGN**{: #EMR_FRAMERGN } | `72` | +| **EMR_INVERTRGN**{: #EMR_INVERTRGN } | `73` | +| **EMR_PAINTRGN**{: #EMR_PAINTRGN } | `74` | +| **EMR_EXTSELECTCLIPRGN**{: #EMR_EXTSELECTCLIPRGN } | `75` | +| **EMR_BITBLT**{: #EMR_BITBLT } | `76` | +| **EMR_STRETCHBLT**{: #EMR_STRETCHBLT } | `77` | +| **EMR_MASKBLT**{: #EMR_MASKBLT } | `78` | +| **EMR_PLGBLT**{: #EMR_PLGBLT } | `79` | +| **EMR_SETDIBITSTODEVICE**{: #EMR_SETDIBITSTODEVICE } | `80` | +| **EMR_STRETCHDIBITS**{: #EMR_STRETCHDIBITS } | `81` | +| **EMR_EXTCREATEFONTINDIRECTW**{: #EMR_EXTCREATEFONTINDIRECTW } | `82` | +| **EMR_EXTTEXTOUTA**{: #EMR_EXTTEXTOUTA } | `83` | +| **EMR_EXTTEXTOUTW**{: #EMR_EXTTEXTOUTW } | `84` | +| **EMR_POLYBEZIER16**{: #EMR_POLYBEZIER16 } | `85` | +| **EMR_POLYGON16**{: #EMR_POLYGON16 } | `86` | +| **EMR_POLYLINE16**{: #EMR_POLYLINE16 } | `87` | +| **EMR_POLYBEZIERTO16**{: #EMR_POLYBEZIERTO16 } | `88` | +| **EMR_POLYLINETO16**{: #EMR_POLYLINETO16 } | `89` | +| **EMR_POLYPOLYLINE16**{: #EMR_POLYPOLYLINE16 } | `90` | +| **EMR_POLYPOLYGON16**{: #EMR_POLYPOLYGON16 } | `91` | +| **EMR_POLYDRAW16**{: #EMR_POLYDRAW16 } | `92` | +| **EMR_CREATEMONOBRUSH**{: #EMR_CREATEMONOBRUSH } | `93` | +| **EMR_CREATEDIBPATTERNBRUSHPT**{: #EMR_CREATEDIBPATTERNBRUSHPT } | `94` | +| **EMR_EXTCREATEPEN**{: #EMR_EXTCREATEPEN } | `95` | +| **EMR_POLYTEXTOUTA**{: #EMR_POLYTEXTOUTA } | `96` | +| **EMR_POLYTEXTOUTW**{: #EMR_POLYTEXTOUTW } | `97` | +| **EMR_SETICMMODE**{: #EMR_SETICMMODE } | `98` | +| **EMR_CREATECOLORSPACE**{: #EMR_CREATECOLORSPACE } | `99` | +| **EMR_SETCOLORSPACE**{: #EMR_SETCOLORSPACE } | `100` | +| **EMR_DELETECOLORSPACE**{: #EMR_DELETECOLORSPACE } | `101` | +| **EMR_GLSRECORD**{: #EMR_GLSRECORD } | `102` | +| **EMR_GLSBOUNDEDRECORD**{: #EMR_GLSBOUNDEDRECORD } | `103` | +| **EMR_PIXELFORMAT**{: #EMR_PIXELFORMAT } | `104` | +| **EMR_RESERVED_105**{: #EMR_RESERVED_105 } | `105` | +| **EMR_RESERVED_106**{: #EMR_RESERVED_106 } | `106` | +| **EMR_RESERVED_107**{: #EMR_RESERVED_107 } | `107` | +| **EMR_RESERVED_108**{: #EMR_RESERVED_108 } | `108` | +| **EMR_RESERVED_109**{: #EMR_RESERVED_109 } | `109` | +| **EMR_RESERVED_110**{: #EMR_RESERVED_110 } | `110` | +| **EMR_COLORCORRECTPALETTE**{: #EMR_COLORCORRECTPALETTE } | `111` | +| **EMR_SETICMPROFILEA**{: #EMR_SETICMPROFILEA } | `112` | +| **EMR_SETICMPROFILEW**{: #EMR_SETICMPROFILEW } | `113` | +| **EMR_ALPHABLEND**{: #EMR_ALPHABLEND } | `114` | +| **EMR_SETLAYOUT**{: #EMR_SETLAYOUT } | `115` | +| **EMR_TRANSPARENTBLT**{: #EMR_TRANSPARENTBLT } | `116` | +| **EMR_RESERVED_117**{: #EMR_RESERVED_117 } | `117` | +| **EMR_GRADIENTFILL**{: #EMR_GRADIENTFILL } | `118` | +| **EMR_RESERVED_119**{: #EMR_RESERVED_119 } | `119` | +| **EMR_RESERVED_120**{: #EMR_RESERVED_120 } | `120` | +| **EMR_COLORMATCHTOTARGETW**{: #EMR_COLORMATCHTOTARGETW } | `121` | +| **EMR_CREATECOLORSPACEW**{: #EMR_CREATECOLORSPACEW } | `122` | +| **EMR_MIN**{: #EMR_MIN } | `1` | +| **EMR_MAX**{: #EMR_MAX } | `122` | + +No public member of the package takes or returns this enumeration. + +## See Also + +- [Enumerations](.) -- all the enumerations of the package diff --git a/docs/Reference/Contributed/GdiPlus/Enumerations/GpEmfPlusRecordType.md b/docs/Reference/Contributed/GdiPlus/Enumerations/GpEmfPlusRecordType.md new file mode 100644 index 00000000..c51f6233 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Enumerations/GpEmfPlusRecordType.md @@ -0,0 +1,313 @@ +--- +title: GpEmfPlusRecordType +parent: Enumerations +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Enumerations/GpEmfPlusRecordType +--- + +# GpEmfPlusRecordType enumeration +{: .no_toc } + +Identifies the record types of Windows metafiles (WMF), enhanced metafiles (EMF) and EMF+ files. + +The members come in three groups, each in its own table below. A record of the first two groups can be displayed by GDI and by GDI+. A record of the third group can be displayed by GDI+ only. [**Metafile.PlayRecord**](../Metafile) and the **EnumerateMetafileProc** callback of **Graphics.EnumerateMetafile** use the enumeration. + +## WMF records +{: .no_toc } + +Each member is a function number of a Windows metafile ([GpMetafileFunctions](GpMetafileFunctions)) combined with `&H10000`, so that it does not collide with the numbers of the other groups. + +| Member | Value | Function | +|:-------|:------|:------------| +| **WmfRecordTypeSetBkColor**{: #WmfRecordTypeSetBkColor } | `&H10201` | **META_SETBKCOLOR** | +| **WmfRecordTypeSetBkMode**{: #WmfRecordTypeSetBkMode } | `&H10102` | **META_SETBKMODE** | +| **WmfRecordTypeSetMapMode**{: #WmfRecordTypeSetMapMode } | `&H10103` | **META_SETMAPMODE** | +| **WmfRecordTypeSetROP2**{: #WmfRecordTypeSetROP2 } | `&H10104` | **META_SETROP2** | +| **WmfRecordTypeSetRelAbs**{: #WmfRecordTypeSetRelAbs } | `&H10105` | **META_SETRELABS** | +| **WmfRecordTypeSetPolyFillMode**{: #WmfRecordTypeSetPolyFillMode } | `&H10106` | **META_SETPOLYFILLMODE** | +| **WmfRecordTypeSetStretchBltMode**{: #WmfRecordTypeSetStretchBltMode } | `&H10107` | **META_SETSTRETCHBLTMODE** | +| **WmfRecordTypeSetTextCharExtra**{: #WmfRecordTypeSetTextCharExtra } | `&H10108` | **META_SETTEXTCHAREXTRA** | +| **WmfRecordTypeSetTextColor**{: #WmfRecordTypeSetTextColor } | `&H10209` | **META_SETTEXTCOLOR** | +| **WmfRecordTypeSetTextJustification**{: #WmfRecordTypeSetTextJustification } | `&H1020A` | **META_SETTEXTJUSTIFICATION** | +| **WmfRecordTypeSetWindowOrg**{: #WmfRecordTypeSetWindowOrg } | `&H1020B` | **META_SETWINDOWORG** | +| **WmfRecordTypeSetWindowExt**{: #WmfRecordTypeSetWindowExt } | `&H1020C` | **META_SETWINDOWEXT** | +| **WmfRecordTypeSetViewportOrg**{: #WmfRecordTypeSetViewportOrg } | `&H1020D` | **META_SETVIEWPORTORG** | +| **WmfRecordTypeSetViewportExt**{: #WmfRecordTypeSetViewportExt } | `&H1020E` | **META_SETVIEWPORTEXT** | +| **WmfRecordTypeOffsetWindowOrg**{: #WmfRecordTypeOffsetWindowOrg } | `&H1020F` | **META_OFFSETWINDOWORG** | +| **WmfRecordTypeScaleWindowExt**{: #WmfRecordTypeScaleWindowExt } | `&H10410` | **META_SCALEWINDOWEXT** | +| **WmfRecordTypeOffsetViewportOrg**{: #WmfRecordTypeOffsetViewportOrg } | `&H10211` | **META_OFFSETVIEWPORTORG** | +| **WmfRecordTypeScaleViewportExt**{: #WmfRecordTypeScaleViewportExt } | `&H10412` | **META_SCALEVIEWPORTEXT** | +| **WmfRecordTypeLineTo**{: #WmfRecordTypeLineTo } | `&H10213` | **META_LINETO** | +| **WmfRecordTypeMoveTo**{: #WmfRecordTypeMoveTo } | `&H10214` | **META_MOVETO** | +| **WmfRecordTypeExcludeClipRect**{: #WmfRecordTypeExcludeClipRect } | `&H10415` | **META_EXCLUDECLIPRECT** | +| **WmfRecordTypeIntersectClipRect**{: #WmfRecordTypeIntersectClipRect } | `&H10416` | **META_INTERSECTCLIPRECT** | +| **WmfRecordTypeArc**{: #WmfRecordTypeArc } | `&H10817` | **META_ARC** | +| **WmfRecordTypeEllipse**{: #WmfRecordTypeEllipse } | `&H10418` | **META_ELLIPSE** | +| **WmfRecordTypeFloodFill**{: #WmfRecordTypeFloodFill } | `&H10419` | **META_FLOODFILL** | +| **WmfRecordTypePie**{: #WmfRecordTypePie } | `&H1081A` | **META_PIE** | +| **WmfRecordTypeRectangle**{: #WmfRecordTypeRectangle } | `&H1041B` | **META_RECTANGLE** | +| **WmfRecordTypeRoundRect**{: #WmfRecordTypeRoundRect } | `&H1061C` | **META_ROUNDRECT** | +| **WmfRecordTypePatBlt**{: #WmfRecordTypePatBlt } | `&H1061D` | **META_PATBLT** | +| **WmfRecordTypeSaveDC**{: #WmfRecordTypeSaveDC } | `&H1001E` | **META_SAVEDC** | +| **WmfRecordTypeSetPixel**{: #WmfRecordTypeSetPixel } | `&H1041F` | **META_SETPIXEL** | +| **WmfRecordTypeOffsetClipRgn**{: #WmfRecordTypeOffsetClipRgn } | `&H10220` | **META_OFFSETCLIPRGN** | +| **WmfRecordTypeTextOut**{: #WmfRecordTypeTextOut } | `&H10521` | **META_TEXTOUT** | +| **WmfRecordTypeBitBlt**{: #WmfRecordTypeBitBlt } | `&H10922` | **META_BITBLT** | +| **WmfRecordTypeStretchBlt**{: #WmfRecordTypeStretchBlt } | `&H10B23` | **META_STRETCHBLT** | +| **WmfRecordTypePolygon**{: #WmfRecordTypePolygon } | `&H10324` | **META_POLYGON** | +| **WmfRecordTypePolyline**{: #WmfRecordTypePolyline } | `&H10325` | **META_POLYLINE** | +| **WmfRecordTypeEscape**{: #WmfRecordTypeEscape } | `&H10626` | **META_ESCAPE** | +| **WmfRecordTypeRestoreDC**{: #WmfRecordTypeRestoreDC } | `&H10127` | **META_RESTOREDC** | +| **WmfRecordTypeFillRegion**{: #WmfRecordTypeFillRegion } | `&H10228` | **META_FILLREGION** | +| **WmfRecordTypeFrameRegion**{: #WmfRecordTypeFrameRegion } | `&H10429` | **META_FRAMEREGION** | +| **WmfRecordTypeInvertRegion**{: #WmfRecordTypeInvertRegion } | `&H1012A` | **META_INVERTREGION** | +| **WmfRecordTypePaintRegion**{: #WmfRecordTypePaintRegion } | `&H1012B` | **META_PAINTREGION** | +| **WmfRecordTypeSelectClipRegion**{: #WmfRecordTypeSelectClipRegion } | `&H1012C` | **META_SELECTCLIPREGION** | +| **WmfRecordTypeSelectObject**{: #WmfRecordTypeSelectObject } | `&H1012D` | **META_SELECTOBJECT** | +| **WmfRecordTypeSetTextAlign**{: #WmfRecordTypeSetTextAlign } | `&H1012E` | **META_SETTEXTALIGN** | +| **WmfRecordTypeDrawText**{: #WmfRecordTypeDrawText } | `&H1062F` | **META_DRAWTEXT** | +| **WmfRecordTypeChord**{: #WmfRecordTypeChord } | `&H10830` | **META_CHORD** | +| **WmfRecordTypeSetMapperFlags**{: #WmfRecordTypeSetMapperFlags } | `&H10231` | **META_SETMAPPERFLAGS** | +| **WmfRecordTypeExtTextOut**{: #WmfRecordTypeExtTextOut } | `&H10A32` | **META_EXTTEXTOUT** | +| **WmfRecordTypeSetDIBToDev**{: #WmfRecordTypeSetDIBToDev } | `&H10D33` | **META_SETDIBTODEV** | +| **WmfRecordTypeSelectPalette**{: #WmfRecordTypeSelectPalette } | `&H10234` | **META_SELECTPALETTE** | +| **WmfRecordTypeRealizePalette**{: #WmfRecordTypeRealizePalette } | `&H10035` | **META_REALIZEPALETTE** | +| **WmfRecordTypeAnimatePalette**{: #WmfRecordTypeAnimatePalette } | `&H10436` | **META_ANIMATEPALETTE** | +| **WmfRecordTypeSetPalEntries**{: #WmfRecordTypeSetPalEntries } | `&H10037` | **META_SETPALENTRIES** | +| **WmfRecordTypePolyPolygon**{: #WmfRecordTypePolyPolygon } | `&H10538` | **META_POLYPOLYGON** | +| **WmfRecordTypeResizePalette**{: #WmfRecordTypeResizePalette } | `&H10139` | **META_RESIZEPALETTE** | +| **WmfRecordTypeDIBBitBlt**{: #WmfRecordTypeDIBBitBlt } | `&H10940` | **META_DIBBITBLT** | +| **WmfRecordTypeDIBStretchBlt**{: #WmfRecordTypeDIBStretchBlt } | `&H10B41` | **META_DIBSTRETCHBLT** | +| **WmfRecordTypeDIBCreatePatternBrush**{: #WmfRecordTypeDIBCreatePatternBrush } | `&H10142` | **META_DIBCREATEPATTERNBRUSH** | +| **WmfRecordTypeStretchDIB**{: #WmfRecordTypeStretchDIB } | `&H10F43` | **META_STRETCHDIB** | +| **WmfRecordTypeExtFloodFill**{: #WmfRecordTypeExtFloodFill } | `&H10548` | **META_EXTFLOODFILL** | +| **WmfRecordTypeSetLayout**{: #WmfRecordTypeSetLayout } | `&H10149` | **META_SETLAYOUT** | +| **WmfRecordTypeResetDC**{: #WmfRecordTypeResetDC } | `&H1014C` | **META_RESETDC** | +| **WmfRecordTypeStartDoc**{: #WmfRecordTypeStartDoc } | `&H1014D` | **META_STARTDOC** | +| **WmfRecordTypeStartPage**{: #WmfRecordTypeStartPage } | `&H1004F` | **META_STARTPAGE** | +| **WmfRecordTypeEndPage**{: #WmfRecordTypeEndPage } | `&H10050` | **META_ENDPAGE** | +| **WmfRecordTypeAbortDoc**{: #WmfRecordTypeAbortDoc } | `&H10052` | **META_ABORTDOC** | +| **WmfRecordTypeEndDoc**{: #WmfRecordTypeEndDoc } | `&H1005E` | **META_ENDDOC** | +| **WmfRecordTypeDeleteObject**{: #WmfRecordTypeDeleteObject } | `&H101F0` | **META_DELETEOBJECT** | +| **WmfRecordTypeCreatePalette**{: #WmfRecordTypeCreatePalette } | `&H100F7` | **META_CREATEPALETTE** | +| **WmfRecordTypeCreateBrush**{: #WmfRecordTypeCreateBrush } | `&H100F8` | **META_CREATEBRUSH** | +| **WmfRecordTypeCreatePatternBrush**{: #WmfRecordTypeCreatePatternBrush } | `&H101F9` | **META_CREATEPATTERNBRUSH** | +| **WmfRecordTypeCreatePenIndirect**{: #WmfRecordTypeCreatePenIndirect } | `&H102FA` | **META_CREATEPENINDIRECT** | +| **WmfRecordTypeCreateFontIndirect**{: #WmfRecordTypeCreateFontIndirect } | `&H102FB` | **META_CREATEFONTINDIRECT** | +| **WmfRecordTypeCreateBrushIndirect**{: #WmfRecordTypeCreateBrushIndirect } | `&H102FC` | **META_CREATEBRUSHINDIRECT** | +| **WmfRecordTypeCreateBitmapIndirect**{: #WmfRecordTypeCreateBitmapIndirect } | `&H102FD` | **META_CREATEBITMAPINDIRECT** | +| **WmfRecordTypeCreateBitmap**{: #WmfRecordTypeCreateBitmap } | `&H106FE` | **META_CREATEBITMAP** | +| **WmfRecordTypeCreateRegion**{: #WmfRecordTypeCreateRegion } | `&H106FF` | **META_CREATEREGION** | + +## EMF records +{: .no_toc } + +Each member has the value of an enhanced metafile record type, the **EMR_** constants of [GpEMR](GpEMR). **EmfRecordTypeMax** and **EmfRecordTypeMin** are the highest and the lowest of them. + +| Member | Value | Record | +|:-------|:------|:------------| +| **EmfRecordTypeHeader**{: #EmfRecordTypeHeader } | `1` | **EMR_HEADER** | +| **EmfRecordTypePolyBezier**{: #EmfRecordTypePolyBezier } | `2` | **EMR_POLYBEZIER** | +| **EmfRecordTypePolygon**{: #EmfRecordTypePolygon } | `3` | **EMR_POLYGON** | +| **EmfRecordTypePolyline**{: #EmfRecordTypePolyline } | `4` | **EMR_POLYLINE** | +| **EmfRecordTypePolyBezierTo**{: #EmfRecordTypePolyBezierTo } | `5` | **EMR_POLYBEZIERTO** | +| **EmfRecordTypePolyLineTo**{: #EmfRecordTypePolyLineTo } | `6` | **EMR_POLYLINETO** | +| **EmfRecordTypePolyPolyline**{: #EmfRecordTypePolyPolyline } | `7` | **EMR_POLYPOLYLINE** | +| **EmfRecordTypePolyPolygon**{: #EmfRecordTypePolyPolygon } | `8` | **EMR_POLYPOLYGON** | +| **EmfRecordTypeSetWindowExtEx**{: #EmfRecordTypeSetWindowExtEx } | `9` | **EMR_SETWINDOWEXTEX** | +| **EmfRecordTypeSetWindowOrgEx**{: #EmfRecordTypeSetWindowOrgEx } | `10` | **EMR_SETWINDOWORGEX** | +| **EmfRecordTypeSetViewportExtEx**{: #EmfRecordTypeSetViewportExtEx } | `11` | **EMR_SETVIEWPORTEXTEX** | +| **EmfRecordTypeSetViewportOrgEx**{: #EmfRecordTypeSetViewportOrgEx } | `12` | **EMR_SETVIEWPORTORGEX** | +| **EmfRecordTypeSetBrushOrgEx**{: #EmfRecordTypeSetBrushOrgEx } | `13` | **EMR_SETBRUSHORGEX** | +| **EmfRecordTypeEOF**{: #EmfRecordTypeEOF } | `14` | **EMR_EOF** | +| **EmfRecordTypeSetPixelV**{: #EmfRecordTypeSetPixelV } | `15` | **EMR_SETPIXELV** | +| **EmfRecordTypeSetMapperFlags**{: #EmfRecordTypeSetMapperFlags } | `16` | **EMR_SETMAPPERFLAGS** | +| **EmfRecordTypeSetMapMode**{: #EmfRecordTypeSetMapMode } | `17` | **EMR_SETMAPMODE** | +| **EmfRecordTypeSetBkMode**{: #EmfRecordTypeSetBkMode } | `18` | **EMR_SETBKMODE** | +| **EmfRecordTypeSetPolyFillMode**{: #EmfRecordTypeSetPolyFillMode } | `19` | **EMR_SETPOLYFILLMODE** | +| **EmfRecordTypeSetROP2**{: #EmfRecordTypeSetROP2 } | `20` | **EMR_SETROP2** | +| **EmfRecordTypeSetStretchBltMode**{: #EmfRecordTypeSetStretchBltMode } | `21` | **EMR_SETSTRETCHBLTMODE** | +| **EmfRecordTypeSetTextAlign**{: #EmfRecordTypeSetTextAlign } | `22` | **EMR_SETTEXTALIGN** | +| **EmfRecordTypeSetColorAdjustment**{: #EmfRecordTypeSetColorAdjustment } | `23` | **EMR_SETCOLORADJUSTMENT** | +| **EmfRecordTypeSetTextColor**{: #EmfRecordTypeSetTextColor } | `24` | **EMR_SETTEXTCOLOR** | +| **EmfRecordTypeSetBkColor**{: #EmfRecordTypeSetBkColor } | `25` | **EMR_SETBKCOLOR** | +| **EmfRecordTypeOffsetClipRgn**{: #EmfRecordTypeOffsetClipRgn } | `26` | **EMR_OFFSETCLIPRGN** | +| **EmfRecordTypeMoveToEx**{: #EmfRecordTypeMoveToEx } | `27` | **EMR_MOVETOEX** | +| **EmfRecordTypeSetMetaRgn**{: #EmfRecordTypeSetMetaRgn } | `28` | **EMR_SETMETARGN** | +| **EmfRecordTypeExcludeClipRect**{: #EmfRecordTypeExcludeClipRect } | `29` | **EMR_EXCLUDECLIPRECT** | +| **EmfRecordTypeIntersectClipRect**{: #EmfRecordTypeIntersectClipRect } | `30` | **EMR_INTERSECTCLIPRECT** | +| **EmfRecordTypeScaleViewportExtEx**{: #EmfRecordTypeScaleViewportExtEx } | `31` | **EMR_SCALEVIEWPORTEXTEX** | +| **EmfRecordTypeScaleWindowExtEx**{: #EmfRecordTypeScaleWindowExtEx } | `32` | **EMR_SCALEWINDOWEXTEX** | +| **EmfRecordTypeSaveDC**{: #EmfRecordTypeSaveDC } | `33` | **EMR_SAVEDC** | +| **EmfRecordTypeRestoreDC**{: #EmfRecordTypeRestoreDC } | `34` | **EMR_RESTOREDC** | +| **EmfRecordTypeSetWorldTransform**{: #EmfRecordTypeSetWorldTransform } | `35` | **EMR_SETWORLDTRANSFORM** | +| **EmfRecordTypeModifyWorldTransform**{: #EmfRecordTypeModifyWorldTransform } | `36` | **EMR_MODIFYWORLDTRANSFORM** | +| **EmfRecordTypeSelectObject**{: #EmfRecordTypeSelectObject } | `37` | **EMR_SELECTOBJECT** | +| **EmfRecordTypeCreatePen**{: #EmfRecordTypeCreatePen } | `38` | **EMR_CREATEPEN** | +| **EmfRecordTypeCreateBrushIndirect**{: #EmfRecordTypeCreateBrushIndirect } | `39` | **EMR_CREATEBRUSHINDIRECT** | +| **EmfRecordTypeDeleteObject**{: #EmfRecordTypeDeleteObject } | `40` | **EMR_DELETEOBJECT** | +| **EmfRecordTypeAngleArc**{: #EmfRecordTypeAngleArc } | `41` | **EMR_ANGLEARC** | +| **EmfRecordTypeEllipse**{: #EmfRecordTypeEllipse } | `42` | **EMR_ELLIPSE** | +| **EmfRecordTypeRectangle**{: #EmfRecordTypeRectangle } | `43` | **EMR_RECTANGLE** | +| **EmfRecordTypeRoundRect**{: #EmfRecordTypeRoundRect } | `44` | **EMR_ROUNDRECT** | +| **EmfRecordTypeArc**{: #EmfRecordTypeArc } | `45` | **EMR_ARC** | +| **EmfRecordTypeChord**{: #EmfRecordTypeChord } | `46` | **EMR_CHORD** | +| **EmfRecordTypePie**{: #EmfRecordTypePie } | `47` | **EMR_PIE** | +| **EmfRecordTypeSelectPalette**{: #EmfRecordTypeSelectPalette } | `48` | **EMR_SELECTPALETTE** | +| **EmfRecordTypeCreatePalette**{: #EmfRecordTypeCreatePalette } | `49` | **EMR_CREATEPALETTE** | +| **EmfRecordTypeSetPaletteEntries**{: #EmfRecordTypeSetPaletteEntries } | `50` | **EMR_SETPALETTEENTRIES** | +| **EmfRecordTypeResizePalette**{: #EmfRecordTypeResizePalette } | `51` | **EMR_RESIZEPALETTE** | +| **EmfRecordTypeRealizePalette**{: #EmfRecordTypeRealizePalette } | `52` | **EMR_REALIZEPALETTE** | +| **EmfRecordTypeExtFloodFill**{: #EmfRecordTypeExtFloodFill } | `53` | **EMR_EXTFLOODFILL** | +| **EmfRecordTypeLineTo**{: #EmfRecordTypeLineTo } | `54` | **EMR_LINETO** | +| **EmfRecordTypeArcTo**{: #EmfRecordTypeArcTo } | `55` | **EMR_ARCTO** | +| **EmfRecordTypePolyDraw**{: #EmfRecordTypePolyDraw } | `56` | **EMR_POLYDRAW** | +| **EmfRecordTypeSetArcDirection**{: #EmfRecordTypeSetArcDirection } | `57` | **EMR_SETARCDIRECTION** | +| **EmfRecordTypeSetMiterLimit**{: #EmfRecordTypeSetMiterLimit } | `58` | **EMR_SETMITERLIMIT** | +| **EmfRecordTypeBeginPath**{: #EmfRecordTypeBeginPath } | `59` | **EMR_BEGINPATH** | +| **EmfRecordTypeEndPath**{: #EmfRecordTypeEndPath } | `60` | **EMR_ENDPATH** | +| **EmfRecordTypeCloseFigure**{: #EmfRecordTypeCloseFigure } | `61` | **EMR_CLOSEFIGURE** | +| **EmfRecordTypeFillPath**{: #EmfRecordTypeFillPath } | `62` | **EMR_FILLPATH** | +| **EmfRecordTypeStrokeAndFillPath**{: #EmfRecordTypeStrokeAndFillPath } | `63` | **EMR_STROKEANDFILLPATH** | +| **EmfRecordTypeStrokePath**{: #EmfRecordTypeStrokePath } | `64` | **EMR_STROKEPATH** | +| **EmfRecordTypeFlattenPath**{: #EmfRecordTypeFlattenPath } | `65` | **EMR_FLATTENPATH** | +| **EmfRecordTypeWidenPath**{: #EmfRecordTypeWidenPath } | `66` | **EMR_WIDENPATH** | +| **EmfRecordTypeSelectClipPath**{: #EmfRecordTypeSelectClipPath } | `67` | **EMR_SELECTCLIPPATH** | +| **EmfRecordTypeAbortPath**{: #EmfRecordTypeAbortPath } | `68` | **EMR_ABORTPATH** | +| **EmfRecordTypeReserved_069**{: #EmfRecordTypeReserved_069 } | `69` | Not used. | +| **EmfRecordTypeGdiComment**{: #EmfRecordTypeGdiComment } | `70` | **EMR_GDICOMMENT** | +| **EmfRecordTypeFillRgn**{: #EmfRecordTypeFillRgn } | `71` | **EMR_FILLRGN** | +| **EmfRecordTypeFrameRgn**{: #EmfRecordTypeFrameRgn } | `72` | **EMR_FRAMERGN** | +| **EmfRecordTypeInvertRgn**{: #EmfRecordTypeInvertRgn } | `73` | **EMR_INVERTRGN** | +| **EmfRecordTypePaintRgn**{: #EmfRecordTypePaintRgn } | `74` | **EMR_PAINTRGN** | +| **EmfRecordTypeExtSelectClipRgn**{: #EmfRecordTypeExtSelectClipRgn } | `75` | **EMR_EXTSELECTCLIPRGN** | +| **EmfRecordTypeBitBlt**{: #EmfRecordTypeBitBlt } | `76` | **EMR_BITBLT** | +| **EmfRecordTypeStretchBlt**{: #EmfRecordTypeStretchBlt } | `77` | **EMR_STRETCHBLT** | +| **EmfRecordTypeMaskBlt**{: #EmfRecordTypeMaskBlt } | `78` | **EMR_MASKBLT** | +| **EmfRecordTypePlgBlt**{: #EmfRecordTypePlgBlt } | `79` | **EMR_PLGBLT** | +| **EmfRecordTypeSetDIBitsToDevice**{: #EmfRecordTypeSetDIBitsToDevice } | `80` | **EMR_SETDIBITSTODEVICE** | +| **EmfRecordTypeStretchDIBits**{: #EmfRecordTypeStretchDIBits } | `81` | **EMR_STRETCHDIBITS** | +| **EmfRecordTypeExtCreateFontIndirect**{: #EmfRecordTypeExtCreateFontIndirect } | `82` | **EMR_EXTCREATEFONTINDIRECTW** | +| **EmfRecordTypeExtTextOutA**{: #EmfRecordTypeExtTextOutA } | `83` | **EMR_EXTTEXTOUTA** | +| **EmfRecordTypeExtTextOutW**{: #EmfRecordTypeExtTextOutW } | `84` | **EMR_EXTTEXTOUTW** | +| **EmfRecordTypePolyBezier16**{: #EmfRecordTypePolyBezier16 } | `85` | **EMR_POLYBEZIER16** | +| **EmfRecordTypePolygon16**{: #EmfRecordTypePolygon16 } | `86` | **EMR_POLYGON16** | +| **EmfRecordTypePolyline16**{: #EmfRecordTypePolyline16 } | `87` | **EMR_POLYLINE16** | +| **EmfRecordTypePolyBezierTo16**{: #EmfRecordTypePolyBezierTo16 } | `88` | **EMR_POLYBEZIERTO16** | +| **EmfRecordTypePolylineTo16**{: #EmfRecordTypePolylineTo16 } | `89` | **EMR_POLYLINETO16** | +| **EmfRecordTypePolyPolyline16**{: #EmfRecordTypePolyPolyline16 } | `90` | **EMR_POLYPOLYLINE16** | +| **EmfRecordTypePolyPolygon16**{: #EmfRecordTypePolyPolygon16 } | `91` | **EMR_POLYPOLYGON16** | +| **EmfRecordTypePolyDraw16**{: #EmfRecordTypePolyDraw16 } | `92` | **EMR_POLYDRAW16** | +| **EmfRecordTypeCreateMonoBrush**{: #EmfRecordTypeCreateMonoBrush } | `93` | **EMR_CREATEMONOBRUSH** | +| **EmfRecordTypeCreateDIBPatternBrushPt**{: #EmfRecordTypeCreateDIBPatternBrushPt } | `94` | **EMR_CREATEDIBPATTERNBRUSHPT** | +| **EmfRecordTypeExtCreatePen**{: #EmfRecordTypeExtCreatePen } | `95` | **EMR_EXTCREATEPEN** | +| **EmfRecordTypePolyTextOutA**{: #EmfRecordTypePolyTextOutA } | `96` | **EMR_POLYTEXTOUTA** | +| **EmfRecordTypePolyTextOutW**{: #EmfRecordTypePolyTextOutW } | `97` | **EMR_POLYTEXTOUTW** | +| **EmfRecordTypeSetICMMode**{: #EmfRecordTypeSetICMMode } | `98` | **EMR_SETICMMODE** | +| **EmfRecordTypeCreateColorSpace**{: #EmfRecordTypeCreateColorSpace } | `99` | **EMR_CREATECOLORSPACE** | +| **EmfRecordTypeSetColorSpace**{: #EmfRecordTypeSetColorSpace } | `100` | **EMR_SETCOLORSPACE** | +| **EmfRecordTypeDeleteColorSpace**{: #EmfRecordTypeDeleteColorSpace } | `101` | **EMR_DELETECOLORSPACE** | +| **EmfRecordTypeGLSRecord**{: #EmfRecordTypeGLSRecord } | `102` | **EMR_GLSRECORD** | +| **EmfRecordTypeGLSBoundedRecord**{: #EmfRecordTypeGLSBoundedRecord } | `103` | **EMR_GLSBOUNDEDRECORD** | +| **EmfRecordTypePixelFormat**{: #EmfRecordTypePixelFormat } | `104` | **EMR_PIXELFORMAT** | +| **EmfRecordTypeDrawEscape**{: #EmfRecordTypeDrawEscape } | `105` | **EMR_RESERVED_105** | +| **EmfRecordTypeExtEscape**{: #EmfRecordTypeExtEscape } | `106` | **EMR_RESERVED_106** | +| **EmfRecordTypeStartDoc**{: #EmfRecordTypeStartDoc } | `107` | **EMR_RESERVED_107** | +| **EmfRecordTypeSmallTextOut**{: #EmfRecordTypeSmallTextOut } | `108` | **EMR_RESERVED_108** | +| **EmfRecordTypeForceUFIMapping**{: #EmfRecordTypeForceUFIMapping } | `109` | **EMR_RESERVED_109** | +| **EmfRecordTypeNamedEscape**{: #EmfRecordTypeNamedEscape } | `110` | **EMR_RESERVED_110** | +| **EmfRecordTypeColorCorrectPalette**{: #EmfRecordTypeColorCorrectPalette } | `111` | **EMR_COLORCORRECTPALETTE** | +| **EmfRecordTypeSetICMProfileA**{: #EmfRecordTypeSetICMProfileA } | `112` | **EMR_SETICMPROFILEA** | +| **EmfRecordTypeSetICMProfileW**{: #EmfRecordTypeSetICMProfileW } | `113` | **EMR_SETICMPROFILEW** | +| **EmfRecordTypeAlphaBlend**{: #EmfRecordTypeAlphaBlend } | `114` | **EMR_ALPHABLEND** | +| **EmfRecordTypeSetLayout**{: #EmfRecordTypeSetLayout } | `115` | **EMR_SETLAYOUT** | +| **EmfRecordTypeTransparentBlt**{: #EmfRecordTypeTransparentBlt } | `116` | **EMR_TRANSPARENTBLT** | +| **EmfRecordTypeReserved_117**{: #EmfRecordTypeReserved_117 } | `117` | Not used. | +| **EmfRecordTypeGradientFill**{: #EmfRecordTypeGradientFill } | `118` | **EMR_GRADIENTFILL** | +| **EmfRecordTypeSetLinkedUFIs**{: #EmfRecordTypeSetLinkedUFIs } | `119` | **EMR_RESERVED_119** | +| **EmfRecordTypeSetTextJustification**{: #EmfRecordTypeSetTextJustification } | `120` | **EMR_RESERVED_120** | +| **EmfRecordTypeColorMatchToTargetW**{: #EmfRecordTypeColorMatchToTargetW } | `121` | **EMR_COLORMATCHTOTARGETW** | +| **EmfRecordTypeCreateColorSpaceW**{: #EmfRecordTypeCreateColorSpaceW } | `122` | **EMR_CREATECOLORSPACEW** | +| **EmfRecordTypeMax**{: #EmfRecordTypeMax } | `122` | The highest EMF record type. | +| **EmfRecordTypeMin**{: #EmfRecordTypeMin } | `1` | The lowest EMF record type. | + +## EMF+ records +{: .no_toc } + +The members are numbered from `&H4000`. Most of them correspond to a method of [**Graphics**](../Graphics), which writes the record when it draws into a metafile. **EmfPlusRecordTotal** is one more than the last record and is not a record. + +| Member | Value | Written by | +|:-------|:------|:------------| +| **EmfPlusRecordTypeInvalid**{: #EmfPlusRecordTypeInvalid } | `&H4000` | Not a valid record. | +| **EmfPlusRecordTypeHeader**{: #EmfPlusRecordTypeHeader } | `&H4001` | The EMF+ header. | +| **EmfPlusRecordTypeEndOfFile**{: #EmfPlusRecordTypeEndOfFile } | `&H4002` | The last EMF+ record of a metafile. | +| **EmfPlusRecordTypeComment**{: #EmfPlusRecordTypeComment } | `&H4003` | [**AddMetafileComment**](../Graphics#addmetafilecomment) | +| **EmfPlusRecordTypeGetDC**{: #EmfPlusRecordTypeGetDC } | `&H4004` | [**GetHDC**](../Graphics#gethdc) | +| **EmfPlusRecordTypeMultiFormatStart**{: #EmfPlusRecordTypeMultiFormatStart } | `&H4005` | The start of a multiple-format block. | +| **EmfPlusRecordTypeMultiFormatSection**{: #EmfPlusRecordTypeMultiFormatSection } | `&H4006` | A section in a multiple-format block. Multiple-format records let the same set of records be stored in several formats. | +| **EmfPlusRecordTypeMultiFormatEnd**{: #EmfPlusRecordTypeMultiFormatEnd } | `&H4007` | The end of a multiple-format block. | +| **EmfPlusRecordTypeObject**{: #EmfPlusRecordTypeObject } | `&H4008` | A persistent object, such as a brush, a pen or a path. See [GpObjectType](GpObjectType). | +| **EmfPlusRecordTypeClear**{: #EmfPlusRecordTypeClear } | `&H4009` | [**Clear**](../Graphics#clear) | +| **EmfPlusRecordTypeFillRects**{: #EmfPlusRecordTypeFillRects } | `&H400A` | [**FillRectangle**](../Graphics#fillrectangle), [**FillRectangles**](../Graphics#fillrectangles) | +| **EmfPlusRecordTypeDrawRects**{: #EmfPlusRecordTypeDrawRects } | `&H400B` | [**DrawRectangle**](../Graphics#drawrectangle), [**DrawRectangles**](../Graphics#drawrectangles) | +| **EmfPlusRecordTypeFillPolygon**{: #EmfPlusRecordTypeFillPolygon } | `&H400C` | [**FillPolygon**](../Graphics#fillpolygon) | +| **EmfPlusRecordTypeDrawLines**{: #EmfPlusRecordTypeDrawLines } | `&H400D` | [**DrawLine**](../Graphics#drawline), [**DrawLines**](../Graphics#drawlines) | +| **EmfPlusRecordTypeFillEllipse**{: #EmfPlusRecordTypeFillEllipse } | `&H400E` | [**FillEllipse**](../Graphics#fillellipse) | +| **EmfPlusRecordTypeDrawEllipse**{: #EmfPlusRecordTypeDrawEllipse } | `&H400F` | [**DrawEllipse**](../Graphics#drawellipse) | +| **EmfPlusRecordTypeFillPie**{: #EmfPlusRecordTypeFillPie } | `&H4010` | [**FillPie**](../Graphics#fillpie) | +| **EmfPlusRecordTypeDrawPie**{: #EmfPlusRecordTypeDrawPie } | `&H4011` | [**DrawPie**](../Graphics#drawpie) | +| **EmfPlusRecordTypeDrawArc**{: #EmfPlusRecordTypeDrawArc } | `&H4012` | [**DrawArc**](../Graphics#drawarc) | +| **EmfPlusRecordTypeFillRegion**{: #EmfPlusRecordTypeFillRegion } | `&H4013` | [**FillRegion**](../Graphics#fillregion) | +| **EmfPlusRecordTypeFillPath**{: #EmfPlusRecordTypeFillPath } | `&H4014` | [**FillPath**](../Graphics#fillpath) | +| **EmfPlusRecordTypeDrawPath**{: #EmfPlusRecordTypeDrawPath } | `&H4015` | [**DrawPath**](../Graphics#drawpath) | +| **EmfPlusRecordTypeFillClosedCurve**{: #EmfPlusRecordTypeFillClosedCurve } | `&H4016` | [**FillClosedCurve**](../Graphics#fillclosedcurve) | +| **EmfPlusRecordTypeDrawClosedCurve**{: #EmfPlusRecordTypeDrawClosedCurve } | `&H4017` | [**DrawClosedCurve**](../Graphics#drawclosedcurve) | +| **EmfPlusRecordTypeDrawCurve**{: #EmfPlusRecordTypeDrawCurve } | `&H4018` | [**DrawCurve**](../Graphics#drawcurve) | +| **EmfPlusRecordTypeDrawBeziers**{: #EmfPlusRecordTypeDrawBeziers } | `&H4019` | [**DrawBezier**](../Graphics#drawbezier), [**DrawBeziers**](../Graphics#drawbeziers) | +| **EmfPlusRecordTypeDrawImage**{: #EmfPlusRecordTypeDrawImage } | `&H401A` | [**DrawImage**](../Graphics#drawimage), the overloads without an array of destination points | +| **EmfPlusRecordTypeDrawImagePoints**{: #EmfPlusRecordTypeDrawImagePoints } | `&H401B` | [**DrawImage**](../Graphics#drawimage), the overloads with an array of destination points | +| **EmfPlusRecordTypeDrawString**{: #EmfPlusRecordTypeDrawString } | `&H401C` | [**DrawString**](../Graphics#drawstring) | +| **EmfPlusRecordTypeSetRenderingOrigin**{: #EmfPlusRecordTypeSetRenderingOrigin } | `&H401D` | [**RenderingOrigin**](../Graphics#renderingorigin) | +| **EmfPlusRecordTypeSetAntiAliasMode**{: #EmfPlusRecordTypeSetAntiAliasMode } | `&H401E` | [**SmoothingMode**](../Graphics#smoothingmode) | +| **EmfPlusRecordTypeSetTextRenderingHint**{: #EmfPlusRecordTypeSetTextRenderingHint } | `&H401F` | [**TextRenderingHint**](../Graphics#textrenderinghint) | +| **EmfPlusRecordTypeSetTextContrast**{: #EmfPlusRecordTypeSetTextContrast } | `&H4020` | [**TextContrast**](../Graphics#textcontrast) | +| **EmfPlusRecordTypeSetInterpolationMode**{: #EmfPlusRecordTypeSetInterpolationMode } | `&H4021` | [**InterpolationMode**](../Graphics#interpolationmode) | +| **EmfPlusRecordTypeSetPixelOffsetMode**{: #EmfPlusRecordTypeSetPixelOffsetMode } | `&H4022` | [**PixelOffsetMode**](../Graphics#pixeloffsetmode) | +| **EmfPlusRecordTypeSetCompositingMode**{: #EmfPlusRecordTypeSetCompositingMode } | `&H4023` | [**CompositingMode**](../Graphics#compositingmode) | +| **EmfPlusRecordTypeSetCompositingQuality**{: #EmfPlusRecordTypeSetCompositingQuality } | `&H4024` | [**CompositingQuality**](../Graphics#compositingquality) | +| **EmfPlusRecordTypeSave**{: #EmfPlusRecordTypeSave } | `&H4025` | [**Save**](../Graphics#save) | +| **EmfPlusRecordTypeRestore**{: #EmfPlusRecordTypeRestore } | `&H4026` | [**Restore**](../Graphics#restore) | +| **EmfPlusRecordTypeBeginContainer**{: #EmfPlusRecordTypeBeginContainer } | `&H4027` | [**BeginContainer**](../Graphics#begincontainer), the overloads with rectangles | +| **EmfPlusRecordTypeBeginContainerNoParams**{: #EmfPlusRecordTypeBeginContainerNoParams } | `&H4028` | [**BeginContainer**](../Graphics#begincontainer), the overload without arguments | +| **EmfPlusRecordTypeEndContainer**{: #EmfPlusRecordTypeEndContainer } | `&H4029` | [**EndContainer**](../Graphics#endcontainer) | +| **EmfPlusRecordTypeSetWorldTransform**{: #EmfPlusRecordTypeSetWorldTransform } | `&H402A` | [**Transform**](../Graphics#transform) | +| **EmfPlusRecordTypeResetWorldTransform**{: #EmfPlusRecordTypeResetWorldTransform } | `&H402B` | [**ResetTransform**](../Graphics#resettransform) | +| **EmfPlusRecordTypeMultiplyWorldTransform**{: #EmfPlusRecordTypeMultiplyWorldTransform } | `&H402C` | [**MultiplyTransform**](../Graphics#multiplytransform) | +| **EmfPlusRecordTypeTranslateWorldTransform**{: #EmfPlusRecordTypeTranslateWorldTransform } | `&H402D` | [**TranslateTransform**](../Graphics#translatetransform) | +| **EmfPlusRecordTypeScaleWorldTransform**{: #EmfPlusRecordTypeScaleWorldTransform } | `&H402E` | [**ScaleTransform**](../Graphics#scaletransform) | +| **EmfPlusRecordTypeRotateWorldTransform**{: #EmfPlusRecordTypeRotateWorldTransform } | `&H402F` | [**RotateTransform**](../Graphics#rotatetransform) | +| **EmfPlusRecordTypeSetPageTransform**{: #EmfPlusRecordTypeSetPageTransform } | `&H4030` | [**PageScale**](../Graphics#pagescale), [**PageUnit**](../Graphics#pageunit) | +| **EmfPlusRecordTypeResetClip**{: #EmfPlusRecordTypeResetClip } | `&H4031` | [**ResetClip**](../Graphics#resetclip) | +| **EmfPlusRecordTypeSetClipRect**{: #EmfPlusRecordTypeSetClipRect } | `&H4032` | [**SetClip**](../Graphics#setclip), the overloads with a rectangle | +| **EmfPlusRecordTypeSetClipPath**{: #EmfPlusRecordTypeSetClipPath } | `&H4033` | [**SetClip**](../Graphics#setclip), the overload with a path | +| **EmfPlusRecordTypeSetClipRegion**{: #EmfPlusRecordTypeSetClipRegion } | `&H4034` | [**SetClip**](../Graphics#setclip), the overloads with a region | +| **EmfPlusRecordTypeOffsetClip**{: #EmfPlusRecordTypeOffsetClip } | `&H4035` | [**TranslateClip**](../Graphics#translateclip) | +| **EmfPlusRecordTypeDrawDriverString**{: #EmfPlusRecordTypeDrawDriverString } | `&H4036` | [**DrawDriverString**](../Graphics#drawdriverstring) | +| **EmfPlusRecordTypeStrokeFillPath**{: #EmfPlusRecordTypeStrokeFillPath } | `&H4037` | Microsoft gives no description. | +| **EmfPlusRecordTypeSerializableObject**{: #EmfPlusRecordTypeSerializableObject } | `&H4038` | Microsoft gives no description. | +| **EmfPlusRecordTypeSetTSGraphics**{: #EmfPlusRecordTypeSetTSGraphics } | `&H4039` | Microsoft gives no description. | +| **EmfPlusRecordTypeSetTSClip**{: #EmfPlusRecordTypeSetTSClip } | `&H403A` | Microsoft gives no description. | +| **EmfPlusRecordTotal**{: #EmfPlusRecordTotal } | `&H403B` | One more than the last record. It is not a record. | +| **EmfPlusRecordTypeMax**{: #EmfPlusRecordTypeMax } | `&H403A` | The highest EMF+ record, one less than **EmfPlusRecordTotal**. | +| **EmfPlusRecordTypeMin**{: #EmfPlusRecordTypeMin } | `&H4001` | The lowest EMF+ record, same as **EmfPlusRecordTypeHeader**. | + +## Used by + +- [**Metafile**](../Metafile) class: [**PlayRecord**](../Metafile#playrecord) +- the **EnumerateMetafileProc** callback + +## See Also + +- [EmfPlusRecordType](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusenums/ne-gdiplusenums-emfplusrecordtype) -- Microsoft's documentation of the GDI+ enumeration +- [Enumerations](.) -- all the enumerations of the package +- [Metafile](../Metafile) class diff --git a/docs/Reference/Contributed/GdiPlus/Enumerations/GpEmfToWmfBitsFlags.md b/docs/Reference/Contributed/GdiPlus/Enumerations/GpEmfToWmfBitsFlags.md new file mode 100644 index 00000000..05f96f03 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Enumerations/GpEmfToWmfBitsFlags.md @@ -0,0 +1,29 @@ +--- +title: GpEmfToWmfBitsFlags +parent: Enumerations +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Enumerations/GpEmfToWmfBitsFlags +--- + +# GpEmfToWmfBitsFlags enumeration +{: .no_toc } + +Specifies the options of the conversion of an enhanced metafile to a Windows metafile. + +The members combine with **Or**. They are the *flags* argument of the **EmfToWmfBits** function. + +| Member | Value | Description | +|:-------|:------|:------------| +| **EmfToWmfBitsFlagsDefault**{: #EmfToWmfBitsFlagsDefault } | `&H00000000` | The default conversion. | +| **EmfToWmfBitsFlagsEmbedEmf**{: #EmfToWmfBitsFlagsEmbedEmf } | `&H00000001` | The source EMF is embedded as a comment in the resulting WMF. | +| **EmfToWmfBitsFlagsIncludePlaceable**{: #EmfToWmfBitsFlagsIncludePlaceable } | `&H00000002` | The resulting WMF is in the placeable metafile format, with the additional 22-byte header that format needs. | +| **EmfToWmfBitsFlagsNoXORClip**{: #EmfToWmfBitsFlagsNoXORClip } | `&H00000004` | The clipping region is stored in the metafile in the traditional way. Without the flag, the conversion applies an optimisation that stores the clipping region as a path and simulates clipping with the XOR operator. | + +## Used by + +- [Helper functions](../Helpers): **EmfToWmfBits** + +## See Also + +- [EmfToWmfBitsFlags](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusenums/ne-gdiplusenums-emftowmfbitsflags) -- Microsoft's documentation of the GDI+ enumeration +- [Enumerations](.) -- all the enumerations of the package diff --git a/docs/Reference/Contributed/GdiPlus/Enumerations/GpEmfType.md b/docs/Reference/Contributed/GdiPlus/Enumerations/GpEmfType.md new file mode 100644 index 00000000..55f9cb55 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Enumerations/GpEmfType.md @@ -0,0 +1,29 @@ +--- +title: GpEmfType +parent: Enumerations +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Enumerations/GpEmfType +--- + +# GpEmfType enumeration +{: .no_toc } + +Specifies the kind of records that are written to a new enhanced metafile. + +The members have the values of the matching members of [GpMetafileType](GpMetafileType). + +| Member | Value | Description | +|:-------|:------|:------------| +| **EmfTypeEmfOnly**{: #EmfTypeEmfOnly } | `3` | All records are EMF records, which GDI or GDI+ can display. | +| **EmfTypeEmfPlusOnly**{: #EmfTypeEmfPlusOnly } | `4` | All records are EMF+ records, which GDI+ can display and GDI cannot. | +| **EmfTypeEmfPlusDual**{: #EmfTypeEmfPlusDual } | `5` | Each EMF+ record has an alternate EMF record. GDI or GDI+ can display the metafile. This is the default of the **Metafile** constructors. | + +## Used by + +- [**Metafile**](../Metafile) class: [**ConvertToEmfPlus**](../Metafile#converttoemfplus), [constructor](../Metafile#creating) + +## See Also + +- [EmfType](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusenums/ne-gdiplusenums-emftype) -- Microsoft's documentation of the GDI+ enumeration +- [Enumerations](.) -- all the enumerations of the package +- [Metafile](../Metafile) class diff --git a/docs/Reference/Contributed/GdiPlus/Enumerations/GpEncoderParameterValueType.md b/docs/Reference/Contributed/GdiPlus/Enumerations/GpEncoderParameterValueType.md new file mode 100644 index 00000000..c3742489 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Enumerations/GpEncoderParameterValueType.md @@ -0,0 +1,36 @@ +--- +title: GpEncoderParameterValueType +parent: Enumerations +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Enumerations/GpEncoderParameterValueType +--- + +# GpEncoderParameterValueType enumeration +{: .no_toc } + +Specifies the data types of the parameters of an image codec (an encoder or a decoder). + +A value of this enumeration is the **Type** of a parameter of a codec. The last two members are not types: they give the lowest and the highest valid value. + +| Member | Value | Description | +|:-------|:------|:------------| +| **EncoderParameterValueTypeByte**{: #EncoderParameterValueTypeByte } | `1` | An 8-bit unsigned integer. | +| **EncoderParameterValueTypeASCII**{: #EncoderParameterValueTypeASCII } | `2` | An 8-bit byte that holds one 7-bit ASCII code. The string ends with a null. | +| **EncoderParameterValueTypeShort**{: #EncoderParameterValueTypeShort } | `3` | A 16-bit unsigned integer. | +| **EncoderParameterValueTypeLong**{: #EncoderParameterValueTypeLong } | `4` | A 32-bit unsigned integer. | +| **EncoderParameterValueTypeRational**{: #EncoderParameterValueTypeRational } | `5` | Two longs. The first is the numerator and the second is the denominator. | +| **EncoderParameterValueTypeLongRange**{: #EncoderParameterValueTypeLongRange } | `6` | Two longs that give a range of integers. The first is the lower end and the second is the upper end. Both ends are included. | +| **EncoderParameterValueTypeUndefined**{: #EncoderParameterValueTypeUndefined } | `7` | An 8-bit byte that can have any value, depending on the definition of the field. | +| **EncoderParameterValueTypeRationalRange**{: #EncoderParameterValueTypeRationalRange } | `8` | Two rationals. The first is the lower end of a range and the second is the upper end. Both ends are included. | +| **EncoderParameterValueTypePointer**{: #EncoderParameterValueTypePointer } | `9` | A pointer to data that the parameter defines. | +| **MinEncoderParameterValueType**{: #MinEncoderParameterValueType } | `0` | The lowest valid value of the enumeration. | +| **MaxEncoderParameterValueType**{: #MaxEncoderParameterValueType } | `9` | The highest valid value of the enumeration, same as **EncoderParameterValueTypePointer**. | + +## Used by + +- [**GpEncoderParameter**](../Types/GpEncoderParameter) type: **Type**, **type** + +## See Also + +- [EncoderParameterValueType](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusenums/ne-gdiplusenums-encoderparametervaluetype) -- Microsoft's documentation of the GDI+ enumeration +- [Enumerations](.) -- all the enumerations of the package diff --git a/docs/Reference/Contributed/GdiPlus/Enumerations/GpEncoderValue.md b/docs/Reference/Contributed/GdiPlus/Enumerations/GpEncoderValue.md new file mode 100644 index 00000000..f0c5ec36 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Enumerations/GpEncoderValue.md @@ -0,0 +1,47 @@ +--- +title: GpEncoderValue +parent: Enumerations +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Enumerations/GpEncoderValue +--- + +# GpEncoderValue enumeration +{: .no_toc } + +Specifies values that are passed as arguments to image encoders. + +No public member takes this enumeration. Its members are the values of encoder parameters, which are passed to an encoder in a parameter list. Microsoft marks several members as not used in GDI+ version 1.0. + +| Member | Value | Description | +|:-------|:------|:------------| +| **EncoderValueColorTypeCMYK**{: #EncoderValueColorTypeCMYK } | `0` | Not used. | +| **EncoderValueColorTypeYCCK**{: #EncoderValueColorTypeYCCK } | `1` | Not used. | +| **EncoderValueCompressionLZW**{: #EncoderValueCompressionLZW } | `2` | For a TIFF image, the LZW compression method. | +| **EncoderValueCompressionCCITT3**{: #EncoderValueCompressionCCITT3 } | `3` | For a TIFF image, the CCITT3 compression method. | +| **EncoderValueCompressionCCITT4**{: #EncoderValueCompressionCCITT4 } | `4` | For a TIFF image, the CCITT4 compression method. | +| **EncoderValueCompressionRle**{: #EncoderValueCompressionRle } | `5` | For a TIFF image, the RLE compression method. | +| **EncoderValueCompressionNone**{: #EncoderValueCompressionNone } | `6` | For a TIFF image, no compression. | +| **EncoderValueScanMethodInterlaced**{: #EncoderValueScanMethodInterlaced } | `7` | Not used. | +| **EncoderValueScanMethodNonInterlaced**{: #EncoderValueScanMethodNonInterlaced } | `8` | Not used. | +| **EncoderValueVersionGif87**{: #EncoderValueVersionGif87 } | `9` | Not used. | +| **EncoderValueVersionGif89**{: #EncoderValueVersionGif89 } | `10` | Not used. | +| **EncoderValueRenderProgressive**{: #EncoderValueRenderProgressive } | `11` | Not used. | +| **EncoderValueRenderNonProgressive**{: #EncoderValueRenderNonProgressive } | `12` | Not used. | +| **EncoderValueTransformRotate90**{: #EncoderValueTransformRotate90 } | `13` | For a JPEG image, a lossless rotation by 90 degrees clockwise. | +| **EncoderValueTransformRotate180**{: #EncoderValueTransformRotate180 } | `14` | For a JPEG image, a lossless rotation by 180 degrees. | +| **EncoderValueTransformRotate270**{: #EncoderValueTransformRotate270 } | `15` | For a JPEG image, a lossless rotation by 270 degrees clockwise. | +| **EncoderValueTransformFlipHorizontal**{: #EncoderValueTransformFlipHorizontal } | `16` | For a JPEG image, a lossless horizontal flip. | +| **EncoderValueTransformFlipVertical**{: #EncoderValueTransformFlipVertical } | `17` | For a JPEG image, a lossless vertical flip. | +| **EncoderValueMultiFrame**{: #EncoderValueMultiFrame } | `18` | Multiple-frame encoding. | +| **EncoderValueLastFrame**{: #EncoderValueLastFrame } | `19` | The last frame of a multiple-frame image. | +| **EncoderValueFlush**{: #EncoderValueFlush } | `20` | The encoder object is to be closed. | +| **EncoderValueFrameDimensionTime**{: #EncoderValueFrameDimensionTime } | `21` | Not used. | +| **EncoderValueFrameDimensionResolution**{: #EncoderValueFrameDimensionResolution } | `22` | Not used. | +| **EncoderValueFrameDimensionPage**{: #EncoderValueFrameDimensionPage } | `23` | For a TIFF image, the page frame dimension. | +| **EncoderValueColorTypeGray**{: #EncoderValueColorTypeGray } | `24` | The colour type is grayscale. | +| **EncoderValueColorTypeRGB**{: #EncoderValueColorTypeRGB } | `25` | The colour type is RGB. | + +## See Also + +- [EncoderValue](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusenums/ne-gdiplusenums-encodervalue) -- Microsoft's documentation of the GDI+ enumeration +- [Enumerations](.) -- all the enumerations of the package diff --git a/docs/Reference/Contributed/GdiPlus/Enumerations/GpErrorHandlingStrategy.md b/docs/Reference/Contributed/GdiPlus/Enumerations/GpErrorHandlingStrategy.md new file mode 100644 index 00000000..4140bced --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Enumerations/GpErrorHandlingStrategy.md @@ -0,0 +1,45 @@ +--- +title: GpErrorHandlingStrategy +parent: Enumerations +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Enumerations/GpErrorHandlingStrategy +--- + +# GpErrorHandlingStrategy enumeration +{: .no_toc } + +Selects what the package does when a GDI+ call returns a status other than **Ok**. + +This enumeration belongs to the package; GDI+ has no counterpart. The module variable **GdipErrorHandlingStrategy** holds the strategy for the whole program. In every strategy the status is also left in the **LastResult** of the object. With **RaiseErrors** the error number is **GdipErrorCodeBase** plus the status, 3300 plus the status unless the base is changed. **GdipErrorHandler** holds the address of the handler for **HandleErrors**. + +| Member | Value | Description | +|:-------|:------|:------------| +| **IgnoreErrors**{: #IgnoreErrors } | `0` | The status is recorded and otherwise ignored. This is the default. | +| **RaiseErrors**{: #RaiseErrors } | `1` | The status is recorded, and then a run-time error is raised with the number **GdipErrorCodeBase** plus the status. | +| **HandleErrors**{: #HandleErrors } | `2` | The status is recorded, and then the handler in **GdipErrorHandler** is called, when one is set. | +| **StopOnErrors**{: #StopOnErrors } | `3` | The status is recorded, and then a **Stop** statement runs, which acts as a breakpoint in the debugger. | + +## Used by + +The module variable **GdipErrorHandlingStrategy** is declared as a **GpErrorHandlingStrategy**. The package reads it every time an object records a status. + +## Example + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +GdipErrorHandlingStrategy = RaiseErrors +On Error Resume Next +Dim bad As Bitmap = Bitmap(Environ$("TEMP") & "\no-such-file.png") +Debug.Print Err.Number +Debug.Print Err.Number - GdipErrorCodeBase = InvalidParameter +GdipErrorHandlingStrategy = IgnoreErrors +' Output: +' 3302 +' True +``` + +The status of a file that does not exist is **InvalidParameter**, 2, so the error number is 3302. + +## See Also + +- [Enumerations](.) -- all the enumerations of the package diff --git a/docs/Reference/Contributed/GdiPlus/Enumerations/GpFillmode.md b/docs/Reference/Contributed/GdiPlus/Enumerations/GpFillmode.md new file mode 100644 index 00000000..b68787f8 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Enumerations/GpFillmode.md @@ -0,0 +1,57 @@ +--- +title: GpFillmode +parent: Enumerations +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Enumerations/GpFillmode +--- + +# GpFillmode enumeration +{: .no_toc } + +Selects the rule that decides which areas of a self-intersecting path are filled. + +The rule matters only where a path crosses itself or holds shapes inside one another. A [**GraphicsPath**](../GraphicsPath) keeps its rule in the **FillMode** property, and the polygon and curve fills of [**Graphics**](../Graphics) take it as an argument. + +| Member | Value | Description | +|:-------|:------|:------------| +| **FillModeAlternate**{: #FillModeAlternate } | `0` | The even-odd rule. A point is filled when a line from it to infinity crosses the path an odd number of times, so the fill alternates between filled and empty areas at each boundary. A shape inside another leaves a hole. | +| **FillModeWinding**{: #FillModeWinding } | `1` | The nonzero winding rule. A point is filled when the path winds around it a net non-zero number of times. A shape drawn inside another in the same direction is filled; one drawn in the opposite direction leaves a hole. | + +## Used by + +- [**Graphics**](../Graphics) class: [**FillClosedCurve**](../Graphics#fillclosedcurve), [**FillPolygon**](../Graphics#fillpolygon) +- [**GraphicsPath**](../GraphicsPath) class: [**FillMode**](../GraphicsPath#fillmode), [constructor](../GraphicsPath#creating) + +## Example + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim bmp As Bitmap = Bitmap(30!, 30!) +Dim g As Graphics = Graphics(bmp) + +' Two rectangles, one inside the other, both drawn in the same direction. +Dim path As GraphicsPath = GraphicsPath(FillModeAlternate) +path.AddRectangle(2, 2, 26, 26) +path.AddRectangle(8, 8, 14, 14) + +g.Clear(White) +g.FillPath(SolidBrush(CColor.Black), path) +Debug.Print Hex$(bmp.Pixel(4, 4).Value), Hex$(bmp.Pixel(15, 15).Value) + +path.FillMode = FillModeWinding +g.Clear(White) +g.FillPath(SolidBrush(CColor.Black), path) +Debug.Print Hex$(bmp.Pixel(4, 4).Value), Hex$(bmp.Pixel(15, 15).Value) +' Output: +' FF000000 FFFFFFFF +' FF000000 FF000000 +``` + +The pixel in the ring is black in both runs. The pixel inside the inner rectangle is white with **FillModeAlternate** (a hole) and black with **FillModeWinding**. + +## See Also + +- [FillMode](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusenums/ne-gdiplusenums-fillmode) -- Microsoft's documentation of the GDI+ enumeration +- [Enumerations](.) -- all the enumerations of the package +- [Graphics](../Graphics) class +- [GraphicsPath](../GraphicsPath) class diff --git a/docs/Reference/Contributed/GdiPlus/Enumerations/GpFlushIntention.md b/docs/Reference/Contributed/GdiPlus/Enumerations/GpFlushIntention.md new file mode 100644 index 00000000..fed240b5 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Enumerations/GpFlushIntention.md @@ -0,0 +1,26 @@ +--- +title: GpFlushIntention +parent: Enumerations +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Enumerations/GpFlushIntention +--- + +# GpFlushIntention enumeration +{: .no_toc } + +Says whether **Graphics.Flush** waits for the batched operations to finish. + +| Member | Value | Description | +|:-------|:------|:------------| +| **FlushIntentionFlush**{: #FlushIntentionFlush } | `0` | Flushes all batched drawing operations and returns at once, without waiting for them to finish. | +| **FlushIntentionSync**{: #FlushIntentionSync } | `1` | Flushes all batched drawing operations and waits for them to finish. | + +## Used by + +- [**Graphics**](../Graphics) class: [**Flush**](../Graphics#flush) + +## See Also + +- [FlushIntention](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusenums/ne-gdiplusenums-flushintention) -- Microsoft's documentation of the GDI+ enumeration +- [Enumerations](.) -- all the enumerations of the package +- [Graphics](../Graphics) class diff --git a/docs/Reference/Contributed/GdiPlus/Enumerations/GpFontStyle.md b/docs/Reference/Contributed/GdiPlus/Enumerations/GpFontStyle.md new file mode 100644 index 00000000..cc2b3e08 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Enumerations/GpFontStyle.md @@ -0,0 +1,49 @@ +--- +title: GpFontStyle +parent: Enumerations +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Enumerations/GpFontStyle +--- + +# GpFontStyle enumeration +{: .no_toc } + +Specifies the style of a font. Styles can be combined. + +The members combine with **Or**. **FontStyleBoldItalic** is the combination of **FontStyleBold** and **FontStyleItalic**; **FontStyleRegular** is no style at all. + +| Member | Value | Description | +|:-------|:------|:------------| +| **FontStyleRegular**{: #FontStyleRegular } | `0` | Normal text. | +| **FontStyleBold**{: #FontStyleBold } | `1` | Bold text. | +| **FontStyleItalic**{: #FontStyleItalic } | `2` | Italic text. | +| **FontStyleBoldItalic**{: #FontStyleBoldItalic } | `3` | Bold and italic text. | +| **FontStyleUnderline**{: #FontStyleUnderline } | `4` | Underlined text. | +| **FontStyleStrikeout**{: #FontStyleStrikeout } | `8` | Text with a line through the middle. | + +## Used by + +- [**Font**](../Font) class: [**Style**](../Font#style), [constructor](../Font#creating) +- [**FontFamily**](../FontFamily) class: [**CellAscent**](../FontFamily#cellascent), [**CellDescent**](../FontFamily#celldescent), [**EmHeight**](../FontFamily#emheight), [**IsStyleAvailable**](../FontFamily#isstyleavailable), [**LineSpacing**](../FontFamily#linespacing) + +## Example + +```tb check_build check_run +Dim style As GpFontStyle = FontStyleBold Or FontStyleItalic Or FontStyleUnderline +Debug.Print style +Debug.Print (style And FontStyleBold) <> 0 +Debug.Print (style And FontStyleStrikeout) <> 0 +Debug.Print (style And FontStyleBoldItalic) = FontStyleBoldItalic +' Output: +' 7 +' True +' False +' True +``` + +## See Also + +- [FontStyle](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusenums/ne-gdiplusenums-fontstyle) -- Microsoft's documentation of the GDI+ enumeration +- [Enumerations](.) -- all the enumerations of the package +- [Font](../Font) class +- [FontFamily](../FontFamily) class diff --git a/docs/Reference/Contributed/GdiPlus/Enumerations/GpGenericFontFamily.md b/docs/Reference/Contributed/GdiPlus/Enumerations/GpGenericFontFamily.md new file mode 100644 index 00000000..efe8c46d --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Enumerations/GpGenericFontFamily.md @@ -0,0 +1,23 @@ +--- +title: GpGenericFontFamily +parent: Enumerations +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Enumerations/GpGenericFontFamily +--- + +# GpGenericFontFamily enumeration +{: .no_toc } + +Names the three generic font families that GDI+ maps to an installed font. + +No public member takes or returns this enumeration. [**FontFamily**](../FontFamily) has a member for each family: **GenericSerif**, **GenericSansSerif** and **GenericMonospace**. + +| Member | Value | Description | +|:-------|:------|:------------| +| **GenericFontFamilySerif**{: #GenericFontFamilySerif } | `0` | A generic serif font family. | +| **GenericFontFamilySansSerif**{: #GenericFontFamilySansSerif } | `1` | A generic sans serif font family. | +| **GenericFontFamilyMonospace**{: #GenericFontFamilyMonospace } | `2` | A generic monospace font family. | + +## See Also + +- [Enumerations](.) -- all the enumerations of the package diff --git a/docs/Reference/Contributed/GdiPlus/Enumerations/GpHatchStyle.md b/docs/Reference/Contributed/GdiPlus/Enumerations/GpHatchStyle.md new file mode 100644 index 00000000..4e4bb958 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Enumerations/GpHatchStyle.md @@ -0,0 +1,83 @@ +--- +title: GpHatchStyle +parent: Enumerations +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Enumerations/GpHatchStyle +--- + +# GpHatchStyle enumeration +{: .no_toc } + +Selects the pattern of a hatch brush. + +A hatch pattern is lines or shapes in the foreground colour drawn over a solid background colour. The last four members are not patterns: **HatchStyleTotal** is the number of styles, **HatchStyleLargeGrid** is another name for **HatchStyleCross**, and **HatchStyleMin** and **HatchStyleMax** give the range of valid values. + +| Member | Value | Description | +|:-------|:------|:------------| +| **HatchStyleHorizontal**{: #HatchStyleHorizontal } | `0` | Horizontal lines. | +| **HatchStyleVertical**{: #HatchStyleVertical } | `1` | Vertical lines. | +| **HatchStyleForwardDiagonal**{: #HatchStyleForwardDiagonal } | `2` | Diagonal lines that slant to the right from the top to the bottom, antialiased. | +| **HatchStyleBackwardDiagonal**{: #HatchStyleBackwardDiagonal } | `3` | Diagonal lines that slant to the left from the top to the bottom, antialiased. | +| **HatchStyleCross**{: #HatchStyleCross } | `4` | Horizontal and vertical lines that cross at 90 degrees. | +| **HatchStyleDiagonalCross**{: #HatchStyleDiagonalCross } | `5` | Forward and backward diagonal lines that cross at 90 degrees, antialiased. | +| **HatchStyle05Percent**{: #HatchStyle05Percent } | `6` | A 5 percent hatch. The ratio of foreground colour to background colour is 5:100. | +| **HatchStyle10Percent**{: #HatchStyle10Percent } | `7` | A 10 percent hatch. The ratio of foreground colour to background colour is 10:100. | +| **HatchStyle20Percent**{: #HatchStyle20Percent } | `8` | A 20 percent hatch. The ratio of foreground colour to background colour is 20:100. | +| **HatchStyle25Percent**{: #HatchStyle25Percent } | `9` | A 25 percent hatch. The ratio of foreground colour to background colour is 25:100. | +| **HatchStyle30Percent**{: #HatchStyle30Percent } | `10` | A 30 percent hatch. The ratio of foreground colour to background colour is 30:100. | +| **HatchStyle40Percent**{: #HatchStyle40Percent } | `11` | A 40 percent hatch. The ratio of foreground colour to background colour is 40:100. | +| **HatchStyle50Percent**{: #HatchStyle50Percent } | `12` | A 50 percent hatch. The ratio of foreground colour to background colour is 50:100. | +| **HatchStyle60Percent**{: #HatchStyle60Percent } | `13` | A 60 percent hatch. The ratio of foreground colour to background colour is 60:100. | +| **HatchStyle70Percent**{: #HatchStyle70Percent } | `14` | A 70 percent hatch. The ratio of foreground colour to background colour is 70:100. | +| **HatchStyle75Percent**{: #HatchStyle75Percent } | `15` | A 75 percent hatch. The ratio of foreground colour to background colour is 75:100. | +| **HatchStyle80Percent**{: #HatchStyle80Percent } | `16` | An 80 percent hatch. The ratio of foreground colour to background colour is 80:100. | +| **HatchStyle90Percent**{: #HatchStyle90Percent } | `17` | A 90 percent hatch. The ratio of foreground colour to background colour is 90:100. | +| **HatchStyleLightDownwardDiagonal**{: #HatchStyleLightDownwardDiagonal } | `18` | Diagonal lines that slant to the right from the top to the bottom, spaced 50 percent closer together than **HatchStyleForwardDiagonal** and not antialiased. | +| **HatchStyleLightUpwardDiagonal**{: #HatchStyleLightUpwardDiagonal } | `19` | Diagonal lines that slant to the left from the top to the bottom, spaced 50 percent closer together than **HatchStyleBackwardDiagonal** and not antialiased. | +| **HatchStyleDarkDownwardDiagonal**{: #HatchStyleDarkDownwardDiagonal } | `20` | Like **HatchStyleLightDownwardDiagonal**, and twice the width of **HatchStyleForwardDiagonal**. | +| **HatchStyleDarkUpwardDiagonal**{: #HatchStyleDarkUpwardDiagonal } | `21` | Like **HatchStyleLightUpwardDiagonal**, and twice the width of **HatchStyleBackwardDiagonal**. | +| **HatchStyleWideDownwardDiagonal**{: #HatchStyleWideDownwardDiagonal } | `22` | Diagonal lines that slant to the right from the top to the bottom, with the spacing of **HatchStyleForwardDiagonal** and three times its width, not antialiased. | +| **HatchStyleWideUpwardDiagonal**{: #HatchStyleWideUpwardDiagonal } | `23` | Diagonal lines that slant to the left from the top to the bottom, with the spacing of **HatchStyleBackwardDiagonal** and three times its width, not antialiased. | +| **HatchStyleLightVertical**{: #HatchStyleLightVertical } | `24` | Vertical lines spaced 50 percent closer together than **HatchStyleVertical**. | +| **HatchStyleLightHorizontal**{: #HatchStyleLightHorizontal } | `25` | Horizontal lines spaced 50 percent closer together than **HatchStyleHorizontal**. | +| **HatchStyleNarrowVertical**{: #HatchStyleNarrowVertical } | `26` | Vertical lines spaced 75 percent closer together than **HatchStyleVertical**. | +| **HatchStyleNarrowHorizontal**{: #HatchStyleNarrowHorizontal } | `27` | Horizontal lines spaced 75 percent closer together than **HatchStyleHorizontal**. | +| **HatchStyleDarkVertical**{: #HatchStyleDarkVertical } | `28` | Vertical lines spaced 50 percent closer together than **HatchStyleVertical** and twice its width. | +| **HatchStyleDarkHorizontal**{: #HatchStyleDarkHorizontal } | `29` | Horizontal lines spaced 50 percent closer together than **HatchStyleHorizontal** and twice its width. | +| **HatchStyleDashedDownwardDiagonal**{: #HatchStyleDashedDownwardDiagonal } | `30` | Horizontal lines made of forward diagonals, like a row of slash characters. | +| **HatchStyleDashedUpwardDiagonal**{: #HatchStyleDashedUpwardDiagonal } | `31` | Horizontal lines made of backward diagonals, like a row of backslash characters. | +| **HatchStyleDashedHorizontal**{: #HatchStyleDashedHorizontal } | `32` | Dashed horizontal lines. | +| **HatchStyleDashedVertical**{: #HatchStyleDashedVertical } | `33` | Dashed vertical lines. | +| **HatchStyleSmallConfetti**{: #HatchStyleSmallConfetti } | `34` | A pattern that looks like confetti. | +| **HatchStyleLargeConfetti**{: #HatchStyleLargeConfetti } | `35` | A pattern that looks like confetti made of larger pieces than **HatchStyleSmallConfetti**. | +| **HatchStyleZigZag**{: #HatchStyleZigZag } | `36` | Horizontal lines of zigzags. | +| **HatchStyleWave**{: #HatchStyleWave } | `37` | Horizontal lines of tildes. | +| **HatchStyleDiagonalBrick**{: #HatchStyleDiagonalBrick } | `38` | A pattern that looks like a wall of bricks laid in a backward diagonal direction. | +| **HatchStyleHorizontalBrick**{: #HatchStyleHorizontalBrick } | `39` | A pattern that looks like a wall of bricks laid horizontally. | +| **HatchStyleWeave**{: #HatchStyleWeave } | `40` | A pattern that looks like woven material. | +| **HatchStylePlaid**{: #HatchStylePlaid } | `41` | A pattern that looks like plaid material. | +| **HatchStyleDivot**{: #HatchStyleDivot } | `42` | A pattern that looks like divots. | +| **HatchStyleDottedGrid**{: #HatchStyleDottedGrid } | `43` | Horizontal and vertical dotted lines that cross at 90 degrees. | +| **HatchStyleDottedDiamond**{: #HatchStyleDottedDiamond } | `44` | Forward and backward diagonal dotted lines that cross at 90 degrees. | +| **HatchStyleShingle**{: #HatchStyleShingle } | `45` | A pattern that looks like shingles laid in a forward diagonal direction. | +| **HatchStyleTrellis**{: #HatchStyleTrellis } | `46` | A pattern that looks like a trellis. | +| **HatchStyleSphere**{: #HatchStyleSphere } | `47` | A pattern that looks like a checkerboard of spheres. | +| **HatchStyleSmallGrid**{: #HatchStyleSmallGrid } | `48` | Horizontal and vertical lines that cross at 90 degrees, spaced 50 percent closer together than **HatchStyleCross**. | +| **HatchStyleSmallCheckerBoard**{: #HatchStyleSmallCheckerBoard } | `49` | A pattern that looks like a checkerboard. | +| **HatchStyleLargeCheckerBoard**{: #HatchStyleLargeCheckerBoard } | `50` | A checkerboard with squares twice the size of **HatchStyleSmallCheckerBoard**. | +| **HatchStyleOutlinedDiamond**{: #HatchStyleOutlinedDiamond } | `51` | Forward and backward diagonal lines that cross at 90 degrees and are not antialiased. | +| **HatchStyleSolidDiamond**{: #HatchStyleSolidDiamond } | `52` | A pattern that looks like a checkerboard placed diagonally. | +| **HatchStyleTotal**{: #HatchStyleTotal } | `53` | The number of hatch styles. It is not a pattern. | +| **HatchStyleLargeGrid**{: #HatchStyleLargeGrid } | `4` | Same value as **HatchStyleCross**. | +| **HatchStyleMin**{: #HatchStyleMin } | `0` | The lowest hatch style, same value as **HatchStyleHorizontal**. | +| **HatchStyleMax**{: #HatchStyleMax } | `52` | The highest hatch style, same value as **HatchStyleSolidDiamond**. | + +## Used by + +- [**HatchBrush**](../HatchBrush) class: [**HatchStyle**](../HatchBrush#hatchstyle), [constructor](../HatchBrush#creating) + +## See Also + +- [HatchStyle](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusenums/ne-gdiplusenums-hatchstyle) -- Microsoft's documentation of the GDI+ enumeration +- [Enumerations](.) -- all the enumerations of the package +- [HatchBrush](../HatchBrush) class diff --git a/docs/Reference/Contributed/GdiPlus/Enumerations/GpHotkeyPrefix.md b/docs/Reference/Contributed/GdiPlus/Enumerations/GpHotkeyPrefix.md new file mode 100644 index 00000000..c3f127fb --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Enumerations/GpHotkeyPrefix.md @@ -0,0 +1,27 @@ +--- +title: GpHotkeyPrefix +parent: Enumerations +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Enumerations/GpHotkeyPrefix +--- + +# GpHotkeyPrefix enumeration +{: .no_toc } + +Specifies how the ampersand prefix of a hot key in a string is displayed. + +| Member | Value | Description | +|:-------|:------|:------------| +| **HotkeyPrefixNone**{: #HotkeyPrefixNone } | `0` | No hot key processing. An ampersand is displayed like any other character. | +| **HotkeyPrefixShow**{: #HotkeyPrefixShow } | `1` | The ampersand is removed and the character after it is underlined. | +| **HotkeyPrefixHide**{: #HotkeyPrefixHide } | `2` | The ampersand is removed and no character is underlined. | + +## Used by + +- [**StringFormat**](../StringFormat) class: [**HotkeyPrefix**](../StringFormat#hotkeyprefix) + +## See Also + +- [HotkeyPrefix](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusenums/ne-gdiplusenums-hotkeyprefix) -- Microsoft's documentation of the GDI+ enumeration +- [Enumerations](.) -- all the enumerations of the package +- [StringFormat](../StringFormat) class diff --git a/docs/Reference/Contributed/GdiPlus/Enumerations/GpImageCodecFlags.md b/docs/Reference/Contributed/GdiPlus/Enumerations/GpImageCodecFlags.md new file mode 100644 index 00000000..06ec6662 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Enumerations/GpImageCodecFlags.md @@ -0,0 +1,34 @@ +--- +title: GpImageCodecFlags +parent: Enumerations +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Enumerations/GpImageCodecFlags +--- + +# GpImageCodecFlags enumeration +{: .no_toc } + +Indicates attributes of an image codec. + +The members combine with **Or**. A codec has several of them. The **Flags** field of a **ImageCodecInfo** holds them. + +| Member | Value | Description | +|:-------|:------|:------------| +| **ImageCodecFlagsEncoder**{: #ImageCodecFlagsEncoder } | `&H00000001` | The codec supports encoding, saving an image to a file or a stream. | +| **ImageCodecFlagsDecoder**{: #ImageCodecFlagsDecoder } | `&H00000002` | The codec supports decoding, reading an image from a file or a stream. | +| **ImageCodecFlagsSupportBitmap**{: #ImageCodecFlagsSupportBitmap } | `&H00000004` | The codec supports raster images, bitmaps. | +| **ImageCodecFlagsSupportVector**{: #ImageCodecFlagsSupportVector } | `&H00000008` | The codec supports vector images, metafiles. | +| **ImageCodecFlagsSeekableEncode**{: #ImageCodecFlagsSeekableEncode } | `&H00000010` | The encoder requires a seekable output stream. | +| **ImageCodecFlagsBlockingDecode**{: #ImageCodecFlagsBlockingDecode } | `&H00000020` | The decoder has blocking behaviour during the decoding process. | +| **ImageCodecFlagsBuiltin**{: #ImageCodecFlagsBuiltin } | `&H00010000` | The codec is built into GDI+. | +| **ImageCodecFlagsSystem**{: #ImageCodecFlagsSystem } | `&H00020000` | The codec is supplied by the system. | +| **ImageCodecFlagsUser**{: #ImageCodecFlagsUser } | `&H00040000` | The codec is supplied by the user. | + +## Used by + +- [**GpImageCodecInfo**](../Types/GpImageCodecInfo) type: **Flags** + +## See Also + +- [ImageCodecFlags](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusimaging/ne-gdiplusimaging-imagecodecflags) -- Microsoft's documentation of the GDI+ enumeration +- [Enumerations](.) -- all the enumerations of the package diff --git a/docs/Reference/Contributed/GdiPlus/Enumerations/GpImageType.md b/docs/Reference/Contributed/GdiPlus/Enumerations/GpImageType.md new file mode 100644 index 00000000..5452e749 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Enumerations/GpImageType.md @@ -0,0 +1,27 @@ +--- +title: GpImageType +parent: Enumerations +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Enumerations/GpImageType +--- + +# GpImageType enumeration +{: .no_toc } + +Says whether an image is a bitmap or a metafile. + +| Member | Value | Description | +|:-------|:------|:------------| +| **ImageTypeUnknown**{: #ImageTypeUnknown } | `0` | The image is of an unknown type. | +| **ImageTypeBitmap**{: #ImageTypeBitmap } | `1` | The image is a bitmap. | +| **ImageTypeMetafile**{: #ImageTypeMetafile } | `2` | The image is a metafile. | + +## Used by + +- [**Image**](../Image) class: [**Type**](../Image#type) + +## See Also + +- [ImageType](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusenums/ne-gdiplusenums-imagetype) -- Microsoft's documentation of the GDI+ enumeration +- [Enumerations](.) -- all the enumerations of the package +- [Image](../Image) class diff --git a/docs/Reference/Contributed/GdiPlus/Enumerations/GpInterpolationMode.md b/docs/Reference/Contributed/GdiPlus/Enumerations/GpInterpolationMode.md new file mode 100644 index 00000000..625d041c --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Enumerations/GpInterpolationMode.md @@ -0,0 +1,57 @@ +--- +title: GpInterpolationMode +parent: Enumerations +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Enumerations/GpInterpolationMode +--- + +# GpInterpolationMode enumeration +{: .no_toc } + +Specifies the algorithm that is used when images are scaled or rotated. + +The setting is the **InterpolationMode** property of [**Graphics**](../Graphics). The first four members have the values of [GpQualityMode](GpQualityMode). + +> [!NOTE] timeless +> GDI+ replaces some of the values when they are set. A **Graphics** object that was given **InterpolationModeHighQuality** returns **InterpolationModeHighQualityBicubic** when the property is read again, and one that was given **InterpolationModeLowQuality** or **InterpolationModeDefault** returns **InterpolationModeBilinear**. + +| Member | Value | Description | +|:-------|:------|:------------| +| **InterpolationModeInvalid**{: #InterpolationModeInvalid } | `-1` | Used internally. | +| **InterpolationModeDefault**{: #InterpolationModeDefault } | `0` | The default mode. | +| **InterpolationModeLowQuality**{: #InterpolationModeLowQuality } | `1` | A low-quality mode. | +| **InterpolationModeHighQuality**{: #InterpolationModeHighQuality } | `2` | A high-quality mode. | +| **InterpolationModeBilinear**{: #InterpolationModeBilinear } | `3` | Bilinear interpolation, with no prefiltering. It is not suitable for shrinking an image below 50 percent of its original size. | +| **InterpolationModeBicubic**{: #InterpolationModeBicubic } | `4` | Bicubic interpolation, with no prefiltering. It is not suitable for shrinking an image below 25 percent of its original size. | +| **InterpolationModeNearestNeighbor**{: #InterpolationModeNearestNeighbor } | `5` | Nearest-neighbour interpolation. | +| **InterpolationModeHighQualityBilinear**{: #InterpolationModeHighQualityBilinear } | `6` | High-quality bilinear interpolation. Prefiltering ensures high-quality shrinking. | +| **InterpolationModeHighQualityBicubic**{: #InterpolationModeHighQualityBicubic } | `7` | High-quality bicubic interpolation. Prefiltering ensures high-quality shrinking. This mode gives the highest quality of the transformed images. | + +## Used by + +- [**Graphics**](../Graphics) class: [**InterpolationMode**](../Graphics#interpolationmode) + +## Example + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim bmp As Bitmap = Bitmap(8!, 8!) +Dim g As Graphics = Graphics(bmp) + +g.InterpolationMode = InterpolationModeHighQuality +Debug.Print g.InterpolationMode = InterpolationModeHighQualityBicubic +g.InterpolationMode = InterpolationModeLowQuality +Debug.Print g.InterpolationMode = InterpolationModeBilinear +g.InterpolationMode = InterpolationModeNearestNeighbor +Debug.Print g.InterpolationMode = InterpolationModeNearestNeighbor +' Output: +' True +' True +' True +``` + +## See Also + +- [InterpolationMode](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusenums/ne-gdiplusenums-interpolationmode) -- Microsoft's documentation of the GDI+ enumeration +- [Enumerations](.) -- all the enumerations of the package +- [Graphics](../Graphics) class diff --git a/docs/Reference/Contributed/GdiPlus/Enumerations/GpLineCap.md b/docs/Reference/Contributed/GdiPlus/Enumerations/GpLineCap.md new file mode 100644 index 00000000..a3f1dd7f --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Enumerations/GpLineCap.md @@ -0,0 +1,39 @@ +--- +title: GpLineCap +parent: Enumerations +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Enumerations/GpLineCap +--- + +# GpLineCap enumeration +{: .no_toc } + +Selects the shape at the end of a line drawn with a pen. + +A cap can be a plain end, or an anchor: a shape centred on the last point of the line that is wider than the line. Only the lowest 8 bits of a value are used. **LineCapAnchorMask** is the mask that the GDI+ header gives for checking whether a cap is an anchor. + +| Member | Value | Description | +|:-------|:------|:------------| +| **LineCapFlat**{: #LineCapFlat } | `0` | The line ends at the last point; the end is squared off. | +| **LineCapSquare**{: #LineCapSquare } | `1` | A square cap. Its centre is the last point of the line, and its sides equal the line width. | +| **LineCapRound**{: #LineCapRound } | `2` | A round cap. Its centre is the last point of the line, and its diameter equals the line width. | +| **LineCapTriangle**{: #LineCapTriangle } | `3` | A triangular cap. Its base is at the last point of the line and equals the line width. | +| **LineCapNoAnchor**{: #LineCapNoAnchor } | `&H10` | No anchor. The end looks like **LineCapFlat**. | +| **LineCapSquareAnchor**{: #LineCapSquareAnchor } | `&H11` | An anchor in the shape of a square, centred on the last point of the line. It is wider than the line. | +| **LineCapRoundAnchor**{: #LineCapRoundAnchor } | `&H12` | An anchor in the shape of a circle, centred on the last point of the line. It is wider than the line. | +| **LineCapDiamondAnchor**{: #LineCapDiamondAnchor } | `&H13` | An anchor in the shape of a diamond (a square turned 45 degrees), centred on the last point of the line. | +| **LineCapArrowAnchor**{: #LineCapArrowAnchor } | `&H14` | An arrowhead whose point is at the last point of the line. It is wider than the line. | +| **LineCapCustom**{: #LineCapCustom } | `&HFF` | A cap made from a [**CustomLineCap**](../CustomLineCap) set on the pen. | +| **LineCapAnchorMask**{: #LineCapAnchorMask } | `&HF0` | A mask for the anchor bits, used to test whether a cap is an anchor. It is not a cap. | + +## Used by + +- [**CustomLineCap**](../CustomLineCap) class: [**BaseCap**](../CustomLineCap#basecap), [**EndStrokeCap**](../CustomLineCap#endstrokecap), [**GetStrokeCaps**](../CustomLineCap#getstrokecaps), [**SetStrokeCaps**](../CustomLineCap#setstrokecaps), [**StartStrokeCap**](../CustomLineCap#startstrokecap), [**StrokeCap**](../CustomLineCap#strokecap), [constructor](../CustomLineCap#creating) +- [**Pen**](../Pen) class: [**Caps**](../Pen#caps), [**DashCap**](../Pen#dashcap), [**EndCap**](../Pen#endcap), [**SetLineCap**](../Pen#setlinecap), [**StartCap**](../Pen#startcap) + +## See Also + +- [LineCap](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusenums/ne-gdiplusenums-linecap) -- Microsoft's documentation of the GDI+ enumeration +- [Enumerations](.) -- all the enumerations of the package +- [CustomLineCap](../CustomLineCap) class +- [Pen](../Pen) class diff --git a/docs/Reference/Contributed/GdiPlus/Enumerations/GpLineJoin.md b/docs/Reference/Contributed/GdiPlus/Enumerations/GpLineJoin.md new file mode 100644 index 00000000..139a4c53 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Enumerations/GpLineJoin.md @@ -0,0 +1,30 @@ +--- +title: GpLineJoin +parent: Enumerations +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Enumerations/GpLineJoin +--- + +# GpLineJoin enumeration +{: .no_toc } + +Selects how two lines drawn by the same pen are joined where their ends meet. + +| Member | Value | Description | +|:-------|:------|:------------| +| **LineJoinMiter**{: #LineJoinMiter } | `0` | A mitered join, a sharp corner. When the miter is longer than the pen's miter limit, the join is beveled. | +| **LineJoinBevel**{: #LineJoinBevel } | `1` | A beveled join, a diagonal corner. | +| **LineJoinRound**{: #LineJoinRound } | `2` | A rounded join, a circular arc between the two lines. | +| **LineJoinMiterClipped**{: #LineJoinMiterClipped } | `3` | A mitered join that is clipped at the miter limit instead of being beveled. | + +## Used by + +- [**CustomLineCap**](../CustomLineCap) class: [**StrokeJoin**](../CustomLineCap#strokejoin) +- [**Pen**](../Pen) class: [**LineJoin**](../Pen#linejoin) + +## See Also + +- [LineJoin](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusenums/ne-gdiplusenums-linejoin) -- Microsoft's documentation of the GDI+ enumeration +- [Enumerations](.) -- all the enumerations of the package +- [CustomLineCap](../CustomLineCap) class +- [Pen](../Pen) class diff --git a/docs/Reference/Contributed/GdiPlus/Enumerations/GpLinearGradientMode.md b/docs/Reference/Contributed/GdiPlus/Enumerations/GpLinearGradientMode.md new file mode 100644 index 00000000..ff0477fa --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Enumerations/GpLinearGradientMode.md @@ -0,0 +1,28 @@ +--- +title: GpLinearGradientMode +parent: Enumerations +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Enumerations/GpLinearGradientMode +--- + +# GpLinearGradientMode enumeration +{: .no_toc } + +Selects the direction in which the colour of a linear gradient brush changes. + +| Member | Value | Description | +|:-------|:------|:------------| +| **LinearGradientModeHorizontal**{: #LinearGradientModeHorizontal } | `0` | The colour changes from left to right. | +| **LinearGradientModeVertical**{: #LinearGradientModeVertical } | `1` | The colour changes from top to bottom. | +| **LinearGradientModeForwardDiagonal**{: #LinearGradientModeForwardDiagonal } | `2` | The colour changes from the upper left corner to the lower right corner. | +| **LinearGradientModeBackwardDiagonal**{: #LinearGradientModeBackwardDiagonal } | `3` | The colour changes from the upper right corner to the lower left corner. | + +## Used by + +- [**LinearGradientBrush**](../LinearGradientBrush) class: [constructor](../LinearGradientBrush#creating) + +## See Also + +- [LinearGradientMode](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusenums/ne-gdiplusenums-lineargradientmode) -- Microsoft's documentation of the GDI+ enumeration +- [Enumerations](.) -- all the enumerations of the package +- [LinearGradientBrush](../LinearGradientBrush) class diff --git a/docs/Reference/Contributed/GdiPlus/Enumerations/GpMatrixOrder.md b/docs/Reference/Contributed/GdiPlus/Enumerations/GpMatrixOrder.md new file mode 100644 index 00000000..3e6aba9a --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Enumerations/GpMatrixOrder.md @@ -0,0 +1,59 @@ +--- +title: GpMatrixOrder +parent: Enumerations +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Enumerations/GpMatrixOrder +--- + +# GpMatrixOrder enumeration +{: .no_toc } + +Selects the order of multiplication when a new transformation is combined with an existing one. + +Each transformation method takes an *order* argument that defaults to **MatrixOrderPrepend**. The order matters because matrix multiplication does not commute: translating then scaling gives a different result than scaling then translating. + +| Member | Value | Description | +|:-------|:------|:------------| +| **MatrixOrderPrepend**{: #MatrixOrderPrepend } | `0` | The new transformation is applied before the existing one. The new matrix is the left operand. | +| **MatrixOrderAppend**{: #MatrixOrderAppend } | `1` | The new transformation is applied after the existing one. The new matrix is the right operand. | + +## Used by + +- [**Graphics**](../Graphics) class: [**MultiplyTransform**](../Graphics#multiplytransform), [**RotateTransform**](../Graphics#rotatetransform), [**RotateTransformAt**](../Graphics#rotatetransformat), [**ScaleTransform**](../Graphics#scaletransform), [**ShearTransform**](../Graphics#sheartransform), [**TranslateTransform**](../Graphics#translatetransform) +- [**ITransformable**](../ITransformable) interface: [**MultiplyTransform**](../ITransformable#multiplytransform), [**RotateTransform**](../ITransformable#rotatetransform), [**RotateTransformAt**](../ITransformable#rotatetransformat), [**ScaleTransform**](../ITransformable#scaletransform), [**ShearTransform**](../ITransformable#sheartransform), [**TranslateTransform**](../ITransformable#translatetransform) +- [**LinearGradientBrush**](../LinearGradientBrush) class: [**MultiplyTransform**](../LinearGradientBrush#multiplytransform), [**RotateTransform**](../LinearGradientBrush#rotatetransform), [**RotateTransformAt**](../LinearGradientBrush#rotatetransformat), [**ScaleTransform**](../LinearGradientBrush#scaletransform), [**ShearTransform**](../LinearGradientBrush#sheartransform), [**TranslateTransform**](../LinearGradientBrush#translatetransform) +- [**Matrix**](../Matrix) class: [**Multiply**](../Matrix#multiply), [**Rotate**](../Matrix#rotate), [**RotateAt**](../Matrix#rotateat), [**Scale**](../Matrix#scale), [**Shear**](../Matrix#shear), [**Translate**](../Matrix#translate) +- [**PathGradientBrush**](../PathGradientBrush) class: [**MultiplyTransform**](../PathGradientBrush#multiplytransform), [**RotateTransform**](../PathGradientBrush#rotatetransform), [**RotateTransformAt**](../PathGradientBrush#rotatetransformat), [**ScaleTransform**](../PathGradientBrush#scaletransform), [**ShearTransform**](../PathGradientBrush#sheartransform), [**TranslateTransform**](../PathGradientBrush#translatetransform) +- [**Pen**](../Pen) class: [**MultiplyTransform**](../Pen#multiplytransform), [**RotateTransform**](../Pen#rotatetransform), [**ScaleTransform**](../Pen#scaletransform), [**TranslateTransform**](../Pen#translatetransform) +- [**TextureBrush**](../TextureBrush) class: [**MultiplyTransform**](../TextureBrush#multiplytransform), [**RotateTransform**](../TextureBrush#rotatetransform), [**RotateTransformAt**](../TextureBrush#rotatetransformat), [**ScaleTransform**](../TextureBrush#scaletransform), [**ShearTransform**](../TextureBrush#sheartransform), [**TranslateTransform**](../TextureBrush#translatetransform) + +## Example + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +' Translate by (10, 20), then scale by (2, 3). +Dim before As Matrix = Matrix() +before.Translate 10, 20 +before.Scale 2, 3, MatrixOrderPrepend +Debug.Print before.OffsetX, before.OffsetY + +Dim after As Matrix = Matrix() +after.Translate 10, 20 +after.Scale 2, 3, MatrixOrderAppend +Debug.Print after.OffsetX, after.OffsetY +' Output: +' 10 20 +' 20 60 +``` + +With **MatrixOrderPrepend** the scaling is applied to a point before the translation, so the translation is unchanged. With **MatrixOrderAppend** the scaling is applied after the translation, so it scales the offset too. + +## See Also + +- [MatrixOrder](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusenums/ne-gdiplusenums-matrixorder) -- Microsoft's documentation of the GDI+ enumeration +- [Enumerations](.) -- all the enumerations of the package +- [Graphics](../Graphics) class +- [ITransformable](../ITransformable) interface +- [LinearGradientBrush](../LinearGradientBrush) class +- [Matrix](../Matrix) class diff --git a/docs/Reference/Contributed/GdiPlus/Enumerations/GpMetafileFrameUnit.md b/docs/Reference/Contributed/GdiPlus/Enumerations/GpMetafileFrameUnit.md new file mode 100644 index 00000000..d6aa3557 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Enumerations/GpMetafileFrameUnit.md @@ -0,0 +1,32 @@ +--- +title: GpMetafileFrameUnit +parent: Enumerations +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Enumerations/GpMetafileFrameUnit +--- + +# GpMetafileFrameUnit enumeration +{: .no_toc } + +Specifies the unit of measure of the frame rectangle of a metafile. + +The first five members have the values of the matching members of [GpUnit](GpUnit). + +| Member | Value | Description | +|:-------|:------|:------------| +| **MetafileFrameUnitPixel**{: #MetafileFrameUnitPixel } | `2` | One pixel. | +| **MetafileFrameUnitPoint**{: #MetafileFrameUnitPoint } | `3` | One point, 1/72 inch. | +| **MetafileFrameUnitInch**{: #MetafileFrameUnitInch } | `4` | One inch. | +| **MetafileFrameUnitDocument**{: #MetafileFrameUnitDocument } | `5` | One document unit, 1/300 inch. | +| **MetafileFrameUnitMillimeter**{: #MetafileFrameUnitMillimeter } | `6` | One millimetre. | +| **MetafileFrameUnitGdi**{: #MetafileFrameUnitGdi } | `7` | 0.01 millimetre, the unit that GDI uses for the frame of an enhanced metafile. | + +## Used by + +- [**Metafile**](../Metafile) class: [constructor](../Metafile#creating) + +## See Also + +- [MetafileFrameUnit](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusenums/ne-gdiplusenums-metafileframeunit) -- Microsoft's documentation of the GDI+ enumeration +- [Enumerations](.) -- all the enumerations of the package +- [Metafile](../Metafile) class diff --git a/docs/Reference/Contributed/GdiPlus/Enumerations/GpMetafileFunctions.md b/docs/Reference/Contributed/GdiPlus/Enumerations/GpMetafileFunctions.md new file mode 100644 index 00000000..6be7868b --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Enumerations/GpMetafileFunctions.md @@ -0,0 +1,102 @@ +--- +title: GpMetafileFunctions +parent: Enumerations +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Enumerations/GpMetafileFunctions +--- + +# GpMetafileFunctions enumeration +{: .no_toc } + +Gives the function numbers of the records of a Windows metafile (WMF), the **META_** constants of the Windows header files. + +Each record of a Windows metafile begins with a function number. Most records store one GDI call, and the name of the member says which: **META_ELLIPSE** stores an **Ellipse** call. The upper byte of a number is the size of the parameters in words, so the numbers are not consecutive. The members after **META_SETLAYOUT** and **META_DELETEOBJECT** are in a separate group in the source; the ones from **META_DRAWTEXT** on are missing from the current Windows SDK, and **META_UNKNOWN** is a number the package keeps for a record it does not know. [GpEmfPlusRecordType](GpEmfPlusRecordType) combines these numbers with `&H10000` in its **WmfRecordType** members. + +| Member | Value | +|:-------|:------| +| **META_SETBKCOLOR**{: #META_SETBKCOLOR } | `&H0201` | +| **META_SETBKMODE**{: #META_SETBKMODE } | `&H0102` | +| **META_SETMAPMODE**{: #META_SETMAPMODE } | `&H0103` | +| **META_SETROP2**{: #META_SETROP2 } | `&H0104` | +| **META_SETRELABS**{: #META_SETRELABS } | `&H0105` | +| **META_SETPOLYFILLMODE**{: #META_SETPOLYFILLMODE } | `&H0106` | +| **META_SETSTRETCHBLTMODE**{: #META_SETSTRETCHBLTMODE } | `&H0107` | +| **META_SETTEXTCHAREXTRA**{: #META_SETTEXTCHAREXTRA } | `&H0108` | +| **META_SETTEXTCOLOR**{: #META_SETTEXTCOLOR } | `&H0209` | +| **META_SETTEXTJUSTIFICATION**{: #META_SETTEXTJUSTIFICATION } | `&H020A` | +| **META_SETWINDOWORG**{: #META_SETWINDOWORG } | `&H020B` | +| **META_SETWINDOWEXT**{: #META_SETWINDOWEXT } | `&H020C` | +| **META_SETVIEWPORTORG**{: #META_SETVIEWPORTORG } | `&H020D` | +| **META_SETVIEWPORTEXT**{: #META_SETVIEWPORTEXT } | `&H020E` | +| **META_OFFSETWINDOWORG**{: #META_OFFSETWINDOWORG } | `&H020F` | +| **META_SCALEWINDOWEXT**{: #META_SCALEWINDOWEXT } | `&H0410` | +| **META_OFFSETVIEWPORTORG**{: #META_OFFSETVIEWPORTORG } | `&H0211` | +| **META_SCALEVIEWPORTEXT**{: #META_SCALEVIEWPORTEXT } | `&H0412` | +| **META_LINETO**{: #META_LINETO } | `&H0213` | +| **META_MOVETO**{: #META_MOVETO } | `&H0214` | +| **META_EXCLUDECLIPRECT**{: #META_EXCLUDECLIPRECT } | `&H0415` | +| **META_INTERSECTCLIPRECT**{: #META_INTERSECTCLIPRECT } | `&H0416` | +| **META_ARC**{: #META_ARC } | `&H0817` | +| **META_ELLIPSE**{: #META_ELLIPSE } | `&H0418` | +| **META_FLOODFILL**{: #META_FLOODFILL } | `&H0419` | +| **META_PIE**{: #META_PIE } | `&H081A` | +| **META_RECTANGLE**{: #META_RECTANGLE } | `&H041B` | +| **META_ROUNDRECT**{: #META_ROUNDRECT } | `&H061C` | +| **META_PATBLT**{: #META_PATBLT } | `&H061D` | +| **META_SAVEDC**{: #META_SAVEDC } | `&H001E` | +| **META_SETPIXEL**{: #META_SETPIXEL } | `&H041F` | +| **META_OFFSETCLIPRGN**{: #META_OFFSETCLIPRGN } | `&H0220` | +| **META_TEXTOUT**{: #META_TEXTOUT } | `&H0521` | +| **META_BITBLT**{: #META_BITBLT } | `&H0922` | +| **META_STRETCHBLT**{: #META_STRETCHBLT } | `&H0B23` | +| **META_POLYGON**{: #META_POLYGON } | `&H0324` | +| **META_POLYLINE**{: #META_POLYLINE } | `&H0325` | +| **META_ESCAPE**{: #META_ESCAPE } | `&H0626` | +| **META_RESTOREDC**{: #META_RESTOREDC } | `&H0127` | +| **META_FILLREGION**{: #META_FILLREGION } | `&H0228` | +| **META_FRAMEREGION**{: #META_FRAMEREGION } | `&H0429` | +| **META_INVERTREGION**{: #META_INVERTREGION } | `&H012A` | +| **META_PAINTREGION**{: #META_PAINTREGION } | `&H012B` | +| **META_SELECTCLIPREGION**{: #META_SELECTCLIPREGION } | `&H012C` | +| **META_SELECTOBJECT**{: #META_SELECTOBJECT } | `&H012D` | +| **META_SETTEXTALIGN**{: #META_SETTEXTALIGN } | `&H012E` | +| **META_CHORD**{: #META_CHORD } | `&H0830` | +| **META_SETMAPPERFLAGS**{: #META_SETMAPPERFLAGS } | `&H0231` | +| **META_EXTTEXTOUT**{: #META_EXTTEXTOUT } | `&H0A32` | +| **META_SETDIBTODEV**{: #META_SETDIBTODEV } | `&H0D33` | +| **META_SELECTPALETTE**{: #META_SELECTPALETTE } | `&H0234` | +| **META_REALIZEPALETTE**{: #META_REALIZEPALETTE } | `&H0035` | +| **META_ANIMATEPALETTE**{: #META_ANIMATEPALETTE } | `&H0436` | +| **META_SETPALENTRIES**{: #META_SETPALENTRIES } | `&H0037` | +| **META_POLYPOLYGON**{: #META_POLYPOLYGON } | `&H0538` | +| **META_RESIZEPALETTE**{: #META_RESIZEPALETTE } | `&H0139` | +| **META_DIBBITBLT**{: #META_DIBBITBLT } | `&H0940` | +| **META_DIBSTRETCHBLT**{: #META_DIBSTRETCHBLT } | `&H0B41` | +| **META_DIBCREATEPATTERNBRUSH**{: #META_DIBCREATEPATTERNBRUSH } | `&H0142` | +| **META_STRETCHDIB**{: #META_STRETCHDIB } | `&H0F43` | +| **META_EXTFLOODFILL**{: #META_EXTFLOODFILL } | `&H0548` | +| **META_SETLAYOUT**{: #META_SETLAYOUT } | `&H0149` | +| **META_DELETEOBJECT**{: #META_DELETEOBJECT } | `&H01F0` | +| **META_CREATEPALETTE**{: #META_CREATEPALETTE } | `&H00F7` | +| **META_CREATEPATTERNBRUSH**{: #META_CREATEPATTERNBRUSH } | `&H01F9` | +| **META_CREATEPENINDIRECT**{: #META_CREATEPENINDIRECT } | `&H02FA` | +| **META_CREATEFONTINDIRECT**{: #META_CREATEFONTINDIRECT } | `&H02FB` | +| **META_CREATEBRUSHINDIRECT**{: #META_CREATEBRUSHINDIRECT } | `&H02FC` | +| **META_CREATEREGION**{: #META_CREATEREGION } | `&H06FF` | +| **META_DRAWTEXT**{: #META_DRAWTEXT } | `&H062F` | +| **META_RESETDC**{: #META_RESETDC } | `&H014C` | +| **META_STARTDOC**{: #META_STARTDOC } | `&H014D` | +| **META_STARTPAGE**{: #META_STARTPAGE } | `&H004F` | +| **META_ENDPAGE**{: #META_ENDPAGE } | `&H0050` | +| **META_ABORTDOC**{: #META_ABORTDOC } | `&H0052` | +| **META_ENDDOC**{: #META_ENDDOC } | `&H005E` | +| **META_CREATEBRUSH**{: #META_CREATEBRUSH } | `&H00F8` | +| **META_CREATEBITMAPINDIRECT**{: #META_CREATEBITMAPINDIRECT } | `&H02FD` | +| **META_CREATEBITMAP**{: #META_CREATEBITMAP } | `&H06FE` | +| **META_UNKNOWN**{: #META_UNKNOWN } | `&H0529` | + +No public member of the package takes or returns this enumeration. + +## See Also + +- [Enumerations](.) -- all the enumerations of the package diff --git a/docs/Reference/Contributed/GdiPlus/Enumerations/GpMetafileType.md b/docs/Reference/Contributed/GdiPlus/Enumerations/GpMetafileType.md new file mode 100644 index 00000000..e9392588 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Enumerations/GpMetafileType.md @@ -0,0 +1,29 @@ +--- +title: GpMetafileType +parent: Enumerations +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Enumerations/GpMetafileType +--- + +# GpMetafileType enumeration +{: .no_toc } + +Specifies the kind of a metafile. + +| Member | Value | Description | +|:-------|:------|:------------| +| **MetafileTypeInvalid**{: #MetafileTypeInvalid } | `0` | A metafile format that GDI+ does not recognise. | +| **MetafileTypeWmf**{: #MetafileTypeWmf } | `1` | A Windows metafile (WMF), which holds only GDI records. | +| **MetafileTypeWmfPlaceable**{: #MetafileTypeWmfPlaceable } | `2` | A WMF with a placeable metafile header in front of it. | +| **MetafileTypeEmf**{: #MetafileTypeEmf } | `3` | An enhanced metafile (EMF), which holds only GDI records. | +| **MetafileTypeEmfPlusOnly**{: #MetafileTypeEmfPlusOnly } | `4` | An EMF+ file, which holds only GDI+ records and must be displayed with GDI+. Displaying the records with GDI can give unpredictable results. | +| **MetafileTypeEmfPlusDual**{: #MetafileTypeEmfPlusDual } | `5` | An EMF+ Dual file, which holds GDI+ records and alternate GDI records. It can be displayed with GDI or GDI+. Displaying it with GDI can lower the quality. | + +## Used by + +- [**MetafileHeader**](../Types/MetafileHeader) type: **Type** + +## See Also + +- [MetafileType](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusenums/ne-gdiplusenums-metafiletype) -- Microsoft's documentation of the GDI+ enumeration +- [Enumerations](.) -- all the enumerations of the package diff --git a/docs/Reference/Contributed/GdiPlus/Enumerations/GpObjectType.md b/docs/Reference/Contributed/GdiPlus/Enumerations/GpObjectType.md new file mode 100644 index 00000000..fa93423b --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Enumerations/GpObjectType.md @@ -0,0 +1,38 @@ +--- +title: GpObjectType +parent: Enumerations +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Enumerations/GpObjectType +--- + +# GpObjectType enumeration +{: .no_toc } + +Indicates the type of the object that an EMF+ record holds. + +The function **ObjectTypeIsValid** tells whether a value is in the range from **ObjectTypeMin** to **ObjectTypeMax**. + +| Member | Value | Description | +|:-------|:------|:------------| +| **ObjectTypeInvalid**{: #ObjectTypeInvalid } | `0` | The object type is not valid. | +| **ObjectTypeBrush**{: #ObjectTypeBrush } | `1` | A brush. | +| **ObjectTypePen**{: #ObjectTypePen } | `2` | A pen. | +| **ObjectTypePath**{: #ObjectTypePath } | `3` | A path. | +| **ObjectTypeRegion**{: #ObjectTypeRegion } | `4` | A region. | +| **ObjectTypeImage**{: #ObjectTypeImage } | `5` | An image. | +| **ObjectTypeFont**{: #ObjectTypeFont } | `6` | A font. | +| **ObjectTypeStringFormat**{: #ObjectTypeStringFormat } | `7` | A string format. | +| **ObjectTypeImageAttributes**{: #ObjectTypeImageAttributes } | `8` | An image attributes object. | +| **ObjectTypeCustomLineCap**{: #ObjectTypeCustomLineCap } | `9` | A custom line cap. | +| **ObjectTypeGraphics**{: #ObjectTypeGraphics } | `10` | A graphics object. | +| **ObjectTypeMax**{: #ObjectTypeMax } | `10` | The highest object type, same as **ObjectTypeGraphics**. | +| **ObjectTypeMin**{: #ObjectTypeMin } | `1` | The lowest object type, same as **ObjectTypeBrush**. | + +## Used by + +- [Helper functions](../Helpers): **ObjectTypeIsValid** + +## See Also + +- [ObjectType](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusenums/ne-gdiplusenums-objecttype) -- Microsoft's documentation of the GDI+ enumeration +- [Enumerations](.) -- all the enumerations of the package diff --git a/docs/Reference/Contributed/GdiPlus/Enumerations/GpPathPointType.md b/docs/Reference/Contributed/GdiPlus/Enumerations/GpPathPointType.md new file mode 100644 index 00000000..a134a398 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Enumerations/GpPathPointType.md @@ -0,0 +1,61 @@ +--- +title: GpPathPointType +parent: Enumerations +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Enumerations/GpPathPointType +--- + +# GpPathPointType enumeration +{: .no_toc } + +Gives the type of a point of a path, and flags that describe it. + +Each point of a [**GraphicsPath**](../GraphicsPath) has a type byte. Bits 0 to 2 hold the type: **PathPointTypeStart**, **PathPointTypeLine** or **PathPointTypeBezier**. The higher bits are flags, and a type combines with them using **Or**. The package wraps the byte in the [**PathPointType**](../Types/PathPointType) type, whose **PointType** property returns the three low bits as a member of this enumeration, and whose **CloseSubpath**, **PathMarker** and **DashMode** properties return the flags as Boolean values. + +| Member | Value | Description | +|:-------|:------|:------------| +| **PathPointTypeStart**{: #PathPointTypeStart } | `0` | The point starts a figure. | +| **PathPointTypeLine**{: #PathPointTypeLine } | `1` | The point is one of the two ends of a line. | +| **PathPointTypeBezier**{: #PathPointTypeBezier } | `3` | The point is an end point or a control point of a cubic Bezier spline. | +| **PathPointTypePathTypeMask**{: #PathPointTypePathTypeMask } | `&H07` | A mask for the three low bits that hold the point type. | +| **PathPointTypeDashMode**{: #PathPointTypeDashMode } | `&H10` | Not used. | +| **PathPointTypePathMarker**{: #PathPointTypePathMarker } | `&H20` | The point is a marker. | +| **PathPointTypeCloseSubpath**{: #PathPointTypeCloseSubpath } | `&H80` | The point is the last point of a closed figure. | +| **PathPointTypeBezier3**{: #PathPointTypeBezier3 } | `3` | Same as **PathPointTypeBezier**: a cubic Bezier spline. | +| **PathPointTypeReserved**{: #PathPointTypeReserved } | `2` | Reserved. | +| **PathPointTypeReservedFlag1**{: #PathPointTypeReservedFlag1 } | `&H08` | Reserved. | +| **PathPointTypeReservedFlag2**{: #PathPointTypeReservedFlag2 } | `&H40` | Reserved. | + +## Used by + +- [**PathPointType**](../Types/PathPointType) type: **PointType** + +## Example + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim path As GraphicsPath = GraphicsPath() +path.AddRectangle(1, 1, 5, 5) + +Dim types() As PathPointType +path.GetTypes types + +Dim t As PathPointType +Dim i As Long +For i = LBound(types) To UBound(types) + t = types(i) + Debug.Print CLng(t.PointType) & " " & t.CloseSubpath +Next +' Output: +' 0 False +' 1 False +' 1 False +' 1 True +``` + +A rectangle has four points. The last one is a line point that also closes the figure. + +## See Also + +- [PathPointType](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusenums/ne-gdiplusenums-pathpointtype) -- Microsoft's documentation of the GDI+ enumeration +- [Enumerations](.) -- all the enumerations of the package diff --git a/docs/Reference/Contributed/GdiPlus/Enumerations/GpPenAlignment.md b/docs/Reference/Contributed/GdiPlus/Enumerations/GpPenAlignment.md new file mode 100644 index 00000000..0d84329c --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Enumerations/GpPenAlignment.md @@ -0,0 +1,26 @@ +--- +title: GpPenAlignment +parent: Enumerations +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Enumerations/GpPenAlignment +--- + +# GpPenAlignment enumeration +{: .no_toc } + +Selects the position of a pen relative to the line it draws. + +| Member | Value | Description | +|:-------|:------|:------------| +| **PenAlignmentCenter**{: #PenAlignmentCenter } | `0` | The pen is centred on the line, half of its width on each side. | +| **PenAlignmentInset**{: #PenAlignmentInset } | `1` | The pen is on the inside of the line. For a closed shape the whole width is inside the shape. | + +## Used by + +- [**Pen**](../Pen) class: [**Alignment**](../Pen#alignment) + +## See Also + +- [PenAlignment](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusenums/ne-gdiplusenums-penalignment) -- Microsoft's documentation of the GDI+ enumeration +- [Enumerations](.) -- all the enumerations of the package +- [Pen](../Pen) class diff --git a/docs/Reference/Contributed/GdiPlus/Enumerations/GpPenType.md b/docs/Reference/Contributed/GdiPlus/Enumerations/GpPenType.md new file mode 100644 index 00000000..ef455385 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Enumerations/GpPenType.md @@ -0,0 +1,32 @@ +--- +title: GpPenType +parent: Enumerations +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Enumerations/GpPenType +--- + +# GpPenType enumeration +{: .no_toc } + +Names the kind of fill that a pen draws with. + +The members repeat the values of [GpBrushType](GpBrushType), because a pen draws with a brush. + +| Member | Value | Description | +|:-------|:------|:------------| +| **PenTypeSolidColor**{: #PenTypeSolidColor } | `0` | A solid colour. | +| **PenTypeHatchFill**{: #PenTypeHatchFill } | `1` | A hatch pattern. | +| **PenTypeTextureFill**{: #PenTypeTextureFill } | `2` | A texture made of tiles of an image. | +| **PenTypePathGradient**{: #PenTypePathGradient } | `3` | A path gradient. | +| **PenTypeLinearGradient**{: #PenTypeLinearGradient } | `4` | A linear gradient. | +| **PenTypeUnknown**{: #PenTypeUnknown } | `-1` | The type is not known. | + +## Used by + +- [**Pen**](../Pen) class: [**PenType**](../Pen#pentype) + +## See Also + +- [PenType](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusenums/ne-gdiplusenums-pentype) -- Microsoft's documentation of the GDI+ enumeration +- [Enumerations](.) -- all the enumerations of the package +- [Pen](../Pen) class diff --git a/docs/Reference/Contributed/GdiPlus/Enumerations/GpPixelOffsetMode.md b/docs/Reference/Contributed/GdiPlus/Enumerations/GpPixelOffsetMode.md new file mode 100644 index 00000000..b4093fd1 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Enumerations/GpPixelOffsetMode.md @@ -0,0 +1,32 @@ +--- +title: GpPixelOffsetMode +parent: Enumerations +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Enumerations/GpPixelOffsetMode +--- + +# GpPixelOffsetMode enumeration +{: .no_toc } + +Specifies the pixel offset mode of a **Graphics** object. + +The setting is the **PixelOffsetMode** property of [**Graphics**](../Graphics). Take the pixel in the upper left corner of an image, with the address (0, 0). With **PixelOffsetModeNone** it covers the area from -0.5 to 0.5 in both directions, so its centre is at (0, 0). With **PixelOffsetModeHalf** it covers the area from 0 to 1, so its centre is at (0.5, 0.5). The first four members have the values of [GpQualityMode](GpQualityMode). + +| Member | Value | Description | +|:-------|:------|:------------| +| **PixelOffsetModeInvalid**{: #PixelOffsetModeInvalid } | `-1` | Used internally. | +| **PixelOffsetModeDefault**{: #PixelOffsetModeDefault } | `0` | Same as **PixelOffsetModeNone**. | +| **PixelOffsetModeHighSpeed**{: #PixelOffsetModeHighSpeed } | `1` | Same as **PixelOffsetModeNone**. | +| **PixelOffsetModeHighQuality**{: #PixelOffsetModeHighQuality } | `2` | Same as **PixelOffsetModeHalf**. | +| **PixelOffsetModeNone**{: #PixelOffsetModeNone } | `3` | The centres of pixels have integer coordinates. | +| **PixelOffsetModeHalf**{: #PixelOffsetModeHalf } | `4` | The centres of pixels have coordinates half way between integers. | + +## Used by + +- [**Graphics**](../Graphics) class: [**PixelOffsetMode**](../Graphics#pixeloffsetmode) + +## See Also + +- [PixelOffsetMode](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusenums/ne-gdiplusenums-pixeloffsetmode) -- Microsoft's documentation of the GDI+ enumeration +- [Enumerations](.) -- all the enumerations of the package +- [Graphics](../Graphics) class diff --git a/docs/Reference/Contributed/GdiPlus/Enumerations/GpPropertyTagType.md b/docs/Reference/Contributed/GdiPlus/Enumerations/GpPropertyTagType.md new file mode 100644 index 00000000..4c891fdc --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Enumerations/GpPropertyTagType.md @@ -0,0 +1,38 @@ +--- +title: GpPropertyTagType +parent: Enumerations +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Enumerations/GpPropertyTagType +--- + +# GpPropertyTagType enumeration +{: .no_toc } + +Specifies the data type of the value of an image property, such as an Exif tag. + +A property item has a tag that says what it is and a type that says how its value is stored. The value is an array of elements of the type. The numbering follows the TIFF and Exif standards. **MinPropertyTagType** and **MaxPropertyTagType** are the lowest and the highest valid value. + +| Member | Value | Description | +|:-------|:------|:------------| +| **MinPropertyTagType**{: #MinPropertyTagType } | `1` | The lowest valid value, same as **PropertyTagTypeByte**. | +| **PropertyTagTypeByte**{: #PropertyTagTypeByte } | `1` | An array of bytes, 8-bit unsigned integers. | +| **PropertyTagTypeASCII**{: #PropertyTagTypeASCII } | `2` | A null-terminated ASCII string. | +| **PropertyTagTypeShort**{: #PropertyTagTypeShort } | `3` | An array of 16-bit unsigned integers. | +| **PropertyTagTypeLong**{: #PropertyTagTypeLong } | `4` | An array of 32-bit unsigned integers. | +| **PropertyTagTypeRational**{: #PropertyTagTypeRational } | `5` | An array of pairs of 32-bit unsigned integers. Each pair is the numerator and the denominator of a fraction. | +| **PropertyTagTypeSByte**{: #PropertyTagTypeSByte } | `6` | An array of signed bytes, 8-bit signed integers. | +| **PropertyTagTypeUndefined**{: #PropertyTagTypeUndefined } | `7` | An array of bytes that can hold values of any kind, depending on the property. | +| **PropertyTagTypeSShort**{: #PropertyTagTypeSShort } | `8` | An array of 16-bit signed integers. | +| **PropertyTagTypeSLong**{: #PropertyTagTypeSLong } | `9` | An array of 32-bit signed integers. | +| **PropertyTagTypeSRational**{: #PropertyTagTypeSRational } | `10` | An array of pairs of 32-bit signed integers. Each pair is the numerator and the denominator of a fraction. | +| **PropertyTagTypeSingle**{: #PropertyTagTypeSingle } | `11` | An array of 32-bit floating-point numbers. | +| **PropertyTagTypeDouble**{: #PropertyTagTypeDouble } | `12` | An array of 64-bit floating-point numbers. | +| **MaxPropertyTagType**{: #MaxPropertyTagType } | `12` | The highest valid value, same as **PropertyTagTypeDouble**. | + +## Used by + +- [**GpPropertyItem**](../Types/GpPropertyItem) type: **Type** + +## See Also + +- [Enumerations](.) -- all the enumerations of the package diff --git a/docs/Reference/Contributed/GdiPlus/Enumerations/GpQualityMode.md b/docs/Reference/Contributed/GdiPlus/Enumerations/GpQualityMode.md new file mode 100644 index 00000000..5d9bf07c --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Enumerations/GpQualityMode.md @@ -0,0 +1,26 @@ +--- +title: GpQualityMode +parent: Enumerations +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Enumerations/GpQualityMode +--- + +# GpQualityMode enumeration +{: .no_toc } + +Names the three quality levels that several rendering settings share. + +No member of the package takes this enumeration. Its four values are the first four values of [GpCompositingQuality](GpCompositingQuality), [GpInterpolationMode](GpInterpolationMode), [GpPixelOffsetMode](GpPixelOffsetMode) and [GpSmoothingMode](GpSmoothingMode), which spell them as their own **Default**, **HighSpeed** (or **LowQuality**) and **HighQuality** members. + +| Member | Value | Description | +|:-------|:------|:------------| +| **QualityModeInvalid**{: #QualityModeInvalid } | `-1` | Not a valid mode. GDI+ uses it to mark an invalid setting. | +| **QualityModeDefault**{: #QualityModeDefault } | `0` | Lets GDI+ choose the quality. | +| **QualityModeLow**{: #QualityModeLow } | `1` | Best performance, lowest quality. | +| **QualityModeHigh**{: #QualityModeHigh } | `2` | Best rendering quality, lowest performance. | + +No public member of the package takes or returns this enumeration. + +## See Also + +- [Enumerations](.) -- all the enumerations of the package diff --git a/docs/Reference/Contributed/GdiPlus/Enumerations/GpSmoothingMode.md b/docs/Reference/Contributed/GdiPlus/Enumerations/GpSmoothingMode.md new file mode 100644 index 00000000..c32d201c --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Enumerations/GpSmoothingMode.md @@ -0,0 +1,56 @@ +--- +title: GpSmoothingMode +parent: Enumerations +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Enumerations/GpSmoothingMode +--- + +# GpSmoothingMode enumeration +{: .no_toc } + +Specifies the kind of smoothing (antialiasing) that is applied to lines and curves. + +The setting is the **SmoothingMode** property of [**Graphics**](../Graphics). A box filter that is 8 pixels wide and 4 high gives better results for lines that are nearly vertical than for lines that are nearly horizontal. A filter of 8 by 8 pixels gives equally good results for both and is slower. The first four members have the values of [GpQualityMode](GpQualityMode). + +> [!NOTE] timeless +> GDI+ replaces some of the values when they are set. A **Graphics** object that was given **SmoothingModeHighQuality** returns **SmoothingModeAntiAlias** when the property is read again, and one that was given **SmoothingModeHighSpeed** or **SmoothingModeDefault** returns **SmoothingModeNone**. + +| Member | Value | Description | +|:-------|:------|:------------| +| **SmoothingModeInvalid**{: #SmoothingModeInvalid } | `-1` | Reserved. | +| **SmoothingModeDefault**{: #SmoothingModeDefault } | `0` | No smoothing is applied. | +| **SmoothingModeHighSpeed**{: #SmoothingModeHighSpeed } | `1` | No smoothing is applied. | +| **SmoothingModeHighQuality**{: #SmoothingModeHighQuality } | `2` | Smoothing is applied with an 8 by 4 box filter. | +| **SmoothingModeNone**{: #SmoothingModeNone } | `3` | No smoothing is applied. | +| **SmoothingModeAntiAlias**{: #SmoothingModeAntiAlias } | `4` | Smoothing is applied with an 8 by 4 box filter. | +| **SmoothingModeAntiAlias8x4**{: #SmoothingModeAntiAlias8x4 } | `4` | Smoothing is applied with an 8 by 4 box filter. Same value as **SmoothingModeAntiAlias**. | +| **SmoothingModeAntiAlias8x8**{: #SmoothingModeAntiAlias8x8 } | `5` | Smoothing is applied with an 8 by 8 box filter. | + +## Used by + +- [**Graphics**](../Graphics) class: [**SmoothingMode**](../Graphics#smoothingmode) + +## Example + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim bmp As Bitmap = Bitmap(8!, 8!) +Dim g As Graphics = Graphics(bmp) + +g.SmoothingMode = SmoothingModeHighQuality +Debug.Print g.SmoothingMode = SmoothingModeAntiAlias +g.SmoothingMode = SmoothingModeHighSpeed +Debug.Print g.SmoothingMode = SmoothingModeNone +g.SmoothingMode = SmoothingModeDefault +Debug.Print g.SmoothingMode = SmoothingModeNone +' Output: +' True +' True +' True +``` + +## See Also + +- [SmoothingMode](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusenums/ne-gdiplusenums-smoothingmode) -- Microsoft's documentation of the GDI+ enumeration +- [Enumerations](.) -- all the enumerations of the package +- [Graphics](../Graphics) class diff --git a/docs/Reference/Contributed/GdiPlus/Enumerations/GpStatus.md b/docs/Reference/Contributed/GdiPlus/Enumerations/GpStatus.md new file mode 100644 index 00000000..5fe003a7 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Enumerations/GpStatus.md @@ -0,0 +1,51 @@ +--- +title: GpStatus +parent: Enumerations +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Enumerations/GpStatus +--- + +# GpStatus enumeration +{: .no_toc } + +Indicates the result of a GDI+ call. + +Nearly every method of the package that does not return a value returns a **GpStatus**, and every object keeps the last one in its **LastResult** property of [**GdiPlusBase**](../GdiPlusBase). What happens to a status other than **Ok** depends on the error handling strategy, [GpErrorHandlingStrategy](GpErrorHandlingStrategy). **AsText** returns the text of a status. + +> [!NOTE] timeless +> Creating an image from a file that does not exist gives **InvalidParameter**, not **FileNotFound**. + +| Member | Value | Description | +|:-------|:------|:------------| +| **Ok**{: #Ok } | `0` | The call succeeded. | +| **GenericError**{: #GenericError } | `1` | The call failed for a reason that none of the other members describes. | +| **InvalidParameter**{: #InvalidParameter } | `2` | One of the arguments is not valid. | +| **OutOfMemory**{: #OutOfMemory } | `3` | The system has no memory left for the call. | +| **ObjectBusy**{: #ObjectBusy } | `4` | An argument is in use in another thread. | +| **InsufficientBuffer**{: #InsufficientBuffer } | `5` | A buffer that was passed to the call is too small for the data it receives. | +| **NotImplemented**{: #NotImplemented } | `6` | The method is not implemented. | +| **Win32Error**{: #Win32Error } | `7` | The call caused a Win32 error. | +| **WrongState**{: #WrongState } | `8` | The object is in a state in which the call is not allowed. For example, asking a pen that is not a solid colour pen for its colour. | +| **Aborted**{: #Aborted } | `9` | The call was aborted. | +| **FileNotFound**{: #FileNotFound } | `10` | The image file or the metafile cannot be found. | +| **ValueOverflow**{: #ValueOverflow } | `11` | An arithmetic operation of the call overflowed. | +| **AccessDenied**{: #AccessDenied } | `12` | A write to the file is not allowed. | +| **UnknownImageFormat**{: #UnknownImageFormat } | `13` | The format of the image file is not known. | +| **FontFamilyNotFound**{: #FontFamilyNotFound } | `14` | The font family cannot be found. Its name is not valid, or the family is not installed. | +| **FontStyleNotFound**{: #FontStyleNotFound } | `15` | The font family does not have the requested style. | +| **NotTrueTypeFont**{: #NotTrueTypeFont } | `16` | The font from a device context or a **LOGFONT** is not a TrueType font, and GDI+ cannot use it. | +| **UnsupportedGdiplusVersion**{: #UnsupportedGdiplusVersion } | `17` | The installed version of GDI+ is not compatible with the version that was requested. | +| **GdiplusNotInitialized**{: #GdiplusNotInitialized } | `18` | GDI+ is not started. Create a [**GdiPlusUser**](../GdiPlusUser) before any other GDI+ object. | +| **PropertyNotFound**{: #PropertyNotFound } | `19` | The image does not have the property. | +| **PropertyNotSupported**{: #PropertyNotSupported } | `20` | The format of the image does not support the property. | +| **ProfileNotFound**{: #ProfileNotFound } | `21` | The colour profile that is needed to save the image in the CMYK format was not found. | +| **LastGpStatus**{: #LastGpStatus } | `21` | The highest status, same as **ProfileNotFound**. | + +## Used by + +Most methods, functions and constructors of the package return a **GpStatus** or leave one in **LastResult**. [**GdiPlusBase**](../GdiPlusBase) has **LastResult**, **GetLastResult** and **ClearResult**, and the function [**AsText**](../Helpers) returns a status as a string. + +## See Also + +- [Status](https://learn.microsoft.com/en-us/windows/win32/api/gdiplustypes/ne-gdiplustypes-status) -- Microsoft's documentation of the GDI+ enumeration +- [Enumerations](.) -- all the enumerations of the package diff --git a/docs/Reference/Contributed/GdiPlus/Enumerations/GpStringAlignment.md b/docs/Reference/Contributed/GdiPlus/Enumerations/GpStringAlignment.md new file mode 100644 index 00000000..0c81f5db --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Enumerations/GpStringAlignment.md @@ -0,0 +1,29 @@ +--- +title: GpStringAlignment +parent: Enumerations +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Enumerations/GpStringAlignment +--- + +# GpStringAlignment enumeration +{: .no_toc } + +Specifies how a string is aligned relative to its layout rectangle. + +The enumeration is used for the horizontal alignment (**Alignment**) and for the vertical, or line, alignment (**LineAlignment**) of a [**StringFormat**](../StringFormat). For horizontal text, *near* is the left edge for text that reads from left to right and the right edge for text that reads from right to left. For vertical text it is the top. + +| Member | Value | Description | +|:-------|:------|:------------| +| **StringAlignmentNear**{: #StringAlignmentNear } | `0` | The text is aligned near the origin of the layout rectangle. | +| **StringAlignmentCenter**{: #StringAlignmentCenter } | `1` | The text is centred in the layout rectangle. | +| **StringAlignmentFar**{: #StringAlignmentFar } | `2` | The text is aligned far from the origin of the layout rectangle. | + +## Used by + +- [**StringFormat**](../StringFormat) class: [**Alignment**](../StringFormat#alignment), [**LineAlignment**](../StringFormat#linealignment) + +## See Also + +- [StringAlignment](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusenums/ne-gdiplusenums-stringalignment) -- Microsoft's documentation of the GDI+ enumeration +- [Enumerations](.) -- all the enumerations of the package +- [StringFormat](../StringFormat) class diff --git a/docs/Reference/Contributed/GdiPlus/Enumerations/GpStringDigitSubstitute.md b/docs/Reference/Contributed/GdiPlus/Enumerations/GpStringDigitSubstitute.md new file mode 100644 index 00000000..86c0fac3 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Enumerations/GpStringDigitSubstitute.md @@ -0,0 +1,28 @@ +--- +title: GpStringDigitSubstitute +parent: Enumerations +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Enumerations/GpStringDigitSubstitute +--- + +# GpStringDigitSubstitute enumeration +{: .no_toc } + +Specifies how digits in a string are replaced according to the locale or the language of the user. + +| Member | Value | Description | +|:-------|:------|:------------| +| **StringDigitSubstituteUser**{: #StringDigitSubstituteUser } | `0` | A substitution scheme defined by the user, the setting of the national language support (NLS) of the system. | +| **StringDigitSubstituteNone**{: #StringDigitSubstituteNone } | `1` | No substitution. | +| **StringDigitSubstituteNational**{: #StringDigitSubstituteNational } | `2` | Digits of the official national language of the locale of the user. | +| **StringDigitSubstituteTraditional**{: #StringDigitSubstituteTraditional } | `3` | Digits of the native script or language of the user, which can differ from the official national language of the locale. | + +## Used by + +- [**StringFormat**](../StringFormat) class: [**DigitSubstitutionMethod**](../StringFormat#digitsubstitutionmethod), [**SetDigitSubstitution**](../StringFormat#setdigitsubstitution) + +## See Also + +- [StringDigitSubstitute](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusenums/ne-gdiplusenums-stringdigitsubstitute) -- Microsoft's documentation of the GDI+ enumeration +- [Enumerations](.) -- all the enumerations of the package +- [StringFormat](../StringFormat) class diff --git a/docs/Reference/Contributed/GdiPlus/Enumerations/GpStringFormatFlags.md b/docs/Reference/Contributed/GdiPlus/Enumerations/GpStringFormatFlags.md new file mode 100644 index 00000000..9ee7c3f7 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Enumerations/GpStringFormatFlags.md @@ -0,0 +1,54 @@ +--- +title: GpStringFormatFlags +parent: Enumerations +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Enumerations/GpStringFormatFlags +--- + +# GpStringFormatFlags enumeration +{: .no_toc } + +Specifies text layout (such as direction and clipping) and display options (such as digit substitution and fallback fonts). + +The members combine with **Or**. They are the *flags* argument of the **StringFormat** constructor and the **Flags** property of [**StringFormat**](../StringFormat), which also has a Boolean property for most of them. + +When **StringFormatFlagsDirectionVertical** and **StringFormatFlagsDirectionRightToLeft** are both set, lines of text are drawn vertically and the first line starts at the right edge of the layout rectangle. With only **StringFormatFlagsDirectionVertical** the first line starts at the left edge. With only **StringFormatFlagsDirectionRightToLeft** the lines are horizontal and the reading order is from right to left; this changes the order in which the text is read, not the order in which the characters are displayed. Both flags can affect string alignment. + +| Member | Value | Description | +|:-------|:------|:------------| +| **StringFormatFlagsDirectionRightToLeft**{: #StringFormatFlagsDirectionRightToLeft } | `&H00000001` | The reading order is right to left. For horizontal text the characters are read from right to left, and for vertical text the columns. By default text is read from left to right. | +| **StringFormatFlagsDirectionVertical**{: #StringFormatFlagsDirectionVertical } | `&H00000002` | The lines of text are drawn vertically. By default lines are horizontal, each new line below the previous one. | +| **StringFormatFlagsNoFitBlackBox**{: #StringFormatFlagsNoFitBlackBox } | `&H00000004` | Parts of characters are allowed to overhang the layout rectangle. By default GDI+ first aligns characters inside the rectangle and then moves the ones that still overhang, so that no pixel outside it is affected. Setting the flag makes an overhanging character, such as an italic f, align visually with the lines above and below, but parts of it outside the rectangle can be clipped or painted. | +| **StringFormatFlagsDisplayFormatControl**{: #StringFormatFlagsDisplayFormatControl } | `&H00000020` | Unicode layout control characters are displayed with a representative character. | +| **StringFormatFlagsNoFontFallback**{: #StringFormatFlagsNoFontFallback } | `&H00000400` | No alternate font is used for characters that the requested font lacks. They are displayed with the missing-glyph character of the font, usually an open square. By default GDI+ falls back to another font. | +| **StringFormatFlagsMeasureTrailingSpaces**{: #StringFormatFlagsMeasureTrailingSpaces } | `&H00000800` | The space at the end of each line is included in a string measurement. By default the measured rectangle leaves it out. | +| **StringFormatFlagsNoWrap**{: #StringFormatFlagsNoWrap } | `&H00001000` | Text does not wrap to the next line. This is implied when the text is drawn at a point instead of in a rectangle. By default text in a rectangle breaks at the last word boundary inside the rectangle. | +| **StringFormatFlagsLineLimit**{: #StringFormatFlagsLineLimit } | `&H00002000` | Only whole lines are laid out in the layout rectangle. By default the last line can be partly cut off by a rectangle whose height is not a multiple of the line height. | +| **StringFormatFlagsNoClip**{: #StringFormatFlagsNoClip } | `&H00004000` | Characters and text that extend outside the layout rectangle are shown. By default they are clipped, and so are trailing spaces that extend outside it, which also affects a measurement that includes trailing spaces. | +| **StringFormatFlagsBypassGDI**{: #StringFormatFlagsBypassGDI } | `&H80000000` | Microsoft gives no description. [**StringFormat**](../StringFormat) has a **BypassGDI** property for it. | + +## Used by + +- [**StringFormat**](../StringFormat) class: [**Flags**](../StringFormat#flags), [**FormatFlags**](../StringFormat#flags), [constructor](../StringFormat#creating) + +## Example + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim format As StringFormat = StringFormat(StringFormatFlagsNoWrap Or StringFormatFlagsLineLimit) +Debug.Print Hex$(format.Flags) +Debug.Print format.NoWrap, format.LineLimit, format.NoClip + +format.NoClip = True +Debug.Print Hex$(format.Flags) +' Output: +' 3000 +' True True False +' 7000 +``` + +## See Also + +- [StringFormatFlags](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusenums/ne-gdiplusenums-stringformatflags) -- Microsoft's documentation of the GDI+ enumeration +- [Enumerations](.) -- all the enumerations of the package +- [StringFormat](../StringFormat) class diff --git a/docs/Reference/Contributed/GdiPlus/Enumerations/GpStringTrimming.md b/docs/Reference/Contributed/GdiPlus/Enumerations/GpStringTrimming.md new file mode 100644 index 00000000..0cc46724 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Enumerations/GpStringTrimming.md @@ -0,0 +1,32 @@ +--- +title: GpStringTrimming +parent: Enumerations +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Enumerations/GpStringTrimming +--- + +# GpStringTrimming enumeration +{: .no_toc } + +Specifies how characters are trimmed from a string so that it fits into the layout rectangle. + +Trimming affects only the last visible or partly visible line of text. + +| Member | Value | Description | +|:-------|:------|:------------| +| **StringTrimmingNone**{: #StringTrimmingNone } | `0` | No trimming. | +| **StringTrimmingCharacter**{: #StringTrimmingCharacter } | `1` | The string is cut at the last character that fits in the layout rectangle. | +| **StringTrimmingWord**{: #StringTrimmingWord } | `2` | The string is cut at the last word that fits in the layout rectangle. | +| **StringTrimmingEllipsisCharacter**{: #StringTrimmingEllipsisCharacter } | `3` | The string is cut at the last character that fits, and an ellipsis (...) follows that character. | +| **StringTrimmingEllipsisWord**{: #StringTrimmingEllipsisWord } | `4` | The string is cut at the last word that fits, and an ellipsis (...) follows that word. | +| **StringTrimmingEllipsisPath**{: #StringTrimmingEllipsisPath } | `5` | The middle of the string is removed and replaced with an ellipsis. As much as possible of the last part of the string is kept. | + +## Used by + +- [**StringFormat**](../StringFormat) class: [**Trimming**](../StringFormat#trimming) + +## See Also + +- [StringTrimming](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusenums/ne-gdiplusenums-stringtrimming) -- Microsoft's documentation of the GDI+ enumeration +- [Enumerations](.) -- all the enumerations of the package +- [StringFormat](../StringFormat) class diff --git a/docs/Reference/Contributed/GdiPlus/Enumerations/GpTestControlEnum.md b/docs/Reference/Contributed/GdiPlus/Enumerations/GpTestControlEnum.md new file mode 100644 index 00000000..a0eff4c3 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Enumerations/GpTestControlEnum.md @@ -0,0 +1,27 @@ +--- +title: GpTestControlEnum +parent: Enumerations +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Enumerations/GpTestControlEnum +--- + +# GpTestControlEnum enumeration +{: .no_toc } + +Names the internal test controls of GDI+, for the test function of the **GdiPlusUser** class. + +GDI+ has an undocumented function that sets test options. The package offers it as the **TestControl** function, and as the two methods **TestControlForceBilinear** and **TestControlNoICM** of [**GdiPlusUser**](../GdiPlusUser). + +| Member | Value | Description | +|:-------|:------|:------------| +| **TestControlForceBilinear**{: #TestControlForceBilinear } | `0` | Forces bilinear interpolation. | +| **TestControlNoICM**{: #TestControlNoICM } | `1` | Turns off image colour management (ICM). | +| **TestControlGetBuildNumber**{: #TestControlGetBuildNumber } | `2` | Returns the build number of GDI+. | + +## Used by + +- [Helper functions](../Helpers): **TestControl** + +## See Also + +- [Enumerations](.) -- all the enumerations of the package diff --git a/docs/Reference/Contributed/GdiPlus/Enumerations/GpTextRenderingHint.md b/docs/Reference/Contributed/GdiPlus/Enumerations/GpTextRenderingHint.md new file mode 100644 index 00000000..a02f2d2a --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Enumerations/GpTextRenderingHint.md @@ -0,0 +1,35 @@ +--- +title: GpTextRenderingHint +parent: Enumerations +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Enumerations/GpTextRenderingHint +--- + +# GpTextRenderingHint enumeration +{: .no_toc } + +Specifies the process used to render text, which affects the quality of the text. + +A process that gives higher quality is generally slower than one that gives lower quality. **TextRenderingHintClearTypeGridFit** gives the best quality for most LCD monitors and relatively small font sizes. **TextRenderingHintAntiAlias** gives the best quality for rotated text. + +> [!NOTE] timeless +> **TextRenderingHintClearTypeGridFit** cannot be used together with [**CompositingModeSourceCopy**](GpCompositingMode). + +| Member | Value | Description | +|:-------|:------|:------------| +| **TextRenderingHintSystemDefault**{: #TextRenderingHintSystemDefault } | `0` | A character is drawn with the font smoothing mode that is currently selected in the system. | +| **TextRenderingHintSingleBitPerPixelGridFit**{: #TextRenderingHintSingleBitPerPixelGridFit } | `1` | A character is drawn with its glyph bitmap and hinting, which improves the look of stems and curves. | +| **TextRenderingHintSingleBitPerPixel**{: #TextRenderingHintSingleBitPerPixel } | `2` | A character is drawn with its glyph bitmap and no hinting. This is faster and gives lower quality. | +| **TextRenderingHintAntiAliasGridFit**{: #TextRenderingHintAntiAliasGridFit } | `3` | A character is drawn with its antialiased glyph bitmap and hinting. The quality is much better, at a higher cost in time. | +| **TextRenderingHintAntiAlias**{: #TextRenderingHintAntiAlias } | `4` | A character is drawn with its antialiased glyph bitmap and no hinting. Differences in stem width can be noticeable, because hinting is off. | +| **TextRenderingHintClearTypeGridFit**{: #TextRenderingHintClearTypeGridFit } | `5` | A character is drawn with its ClearType glyph bitmap and hinting. | + +## Used by + +- [**Graphics**](../Graphics) class: [**TextRenderingHint**](../Graphics#textrenderinghint) + +## See Also + +- [TextRenderingHint](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusenums/ne-gdiplusenums-textrenderinghint) -- Microsoft's documentation of the GDI+ enumeration +- [Enumerations](.) -- all the enumerations of the package +- [Graphics](../Graphics) class diff --git a/docs/Reference/Contributed/GdiPlus/Enumerations/GpUnit.md b/docs/Reference/Contributed/GdiPlus/Enumerations/GpUnit.md new file mode 100644 index 00000000..3fa9af4e --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Enumerations/GpUnit.md @@ -0,0 +1,37 @@ +--- +title: GpUnit +parent: Enumerations +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Enumerations/GpUnit +--- + +# GpUnit enumeration +{: .no_toc } + +Specifies the unit of measure of a coordinate, a size or a pen width. + +| Member | Value | Description | +|:-------|:------|:------------| +| **UnitWorld**{: #UnitWorld } | `0` | World coordinates, a non-physical unit. | +| **UnitDisplay**{: #UnitDisplay } | `1` | The unit of the display device. On a monitor it is one pixel. GDI+ accepts it only as the page unit of a **Graphics**. | +| **UnitPixel**{: #UnitPixel } | `2` | One device pixel. | +| **UnitPoint**{: #UnitPoint } | `3` | A printer's point, 1/72 inch. | +| **UnitInch**{: #UnitInch } | `4` | One inch. | +| **UnitDocument**{: #UnitDocument } | `5` | A document unit, 1/300 inch. | +| **UnitMillimeter**{: #UnitMillimeter } | `6` | One millimetre. | + +## Used by + +- [**Font**](../Font) class: [**Unit**](../Font#unit), [constructor](../Font#creating) +- [**Graphics**](../Graphics) class: [**BeginContainer**](../Graphics#begincontainer), [**DrawImage**](../Graphics#drawimage), [**DrawImageI**](../Graphics#drawimagei), [**EnumerateMetaFile**](../Graphics#enumeratemetafile), [**PageUnit**](../Graphics#pageunit) +- [**Image**](../Image) class: [**Bounds**](../Image#bounds) +- [**Pen**](../Pen) class: [constructor](../Pen#creating) + +## See Also + +- [Unit](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusenums/ne-gdiplusenums-unit) -- Microsoft's documentation of the GDI+ enumeration +- [Enumerations](.) -- all the enumerations of the package +- [Font](../Font) class +- [Graphics](../Graphics) class +- [Image](../Image) class +- [Pen](../Pen) class diff --git a/docs/Reference/Contributed/GdiPlus/Enumerations/GpWarpMode.md b/docs/Reference/Contributed/GdiPlus/Enumerations/GpWarpMode.md new file mode 100644 index 00000000..7a0b1f24 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Enumerations/GpWarpMode.md @@ -0,0 +1,26 @@ +--- +title: GpWarpMode +parent: Enumerations +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Enumerations/GpWarpMode +--- + +# GpWarpMode enumeration +{: .no_toc } + +Selects the kind of warp that **GraphicsPath.Warp** applies to a path. + +| Member | Value | Description | +|:-------|:------|:------------| +| **WarpModePerspective**{: #WarpModePerspective } | `0` | A perspective warp. | +| **WarpModeBilinear**{: #WarpModeBilinear } | `1` | A bilinear warp. | + +## Used by + +- [**GraphicsPath**](../GraphicsPath) class: [**Warp**](../GraphicsPath#warp) + +## See Also + +- [WarpMode](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusenums/ne-gdiplusenums-warpmode) -- Microsoft's documentation of the GDI+ enumeration +- [Enumerations](.) -- all the enumerations of the package +- [GraphicsPath](../GraphicsPath) class diff --git a/docs/Reference/Contributed/GdiPlus/Enumerations/GpWrapMode.md b/docs/Reference/Contributed/GdiPlus/Enumerations/GpWrapMode.md new file mode 100644 index 00000000..57f3f1ff --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Enumerations/GpWrapMode.md @@ -0,0 +1,35 @@ +--- +title: GpWrapMode +parent: Enumerations +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Enumerations/GpWrapMode +--- + +# GpWrapMode enumeration +{: .no_toc } + +Selects how copies of an image or a gradient tile an area larger than the original. + +| Member | Value | Description | +|:-------|:------|:------------| +| **WrapModeTile**{: #WrapModeTile } | `0` | Tiles without flipping. | +| **WrapModeTileFlipX**{: #WrapModeTileFlipX } | `1` | Flips each tile horizontally relative to the previous tile in a row. | +| **WrapModeTileFlipY**{: #WrapModeTileFlipY } | `2` | Flips each tile vertically relative to the previous tile in a column. | +| **WrapModeTileFlipXY**{: #WrapModeTileFlipXY } | `3` | Flips tiles horizontally along a row and vertically along a column. | +| **WrapModeClamp**{: #WrapModeClamp } | `4` | No tiling takes place. | + +## Used by + +- [**ImageAttributes**](../ImageAttributes) class: [**SetWrapMode**](../ImageAttributes#setwrapmode) +- [**LinearGradientBrush**](../LinearGradientBrush) class: [**WrapMode**](../LinearGradientBrush#wrapmode) +- [**PathGradientBrush**](../PathGradientBrush) class: [**WrapMode**](../PathGradientBrush#wrapmode), [constructor](../PathGradientBrush#creating) +- [**TextureBrush**](../TextureBrush) class: [**WrapMode**](../TextureBrush#wrapmode), [constructor](../TextureBrush#creating) + +## See Also + +- [WrapMode](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusenums/ne-gdiplusenums-wrapmode) -- Microsoft's documentation of the GDI+ enumeration +- [Enumerations](.) -- all the enumerations of the package +- [ImageAttributes](../ImageAttributes) class +- [LinearGradientBrush](../LinearGradientBrush) class +- [PathGradientBrush](../PathGradientBrush) class +- [TextureBrush](../TextureBrush) class diff --git a/docs/Reference/Contributed/GdiPlus/Enumerations/GraphicsCreationOptions.md b/docs/Reference/Contributed/GdiPlus/Enumerations/GraphicsCreationOptions.md new file mode 100644 index 00000000..52199b2f --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Enumerations/GraphicsCreationOptions.md @@ -0,0 +1,44 @@ +--- +title: GraphicsCreationOptions +parent: Enumerations +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Enumerations/GraphicsCreationOptions +--- + +# GraphicsCreationOptions enumeration +{: .no_toc } + +Says what a **Graphics** object is created from and how it is created. + +This enumeration belongs to the package; GDI+ has no counterpart. The members combine with **Or**, and the constructor of [**Graphics**](../Graphics) handles these combinations, with *h1* and *h2* as the two handles it receives: + +| Combination | *h1* | *h2* | +|:--|:--|:--| +| **FromHDC** | the device context | not used | +| **FromHDC Or WithHDevice** | the device context | the handle of a device | +| **FromHDC Or Buffered** | the device context | a pointer to the **RECT** to buffer | +| **FromHWND** | the window | not used | +| **FromHWND Or WithICM** | the window | not used | +| **FromHWND Or Buffered** | the window | a pointer to buffered paint parameters, or 0 | + +The functions **GraphicsFromHDC**, **GraphicsFromHWND**, **GraphicsFromHWNDWithICM**, **BufferedGraphicsFromHDC** and **BufferedGraphicsFromHWND** choose the combination, and are the easier way to create a **Graphics**. + +| Member | Value | Description | +|:-------|:------|:------------| +| **Buffered**{: #Buffered } | `1` | Draws into a buffer, a bitmap in memory, that is copied to the target when the **Graphics** object is released. | +| **FromHWND**{: #FromHWND } | `2` | Creates the object for a window. *h1* is the window handle. | +| **FromHDC**{: #FromHDC } | `4` | Creates the object for a device context. *h1* is the device context handle. | +| **WithHDevice**{: #WithHDevice } | `8` | With **FromHDC**: *h2* is the handle of the device that the context belongs to. | +| **WithICM**{: #WithICM } | `16` | With **FromHWND**: the object uses image colour management (ICM). | +| **Unbuffered**{: #Unbuffered } | `0` | No flag is set: drawing is not buffered. | + +## Used by + +- [**Graphics**](../Graphics) class: [constructor](../Graphics#creating) +- [**VBGraphics**](../VBGraphics) class: [constructor](../VBGraphics#creating) + +## See Also + +- [Enumerations](.) -- all the enumerations of the package +- [Graphics](../Graphics) class +- [VBGraphics](../VBGraphics) class diff --git a/docs/Reference/Contributed/GdiPlus/Enumerations/GraphicsFlags.md b/docs/Reference/Contributed/GdiPlus/Enumerations/GraphicsFlags.md new file mode 100644 index 00000000..81cc6e4d --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Enumerations/GraphicsFlags.md @@ -0,0 +1,24 @@ +--- +title: GraphicsFlags +parent: Enumerations +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Enumerations/GraphicsFlags +--- + +# GraphicsFlags enumeration +{: .no_toc } + +Holds the settings that [**VBGraphics**](../VBGraphics) keeps for itself. + +No public member takes or returns this enumeration. The **UseTransparentAlpha** property of **VBGraphics** sets and clears its one flag. The flag is set when the object is created. + +The members combine with **Or**. + +| Member | Value | Description | +|:-------|:------|:------------| +| **LegacyTransparentDrawing**{: #LegacyTransparentDrawing } | `1` | Set: a colour whose alpha value is 0, such as a colour given as a VB6 colour constant, is used as it is, which draws nothing visible. Clear: a colour with alpha value 0 is drawn with alpha value 255. | +| **None**{: #None } | `0` | No flag is set. | + +## See Also + +- [Enumerations](.) -- all the enumerations of the package diff --git a/docs/Reference/Contributed/GdiPlus/Enumerations/HistogramFormat.md b/docs/Reference/Contributed/GdiPlus/Enumerations/HistogramFormat.md new file mode 100644 index 00000000..ca8ba4cf --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Enumerations/HistogramFormat.md @@ -0,0 +1,34 @@ +--- +title: HistogramFormat +parent: Enumerations +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Enumerations/HistogramFormat +--- + +# HistogramFormat enumeration +{: .no_toc } + +Specifies the number and the kind of the histograms that describe the colour channels of a bitmap. + +It is the *format* argument of **Bitmap.GetHistogram**. + +| Member | Value | Description | +|:-------|:------|:------------| +| **HistogramFormatARGB**{: #HistogramFormatARGB } | `0` | Four histograms: alpha, red, green and blue. The colours are not premultiplied. | +| **HistogramFormatPARGB**{: #HistogramFormatPARGB } | `1` | Four histograms: alpha, red, green and blue, with the colours premultiplied by alpha. | +| **HistogramFormatRGB**{: #HistogramFormatRGB } | `2` | Three histograms: red, green and blue. | +| **HistogramFormatGray**{: #HistogramFormatGray } | `3` | One histogram of the gray level. | +| **HistogramFormatB**{: #HistogramFormatB } | `4` | One histogram of the blue channel. | +| **HistogramFormatG**{: #HistogramFormatG } | `5` | One histogram of the green channel. | +| **HistogramFormatR**{: #HistogramFormatR } | `6` | One histogram of the red channel. | +| **HistogramFormatA**{: #HistogramFormatA } | `7` | One histogram of the alpha channel. | + +## Used by + +- [**Bitmap**](../Bitmap) class: [**GetHistogram**](../Bitmap#gethistogram), [**HistogramSize**](../Bitmap#histogramsize) + +## See Also + +- [HistogramFormat](https://learn.microsoft.com/en-us/windows/win32/api/gdipluscolormatrix/ne-gdipluscolormatrix-histogramformat) -- Microsoft's documentation of the GDI+ enumeration +- [Enumerations](.) -- all the enumerations of the package +- [Bitmap](../Bitmap) class diff --git a/docs/Reference/Contributed/GdiPlus/Enumerations/ImageFlags.md b/docs/Reference/Contributed/GdiPlus/Enumerations/ImageFlags.md new file mode 100644 index 00000000..260d7558 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Enumerations/ImageFlags.md @@ -0,0 +1,42 @@ +--- +title: ImageFlags +parent: Enumerations +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Enumerations/ImageFlags +--- + +# ImageFlags enumeration +{: .no_toc } + +Specifies the attributes of the pixel data of an image. + +The **Flags** property of [**Image**](../Image) returns a combination of these members as a **UINT**. Test a member with **And**. + +The members combine with **Or**. + +| Member | Value | Description | +|:-------|:------|:------------| +| **ImageFlagsNone**{: #ImageFlagsNone } | `0` | No format information. | +| **ImageFlagsScalable**{: #ImageFlagsScalable } | `&H0001` | The image can be scaled. | +| **ImageFlagsHasAlpha**{: #ImageFlagsHasAlpha } | `&H0002` | The pixel data contains alpha values. | +| **ImageFlagsHasTranslucent**{: #ImageFlagsHasTranslucent } | `&H0004` | The pixel data has alpha values other than 0 (transparent) and 255 (opaque). | +| **ImageFlagsPartiallyScalable**{: #ImageFlagsPartiallyScalable } | `&H0008` | The pixel data is partly scalable, with some limitations. | +| **ImageFlagsColorSpaceRGB**{: #ImageFlagsColorSpaceRGB } | `&H0010` | The image is stored in an RGB colour space. | +| **ImageFlagsColorSpaceCMYK**{: #ImageFlagsColorSpaceCMYK } | `&H0020` | The image is stored in a CMYK colour space. | +| **ImageFlagsColorSpaceGRAY**{: #ImageFlagsColorSpaceGRAY } | `&H0040` | The image is a grayscale image. | +| **ImageFlagsColorSpaceYCBCR**{: #ImageFlagsColorSpaceYCBCR } | `&H0080` | The image is stored in a YCbCr colour space. | +| **ImageFlagsColorSpaceYCCK**{: #ImageFlagsColorSpaceYCCK } | `&H0100` | The image is stored in a YCCK colour space. | +| **ImageFlagsHasRealDPI**{: #ImageFlagsHasRealDPI } | `&H1000` | The image holds dots per inch information. | +| **ImageFlagsHasRealPixelSize**{: #ImageFlagsHasRealPixelSize } | `&H2000` | The image holds the size of its pixels. | +| **ImageFlagsReadOnly**{: #ImageFlagsReadOnly } | `&H00010000` | The pixel data is read-only. | +| **ImageFlagsCaching**{: #ImageFlagsCaching } | `&H00020000` | The pixel data can be cached for faster access. | + +## Used by + +- [**Image**](../Image) class: [**Flags**](../Image#flags) returns a combination of the members + +## See Also + +- [ImageFlags](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusimaging/ne-gdiplusimaging-imageflags) -- Microsoft's documentation of the GDI+ enumeration +- [Enumerations](.) -- all the enumerations of the package +- [Image](../Image) class diff --git a/docs/Reference/Contributed/GdiPlus/Enumerations/ImageLockMode.md b/docs/Reference/Contributed/GdiPlus/Enumerations/ImageLockMode.md new file mode 100644 index 00000000..ab84b7af --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Enumerations/ImageLockMode.md @@ -0,0 +1,29 @@ +--- +title: ImageLockMode +parent: Enumerations +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Enumerations/ImageLockMode +--- + +# ImageLockMode enumeration +{: .no_toc } + +Specifies the access flags that are passed to **Bitmap.LockBits**. + +The members combine with **Or**. They form the *flags* argument of **LockBits**, which locks a part of a bitmap so that its pixel data can be read or written. The argument is declared as a **UINT**, so the members are passed as their values. + +| Member | Value | Description | +|:-------|:------|:------------| +| **ImageLockModeRead**{: #ImageLockModeRead } | `&H0001` | The part of the image is locked for reading. | +| **ImageLockModeWrite**{: #ImageLockModeWrite } | `&H0002` | The part of the image is locked for writing. | +| **ImageLockModeUserInputBuf**{: #ImageLockModeUserInputBuf } | `&H0004` | The buffer for the pixel data is allocated by the caller. When the flag is set, the *flags* argument is an input parameter and possibly an output parameter. When it is not set, *flags* is only an output parameter. | + +## Used by + +- [**Bitmap**](../Bitmap) class: the *flags* argument of [**LockBits**](../Bitmap#lockbits) + +## See Also + +- [ImageLockMode](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusimaging/ne-gdiplusimaging-imagelockmode) -- Microsoft's documentation of the GDI+ enumeration +- [Enumerations](.) -- all the enumerations of the package +- [Bitmap](../Bitmap) class diff --git a/docs/Reference/Contributed/GdiPlus/Enumerations/ItemDataPosition.md b/docs/Reference/Contributed/GdiPlus/Enumerations/ItemDataPosition.md new file mode 100644 index 00000000..65003da3 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Enumerations/ItemDataPosition.md @@ -0,0 +1,24 @@ +--- +title: ItemDataPosition +parent: Enumerations +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Enumerations/ItemDataPosition +--- + +# ItemDataPosition enumeration +{: .no_toc } + +Specifies the location of custom metadata in an image file. + +The item data of an image is custom metadata in a JPEG, PNG or GIF file. No public member takes or returns this enumeration. + +| Member | Value | Description | +|:-------|:------|:------------| +| **ItemDataPositionAfterHeader**{: #ItemDataPositionAfterHeader } | `&H0` | The item data is stored after the header. | +| **ItemDataPositionAfterPalette**{: #ItemDataPositionAfterPalette } | `&H1` | The item data is stored after the palette. | +| **ItemDataPositionAfterBits**{: #ItemDataPositionAfterBits } | `&H2` | The item data is stored after the pixel data. | + +## See Also + +- [ItemDataPosition](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusimaging/ne-gdiplusimaging-itemdataposition) -- Microsoft's documentation of the GDI+ enumeration +- [Enumerations](.) -- all the enumerations of the package diff --git a/docs/Reference/Contributed/GdiPlus/Enumerations/PaletteFlags.md b/docs/Reference/Contributed/GdiPlus/Enumerations/PaletteFlags.md new file mode 100644 index 00000000..4db23dd7 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Enumerations/PaletteFlags.md @@ -0,0 +1,28 @@ +--- +title: PaletteFlags +parent: Enumerations +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Enumerations/PaletteFlags +--- + +# PaletteFlags enumeration +{: .no_toc } + +Indicates attributes of the colours in a palette. + +The members combine with **Or**. The **flags** field of a **ColorPalette** holds them. + +| Member | Value | Description | +|:-------|:------|:------------| +| **PaletteFlagsHasAlpha**{: #PaletteFlagsHasAlpha } | `&H0001` | The palette entries contain alpha information. | +| **PaletteFlagsGrayScale**{: #PaletteFlagsGrayScale } | `&H0002` | The palette holds only shades of gray. | +| **PaletteFlagsHalftone**{: #PaletteFlagsHalftone } | `&H0004` | The palette is a halftone palette. | + +## Used by + +- [**ColorPalette**](../Types/ColorPalette) type: **flags**, the **ColorPalette** function + +## See Also + +- [PaletteFlags](https://learn.microsoft.com/en-us/windows/win32/api/gdipluspixelformats/ne-gdipluspixelformats-paletteflags) -- Microsoft's documentation of the GDI+ enumeration +- [Enumerations](.) -- all the enumerations of the package diff --git a/docs/Reference/Contributed/GdiPlus/Enumerations/PaletteType.md b/docs/Reference/Contributed/GdiPlus/Enumerations/PaletteType.md new file mode 100644 index 00000000..b22128cc --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Enumerations/PaletteType.md @@ -0,0 +1,37 @@ +--- +title: PaletteType +parent: Enumerations +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Enumerations/PaletteType +--- + +# PaletteType enumeration +{: .no_toc } + +Identifies several standard colour palettes, for the conversion of a bitmap to another pixel format and for the creation of a palette. + +A halftone palette is a superset of the system palette: it holds the colours of its own grid plus the 16 system colours, without duplicates. The symmetric halftone palettes have the same number of intensity levels for each colour. The two asymmetric ones are less useful and do not include all of the system colours. + +| Member | Value | Description | +|:-------|:------|:------------| +| **PaletteTypeCustom**{: #PaletteTypeCustom } | `0` | An arbitrary palette that the caller provides. | +| **PaletteTypeOptimal**{: #PaletteTypeOptimal } | `1` | An optimal palette generated with a median-cut algorithm. | +| **PaletteTypeFixedBW**{: #PaletteTypeFixedBW } | `2` | A black and white palette. | +| **PaletteTypeFixedHalftone8**{: #PaletteTypeFixedHalftone8 } | `3` | A symmetric halftone palette with 8 colours: the on-off primaries. | +| **PaletteTypeFixedHalftone27**{: #PaletteTypeFixedHalftone27 } | `4` | A symmetric halftone palette with 3 intensity levels of each colour. | +| **PaletteTypeFixedHalftone64**{: #PaletteTypeFixedHalftone64 } | `5` | A symmetric halftone palette with 4 intensity levels of each colour. | +| **PaletteTypeFixedHalftone125**{: #PaletteTypeFixedHalftone125 } | `6` | A symmetric halftone palette with 5 intensity levels of each colour. | +| **PaletteTypeFixedHalftone216**{: #PaletteTypeFixedHalftone216 } | `7` | A symmetric halftone palette with 6 intensity levels of each colour. | +| **PaletteTypeFixedHalftone252**{: #PaletteTypeFixedHalftone252 } | `8` | An asymmetric halftone palette with 6 intensity levels of red, 7 of green and 6 of blue. | +| **PaletteTypeFixedHalftone256**{: #PaletteTypeFixedHalftone256 } | `9` | An asymmetric halftone palette with 8 intensity levels of red, 8 of green and 4 of blue. | + +## Used by + +- [**Bitmap**](../Bitmap) class: [**ConvertFormat**](../Bitmap#convertformat) +- [Helper functions](../Helpers): **InitializePalette** + +## See Also + +- [PaletteType](https://learn.microsoft.com/en-us/windows/win32/api/gdipluspixelformats/ne-gdipluspixelformats-palettetype) -- Microsoft's documentation of the GDI+ enumeration +- [Enumerations](.) -- all the enumerations of the package +- [Bitmap](../Bitmap) class diff --git a/docs/Reference/Contributed/GdiPlus/Enumerations/PixelFormat.md b/docs/Reference/Contributed/GdiPlus/Enumerations/PixelFormat.md new file mode 100644 index 00000000..aa6873f1 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Enumerations/PixelFormat.md @@ -0,0 +1,73 @@ +--- +title: PixelFormat +parent: Enumerations +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Enumerations/PixelFormat +--- + +# PixelFormat enumeration +{: .no_toc } + +Specifies the format of the pixels of a bitmap in memory. + +A pixel format is a number made of three parts. Bits 0 to 7 are the index of the format. Bits 8 to 15 are the size of a pixel in bits. Bits 16 to 23 are flags, which are the first six members of the table. The formats are built from these parts with **Or**, so the flags of a format can be tested with **And**, and the package offers [**GetPixelFormatSize**](../Helpers) and the **IsAlphaPixelFormat**, **IsCanonicalPixelFormat**, **IsExtendedPixelFormat** and **IsIndexedPixelFormat** functions that do this. + +In memory a 24-bit or 32-bit pixel stores its channels in the order blue, green, red, and then alpha. + +| Member | Value | Description | +|:-------|:------|:------------| +| **PixelFormatIndexed**{: #PixelFormatIndexed } | `&H00010000` | A flag. The pixel values are indexes into a colour palette. | +| **PixelFormatGDI**{: #PixelFormatGDI } | `&H00020000` | A flag. GDI supports the format. | +| **PixelFormatAlpha**{: #PixelFormatAlpha } | `&H00040000` | A flag. The format has an alpha component. | +| **PixelFormatPAlpha**{: #PixelFormatPAlpha } | `&H00080000` | A flag. The colour components are premultiplied by the alpha component. | +| **PixelFormatExtended**{: #PixelFormatExtended } | `&H00100000` | A flag. The format has 16 bits per colour component. | +| **PixelFormatCanonical**{: #PixelFormatCanonical } | `&H00200000` | A flag. The format is one of the canonical formats: the 32-bit and 64-bit ARGB formats, with or without premultiplied alpha. | +| **PixelFormatUndefined**{: #PixelFormatUndefined } | `0` | The format is not specified. | +| **PixelFormatDontCare**{: #PixelFormatDontCare } | `0` | The format is not specified. Same as **PixelFormatUndefined**. | +| **PixelFormat1bppIndexed**{: #PixelFormat1bppIndexed } | `&H00030101` | 1 bit per pixel, indexed. | +| **PixelFormat4bppIndexed**{: #PixelFormat4bppIndexed } | `&H00030402` | 4 bits per pixel, indexed. | +| **PixelFormat8bppIndexed**{: #PixelFormat8bppIndexed } | `&H00030803` | 8 bits per pixel, indexed. | +| **PixelFormat16bppGrayScale**{: #PixelFormat16bppGrayScale } | `&H00101004` | 16 bits per pixel, grayscale: 65,536 shades of gray. | +| **PixelFormat16bppRGB555**{: #PixelFormat16bppRGB555 } | `&H00021005` | 16 bits per pixel. Red, green and blue have 5 bits each; 1 bit is not used. | +| **PixelFormat16bppRGB565**{: #PixelFormat16bppRGB565 } | `&H00021006` | 16 bits per pixel. Red has 5 bits, green has 6 bits and blue has 5 bits. | +| **PixelFormat16bppARGB1555**{: #PixelFormat16bppARGB1555 } | `&H00061007` | 16 bits per pixel. Alpha has 1 bit; red, green and blue have 5 bits each. | +| **PixelFormat24bppRGB**{: #PixelFormat24bppRGB } | `&H00021808` | 24 bits per pixel. Red, green and blue have 8 bits each. | +| **PixelFormat32bppRGB**{: #PixelFormat32bppRGB } | `&H00022009` | 32 bits per pixel. Red, green and blue have 8 bits each; 8 bits are not used. | +| **PixelFormat32bppARGB**{: #PixelFormat32bppARGB } | `&H0026200A` | 32 bits per pixel. Alpha, red, green and blue have 8 bits each. The colours are not premultiplied. This is the default format of a new **Bitmap**. | +| **PixelFormat32bppPARGB**{: #PixelFormat32bppPARGB } | `&H000E200B` | 32 bits per pixel. Alpha, red, green and blue have 8 bits each. The colours are premultiplied by the alpha component. | +| **PixelFormat48bppRGB**{: #PixelFormat48bppRGB } | `&H0010300C` | 48 bits per pixel. Red, green and blue have 16 bits each. | +| **PixelFormat64bppARGB**{: #PixelFormat64bppARGB } | `&H0034400D` | 64 bits per pixel. Alpha, red, green and blue have 16 bits each. The colours are not premultiplied. | +| **PixelFormat64bppPARGB**{: #PixelFormat64bppPARGB } | `&H001C400E` | 64 bits per pixel. Alpha, red, green and blue have 16 bits each. The colours are premultiplied by the alpha component. | +| **PixelFormat32bppCMYK**{: #PixelFormat32bppCMYK } | `&H0000200F` | 32 bits per pixel. Cyan, magenta, yellow and black have 8 bits each. | +| **PixelFormatMax**{: #PixelFormatMax } | `16` | One more than the highest index of a format. It is not a format. | + +## Used by + +- [**Bitmap**](../Bitmap) class: [**Clone**](../Bitmap#clone), [**CloneI**](../Bitmap#clonei), [**ConvertFormat**](../Bitmap#convertformat), [**LockBits**](../Bitmap#lockbits), [constructor](../Bitmap#creating) +- [**BitmapData**](../Types/BitmapData) type: **PixelFormat** +- [**Image**](../Image) class: [**PixelFormat**](../Image#pixelformat) +- [Helper functions](../Helpers): **CloneBitmapArea**, **CloneBitmapArea2**, **CloneBitmapArea2I**, **CloneBitmapAreaI**, **GetPixelFormatSize**, **IsAlphaPixelFormat**, **IsCanonicalPixelFormat**, **IsExtendedPixelFormat**, **IsIndexedPixelFormat** + +## Example + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim bmp As Bitmap = Bitmap(4!, 4!) +Dim format As PixelFormat = bmp.PixelFormat + +Debug.Print format = PixelFormat32bppARGB +Debug.Print GetPixelFormatSize(format) +Debug.Print (format And PixelFormatAlpha) <> 0 +Debug.Print (format And PixelFormatIndexed) <> 0 +' Output: +' True +' 32 +' True +' False +``` + +## See Also + +- [Enumerations](.) -- all the enumerations of the package +- [Bitmap](../Bitmap) class +- [Image](../Image) class diff --git a/docs/Reference/Contributed/GdiPlus/Enumerations/RotateFlipType.md b/docs/Reference/Contributed/GdiPlus/Enumerations/RotateFlipType.md new file mode 100644 index 00000000..feb54842 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Enumerations/RotateFlipType.md @@ -0,0 +1,61 @@ +--- +title: RotateFlipType +parent: Enumerations +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Enumerations/RotateFlipType +--- + +# RotateFlipType enumeration +{: .no_toc } + +Specifies the direction of the rotation of an image and the axis it is flipped about. + +A rotation is clockwise, in steps of 90 degrees, and happens before the flip. Several combinations give the same result, so the members have the same values: for example flipping about the vertical axis after a 180 degree rotation is the same as flipping about the horizontal axis with no rotation. + +| Member | Value | Description | +|:-------|:------|:------------| +| **RotateNoneFlipNone**{: #RotateNoneFlipNone } | `0` | No rotation and no flip. | +| **Rotate90FlipNone**{: #Rotate90FlipNone } | `1` | A rotation by 90 degrees and no flip. | +| **Rotate180FlipNone**{: #Rotate180FlipNone } | `2` | A rotation by 180 degrees and no flip. | +| **Rotate270FlipNone**{: #Rotate270FlipNone } | `3` | A rotation by 270 degrees and no flip. | +| **RotateNoneFlipX**{: #RotateNoneFlipX } | `4` | No rotation, then a horizontal flip. | +| **Rotate90FlipX**{: #Rotate90FlipX } | `5` | A rotation by 90 degrees, then a horizontal flip. | +| **Rotate180FlipX**{: #Rotate180FlipX } | `6` | A rotation by 180 degrees, then a horizontal flip. | +| **Rotate270FlipX**{: #Rotate270FlipX } | `7` | A rotation by 270 degrees, then a horizontal flip. | +| **RotateNoneFlipY**{: #RotateNoneFlipY } | `6` | No rotation, then a vertical flip. Same as **Rotate180FlipX**. | +| **Rotate90FlipY**{: #Rotate90FlipY } | `7` | A rotation by 90 degrees, then a vertical flip. Same as **Rotate270FlipX**. | +| **Rotate180FlipY**{: #Rotate180FlipY } | `4` | A rotation by 180 degrees, then a vertical flip. Same as **RotateNoneFlipX**. | +| **Rotate270FlipY**{: #Rotate270FlipY } | `5` | A rotation by 270 degrees, then a vertical flip. Same as **Rotate90FlipX**. | +| **RotateNoneFlipXY**{: #RotateNoneFlipXY } | `2` | No rotation, then a horizontal and a vertical flip. Same as **Rotate180FlipNone**. | +| **Rotate90FlipXY**{: #Rotate90FlipXY } | `3` | A rotation by 90 degrees, then a horizontal and a vertical flip. Same as **Rotate270FlipNone**. | +| **Rotate180FlipXY**{: #Rotate180FlipXY } | `0` | A rotation by 180 degrees, then a horizontal and a vertical flip. Same as **RotateNoneFlipNone**. | +| **Rotate270FlipXY**{: #Rotate270FlipXY } | `1` | A rotation by 270 degrees, then a horizontal and a vertical flip. Same as **Rotate90FlipNone**. | + +## Used by + +- [**Image**](../Image) class: [**RotateFlip**](../Image#rotateflip) + +## Example + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim bmp As Bitmap = Bitmap(4!, 2!) +bmp.Pixel(0, 0) = Color(CColor.Red) +Debug.Print bmp.Width, bmp.Height + +bmp.RotateFlip Rotate90FlipNone +Debug.Print bmp.Width, bmp.Height +Debug.Print Hex$(bmp.Pixel(1, 0).Value) +' Output: +' 4 2 +' 2 4 +' FFFF0000 +``` + +A rotation by 90 degrees swaps the width and the height. The red pixel at the upper left corner moves to the upper right corner. + +## See Also + +- [RotateFlipType](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusimaging/ne-gdiplusimaging-rotatefliptype) -- Microsoft's documentation of the GDI+ enumeration +- [Enumerations](.) -- all the enumerations of the package +- [Image](../Image) class diff --git a/docs/Reference/Contributed/GdiPlus/Enumerations/index.md b/docs/Reference/Contributed/GdiPlus/Enumerations/index.md new file mode 100644 index 00000000..834a853b --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Enumerations/index.md @@ -0,0 +1,125 @@ +--- +title: Enumerations +parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Enumerations/ +has_children: true +has_toc: false +nav_order: 99 +--- + +# GdiPlus Enumerations +{: .no_toc } + +The 74 public enumerations of the package, in groups by topic. The members of an enumeration can be written with or without the name of the enumeration, as in `FillModeWinding` or `GpFillmode.FillModeWinding`. + +Most of them are GDI+ enumerations, with the names and the values of the GDI+ header files, and a **Gp** in front of the name of the ones whose name a class of the package uses. **CColor**, **GraphicsCreationOptions**, **GraphicsFlags**, **FillStyleConstants** and **GpErrorHandlingStrategy** belong to the package. + +## Drawing +{: .no_toc } + +Lines, shapes, fills, pens, brushes, paths, regions, transformations and the settings of a drawing surface. + +- [GpBrushType](GpBrushType) -- the five kinds of brush +- [GpCombineMode](GpCombineMode) -- how clip regions combine +- [GpCompositingMode](GpCompositingMode) -- how a drawn colour combines with the background +- [GpCompositingQuality](GpCompositingQuality) -- gamma correction when colours are blended +- [GpCoordinateSpace](GpCoordinateSpace) -- world, page and device coordinates +- [GpCustomLineCapType](GpCustomLineCapType) -- kinds of custom line cap +- [GpDashCap](GpDashCap) -- the ends of the dashes of a dashed line +- [GpDashStyle](GpDashStyle) -- the dash patterns of a pen +- [GpFillmode](GpFillmode) -- how a self-intersecting path is filled +- [GpFlushIntention](GpFlushIntention) -- when to flush the drawing queue +- [GpHatchStyle](GpHatchStyle) -- the 53 hatch patterns of a hatch brush +- [GpInterpolationMode](GpInterpolationMode) -- algorithm used to scale and rotate images +- [GpLineCap](GpLineCap) -- line ends and anchors +- [GpLineJoin](GpLineJoin) -- how two joined lines meet +- [GpLinearGradientMode](GpLinearGradientMode) -- direction of a linear gradient +- [GpMatrixOrder](GpMatrixOrder) -- order in which a transformation is applied +- [GpPathPointType](GpPathPointType) -- point types and flags in a path +- [GpPenAlignment](GpPenAlignment) -- where a pen sits on the line +- [GpPenType](GpPenType) -- the fill of a pen +- [GpPixelOffsetMode](GpPixelOffsetMode) -- where the centre of a pixel is +- [GpQualityMode](GpQualityMode) -- speed against quality +- [GpSmoothingMode](GpSmoothingMode) -- antialiasing of lines and curves +- [GpUnit](GpUnit) -- units of measure +- [GpWarpMode](GpWarpMode) -- perspective and bilinear warps +- [GpWrapMode](GpWrapMode) -- tiling of brushes and images +- [GraphicsCreationOptions](GraphicsCreationOptions) -- what a Graphics object is created from +- [GraphicsFlags](GraphicsFlags) -- settings of VBGraphics +- [FillStyleConstants](FillStyleConstants) -- fill style of VBGraphics + +## Text +{: .no_toc } + +Fonts, text layout and text rendering. + +- [GpDriverStringOptions](GpDriverStringOptions) -- options of driver strings +- [GpFontStyle](GpFontStyle) -- bold, italic, underline and strikeout +- [GpGenericFontFamily](GpGenericFontFamily) -- the three generic font families +- [GpHotkeyPrefix](GpHotkeyPrefix) -- how an ampersand marks a hot key +- [GpStringAlignment](GpStringAlignment) -- alignment of text in its rectangle +- [GpStringDigitSubstitute](GpStringDigitSubstitute) -- digits that follow the user's language +- [GpStringFormatFlags](GpStringFormatFlags) -- layout and display options of text +- [GpStringTrimming](GpStringTrimming) -- how text is cut to fit +- [GpTextRenderingHint](GpTextRenderingHint) -- quality of rendered text + +## Images +{: .no_toc } + +Bitmaps, pixel formats, image files and codecs, palettes and effects. + +- [HistogramFormat](HistogramFormat) -- histograms of a bitmap +- [CurveAdjustments](CurveAdjustments) -- adjustments of the ColorCurve effect +- [CurveChannel](CurveChannel) -- channels of the ColorCurve effect +- [GpEncoderParameterValueType](GpEncoderParameterValueType) -- data types of codec parameters +- [GpEncoderValue](GpEncoderValue) -- values passed to image encoders +- [GpImageType](GpImageType) -- bitmap or metafile +- [GpImageCodecFlags](GpImageCodecFlags) -- attributes of an image codec +- [GpPropertyTagType](GpPropertyTagType) -- data types of image properties +- [ImageFlags](ImageFlags) -- attributes of the pixel data of an image +- [ImageLockMode](ImageLockMode) -- access modes of Bitmap.LockBits +- [ItemDataPosition](ItemDataPosition) -- where custom metadata is stored in a file +- [RotateFlipType](RotateFlipType) -- rotations and flips of an image +- [DitherType](DitherType) -- dithering when a bitmap is converted +- [PaletteFlags](PaletteFlags) -- attributes of a palette +- [PaletteType](PaletteType) -- standard colour palettes +- [PixelFormat](PixelFormat) -- formats of the pixels of a bitmap + +## Colour +{: .no_toc } + +Colour values, colour channels and colour adjustment. + +- [CColor](CColor) -- 140 named colours, as ARGB values +- [ColorChannelFlags](ColorChannelFlags) -- channels of the CMYK output of ImageAttributes +- [ColorMask](ColorMask) -- bit masks of the colour channels +- [ColorMode](ColorMode) -- 32-bit or 64-bit colours +- [ColorShift](ColorShift) -- bit positions of the colour channels +- [ColorAdjustType](ColorAdjustType) -- which objects an adjustment applies to +- [ColorMatrixFlags](ColorMatrixFlags) -- which colours a colour matrix changes + +## Metafiles +{: .no_toc } + +Windows metafiles, enhanced metafiles and EMF+ files, and the records they hold. + +- [GpConvertToEmfPlusFlags](GpConvertToEmfPlusFlags) -- results of converting an EMF to EMF+ +- [GpEMR](GpEMR) -- record types of enhanced metafiles +- [GpEmfPlusRecordType](GpEmfPlusRecordType) -- record types of WMF, EMF and EMF+ files +- [GpEmfToWmfBitsFlags](GpEmfToWmfBitsFlags) -- options of EMF to WMF conversion +- [GpEmfType](GpEmfType) -- records written to a new metafile +- [GpMetafileFrameUnit](GpMetafileFrameUnit) -- unit of the frame rectangle of a metafile +- [GpMetafileFunctions](GpMetafileFunctions) -- function numbers of Windows metafiles +- [GpMetafileType](GpMetafileType) -- kinds of metafile +- [GpObjectType](GpObjectType) -- types of object in an EMF+ record + +## Platform +{: .no_toc } + +Start-up, status codes and error handling. + +- [GpTestControlEnum](GpTestControlEnum) -- internal test settings of GDI+ +- [GdiplusDebugEventLevel](GdiplusDebugEventLevel) -- severity of a debug event +- [GdiplusStartupParams](GdiplusStartupParams) -- options of GDI+ start-up +- [GpErrorHandlingStrategy](GpErrorHandlingStrategy) -- what happens when a call fails +- [GpStatus](GpStatus) -- result codes of GDI+ calls diff --git a/docs/Reference/Contributed/GdiPlus/Font.md b/docs/Reference/Contributed/GdiPlus/Font.md new file mode 100644 index 00000000..040392d9 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Font.md @@ -0,0 +1,249 @@ +--- +title: Font +parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Font +has_toc: false +--- + +# Font class +{: .no_toc } + +Describes a font by its family, size, style and unit, for drawing and measuring text. + +A **Font** object is what [**Graphics.DrawString**](Graphics) and [**Graphics.MeasureString**](Graphics) take to draw and measure text. It holds one [**FontFamily**](FontFamily), a size, a style such as bold or italic, and the unit of the size. A **Font** is read-only after it is created: to change the size or the style, create another one. The class mirrors the GDI+ [Font](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusheaders/nl-gdiplusheaders-font) class. + +> [!NOTE] 0.9.45.0 +> In a project that references OLE Automation, which is the default, **Font** is also the name of a type of that library. A variable declared **As Font** therefore holds the OLE type, and assigning a GDI+ font to it raises run-time error -2147467262, *No such interface supported*. Declare the variable **As GdiPlus.Font**. The function **Font**( ) in the examples below resolves to the package without a prefix. A **New Font**( ... ) expression does not compile without the prefix either (TB5074), so write **New GdiPlus.Font**( ... ). + +* TOC +{:toc} + +## Creating + +Every form of **Font** is available both as the constructor function **Font**( ... ) and as **New GdiPlus.Font**( ... ). The function is shorter, and the two are the same. + +### From a family name + +Syntax: *font* **= Font**( *familyName*, *emSize* [, *style* [, *unit* [, *fontCollection*]]] ) + +*familyName* +: *required* A **String** naming the font family, such as `"Segoe UI"`. + +*emSize* +: *required* A **Single** with the size of the em square, in the unit given by *unit*. It must be greater than 0. A fractional literal such as `9.5` is a **Double** and the overloaded function refuses it (TB5073): write `9.5!`. + +*style* +: *optional* A [**GpFontStyle**](Enumerations/GpFontStyle) value or a combination of them. The default is **FontStyleRegular**. + +*unit* +: *optional* A [**GpUnit**](Enumerations/GpUnit) value for *emSize*. The default is **UnitPoint**. + +*fontCollection* +: *optional* A [**FontCollection**](FontCollection) in which to look for the family. When it is omitted, the installed fonts are searched. + +A *familyName* that is not found does not make the font unavailable. The font is created in the generic sans serif family instead, as the GDI+ C++ class does, and [**LastResult**](GdiPlusBase) stays **Ok**. To find out whether a name exists, create a [**FontFamily**](FontFamily) from it and read [**IsAvailable**](FontFamily#isavailable). + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim f As GdiPlus.Font = Font(GenericSansSerif(), 12!, FontStyleBold, UnitPixel) +Debug.Print f.IsAvailable ' True +Debug.Print f.Size ' 12 +Debug.Print f.Style ' 1 +Debug.Print f.Unit ' 2 + +' A name that does not exist falls back to the generic sans serif family. +Dim g As GdiPlus.Font = Font("No such family", 20, FontStyleItalic, UnitPixel) +Debug.Print g.IsAvailable ' True +Debug.Print g.Family.FamilyName = GenericSansSerif().FamilyName ' True +``` + +### From a family + +Syntax: *font* **= Font**( *family*, *emSize* [, *style* [, *unit* [, *fontCollection*]]] ) + +*family* +: *required* A [**FontFamily**](FontFamily). + +The other parameters are as for a family name. A *family* that is not available gives a font that is not available: [**IsAvailable**](#isavailable) returns **False** and **LastResult** is **InvalidParameter**. So does an *emSize* of 0 or less. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim fam As FontFamily = GenericSerif() +Dim f As GdiPlus.Font = Font(fam, 9.5!, FontStyleBold Or FontStyleItalic) +Debug.Print f.Size ' 9.5 +Debug.Print f.Style ' 3 +Debug.Print f.Unit ' 3 + +Dim bad As GdiPlus.Font = Font(FontFamily("No such family"), 12!) +Debug.Print bad.IsAvailable ' False +Debug.Print bad.LastResult ' 2 +``` + +### From a device context + +Syntax: *font* **= Font**( *hdc* ) + +Syntax: *font* **= Font**( *hdc*, *hfont* ) + +Syntax: *font* **= Font**( *hdc*, *logfont* ) + +*hdc* +: *required* A **LongPtr** handle of a device context. + +*hfont* +: *required* A **LongPtr** handle of a GDI font. The package reads the description of that font and creates the GDI+ font from it, in the context of *hdc*. When *hfont* is 0, or its description cannot be read, the font currently selected into *hdc* is used instead. + +*logfont* +: *required* A **LOGFONTA** or **LOGFONTW** structure (the package's `GDIP_LOGFONTA` and `GDIP_LOGFONTW` types) that describes the font. + +**Font**( *hdc* ) creates a font from the font currently selected into the device context. GDI+ draws only TrueType and OpenType fonts. For any other font, such as the raster font a new bitmap's device context starts with, the result is a font that is not available, and **LastResult** is **NotTrueTypeFont**. + +```tb check_build +Dim user As GdiPlusUser = GdiPlusUser() + +Dim bmp As Bitmap = Bitmap(40!, 40!) +Dim g As Graphics = Graphics(bmp) +Dim dc As LongPtr = g.GetHDC() +Dim f As GdiPlus.Font = Font(dc) +g.ReleaseHDC dc +If Not f.IsAvailable Then Debug.Print "Not a TrueType font: status " & f.LastResult +``` + +### Clone + +Syntax: *copy* **=** *font*.**Clone**( ) + +Returns a new **Font** with the same family, size, style and unit. + +## Size and style + +### Family +{: .no_toc } + +Syntax: *font*.**Family** + +Returns a [**FontFamily**](FontFamily) object for the font's family. + +### IsAvailable +{: .no_toc } + +Syntax: *font*.**IsAvailable** + +Returns **True** when the object holds a GDI+ font, and **False** when creating it failed. Read [**LastResult**](GdiPlusBase) for the reason. + +### Size +{: .no_toc } + +Syntax: *font*.**Size** + +Returns a **Single** with the size of the em square, in the font's [**Unit**](#unit). + +### Style +{: .no_toc } + +Syntax: *font*.**Style** + +Returns the [**GpFontStyle**](Enumerations/GpFontStyle) value or combination of values that the font was created with. + +### Unit +{: .no_toc } + +Syntax: *font*.**Unit** + +Returns the [**GpUnit**](Enumerations/GpUnit) value of [**Size**](#size). + +## Metrics + +The metrics of a font come from its family's design-unit values ([**EmHeight**](FontFamily#emheight), [**CellAscent**](FontFamily#cellascent), [**CellDescent**](FontFamily#celldescent) and [**LineSpacing**](FontFamily#linespacing) of the family, for the font's style), scaled by the font's size. [**Ascent**](#ascent), [**Descent**](#descent) and [**LineSpacing**](#linespacing) are in the font's [**Unit**](#unit); [**GetHeight**](#getheight) is in pixels or in the unit of a **Graphics** object. They return 0 when the family's metrics cannot be read. + +### Ascent +{: .no_toc } + +Syntax: *font*.**Ascent** + +Returns a **Single** with the distance from the top of a line of text to its baseline, in the font's unit: *Size* x *CellAscent* / *EmHeight*. + +### Descent +{: .no_toc } + +Syntax: *font*.**Descent** + +Returns a **Single** with the distance from the baseline to the bottom of a line of text, in the font's unit: *Size* x *CellDescent* / *EmHeight*. + +### LineSpacing +{: .no_toc } + +Syntax: *font*.**LineSpacing** + +Returns a **Single** with the distance between the baselines of two consecutive lines, in the font's unit: *Size* x *LineSpacing* / *EmHeight*, where the last *LineSpacing* is the family's. + +### GetHeight +{: .no_toc } + +Syntax: *height* **=** *font*.**GetHeight**( *graphics* ) + +Syntax: *height* **=** *font*.**GetHeight**( *dpi* ) + +*graphics* +: *required* A [**Graphics**](Graphics) object. The result is in the page unit of that object, and depends on its resolution. + +*dpi* +: *required* A **Single** with the number of pixels per inch of the device. + +Returns a **Single** with the line spacing of the font. With *dpi*, the result is in pixels for a device of that resolution. A font in pixels has the same height at every resolution, and a font in points has a height proportional to the resolution, equal to [**LineSpacing**](#linespacing) at 72 pixels per inch. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim px As GdiPlus.Font = Font(GenericSansSerif(), 20!, FontStyleRegular, UnitPixel) +Debug.Print Abs(px.GetHeight(96!) - px.LineSpacing) < 0.01 ' True +Debug.Print Abs(px.GetHeight(300!) - px.LineSpacing) < 0.01 ' True + +Dim pt As GdiPlus.Font = Font(GenericSansSerif(), 10!, FontStyleRegular, UnitPoint) +Debug.Print Abs(pt.GetHeight(72!) - pt.LineSpacing) < 0.01 ' True +Debug.Print Abs(pt.GetHeight(144!) - 2 * pt.LineSpacing) < 0.01 ' True +Debug.Print px.Ascent > 0 And px.Descent > 0 ' True +``` + +## Interoperating with GDI + +### GetLogFontA, GetLogFontW +{: .no_toc } + +Syntax: *logfont* **=** *font*.**GetLogFontA**( *graphics* ) + +Syntax: *logfont* **=** *font*.**GetLogFontW**( *graphics* ) + +Syntax: *status* **=** *font*.**GetLogFontA**( *graphics*, *logfont* ) + +Syntax: *status* **=** *font*.**GetLogFontW**( *graphics*, *logfont* ) + +*graphics* +: *required* A [**Graphics**](Graphics) object. Its page unit and resolution convert the font's size to the height in the structure. + +*logfont* +: *required* A **LOGFONTA** or **LOGFONTW** structure that receives the description. + +Returns a **LOGFONTA** or **LOGFONTW** structure (the package's `GDIP_LOGFONTA` and `GDIP_LOGFONTW` types) that describes the font, in a form that the GDI function **CreateFontIndirect** accepts. The second form of each fills a structure that the caller owns and returns a [**GpStatus**](Enumerations/GpStatus). The height is negative: a pixel font of 20 pixels gives -20. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim f As GdiPlus.Font = Font(GenericSansSerif(), 20!, FontStyleBold, UnitPixel) +Dim bmp As Bitmap = Bitmap(10!, 10!) +Dim g As Graphics = Graphics(bmp) +Dim lf As Any = f.GetLogFontW(g) +Debug.Print lf.LFHeight ' -20 +Debug.Print lf.LFWeight ' 700 +``` + +## See Also + +- [FontFamily](FontFamily) class -- a family of fonts, and its design metrics +- [FontCollection](FontCollection) class -- a set of font families to take a font from +- [StringFormat](StringFormat) class -- the layout of the text that a **Font** draws +- [Graphics](Graphics) class -- **DrawString** and **MeasureString** +- [Enumerations/GpFontStyle](Enumerations/GpFontStyle) -- the styles +- [Font class](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusheaders/nl-gdiplusheaders-font) -- Microsoft's GDI+ reference diff --git a/docs/Reference/Contributed/GdiPlus/FontCollection.md b/docs/Reference/Contributed/GdiPlus/FontCollection.md new file mode 100644 index 00000000..6964474c --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/FontCollection.md @@ -0,0 +1,57 @@ +--- +title: FontCollection +parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/FontCollection +has_toc: false +--- + +# FontCollection class +{: .no_toc } + +The base class of the two classes that hold a set of font families: [**InstalledFontCollection**](InstalledFontCollection) and [**PrivateFontCollection**](PrivateFontCollection). + +A **FontCollection** is not created on its own. It gives its two derived classes the members that list the families in the collection. A variable declared **As FontCollection** can hold either of them, which is how the *fontCollection* parameter of [**FontFamily**](FontFamily) and of [**Font**](Font) accepts both. The class mirrors the GDI+ [FontCollection](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusheaders/nl-gdiplusheaders-fontcollection) class. + +> [!WARNING] 0.9.45.0, BETA 1005 +> Neither derived class can be created, so none of the members on this page can be used. See the warning on [**InstalledFontCollection**](InstalledFontCollection#creating) and on [**PrivateFontCollection**](PrivateFontCollection#creating). The rest of this page describes the members as the source defines them. + +## Creating + +A **FontCollection** cannot be created. Create an [**InstalledFontCollection**](InstalledFontCollection#creating) or a [**PrivateFontCollection**](PrivateFontCollection#creating) instead. + +## Members + +### FamilyCount +{: .no_toc } + +Syntax: *count* **=** *collection*.**FamilyCount** + +Returns a **Long** with the number of font families in the collection. + +### Families +{: .no_toc } + +Syntax: *families* **=** *collection*.**Families**( ) + +Returns an array of [**FontFamily**](FontFamily) objects, one for each family in the collection. The array is one-based: the lowest index is 1 and the highest is **FamilyCount**. When the call fails, nothing is returned. + +A collection with no families has no array to return, and the call raises a run-time error. Check **FamilyCount** first when the collection may be empty. + +```tb check_build +Dim user As GdiPlusUser = GdiPlusUser() + +Dim fonts As FontCollection = InstalledFontCollection() +Dim families() As FontFamily = fonts.Families +Dim i As Long +For i = 1 To fonts.FamilyCount + Debug.Print families(i).FamilyName +Next +``` + +## See Also + +- [InstalledFontCollection](InstalledFontCollection) class -- the fonts installed on the system +- [PrivateFontCollection](PrivateFontCollection) class -- fonts loaded from files or memory for one program +- [FontFamily](FontFamily) class -- one member of a collection +- [Font](Font) class +- [FontCollection class](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusheaders/nl-gdiplusheaders-fontcollection) -- Microsoft's GDI+ reference diff --git a/docs/Reference/Contributed/GdiPlus/FontFamily.md b/docs/Reference/Contributed/GdiPlus/FontFamily.md new file mode 100644 index 00000000..ccb036ab --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/FontFamily.md @@ -0,0 +1,176 @@ +--- +title: FontFamily +parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/FontFamily +has_toc: false +--- + +# FontFamily class +{: .no_toc } + +A set of fonts that share a typeface design and differ in style, such as Arial regular, bold and italic. + +A **FontFamily** tells which styles a typeface supports and gives its design metrics. It is what a [**Font**](Font) is created from. Three generic families, [**GenericSansSerif**](#generic-families), **GenericSerif** and **GenericMonospace**, always exist. The class mirrors the GDI+ [FontFamily](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusheaders/nl-gdiplusheaders-fontfamily) class. + +* TOC +{:toc} + +## Creating + +Syntax: *family* **= FontFamily**( *name* [, *fontCollection*] ) + +Syntax: *family* **= New FontFamily**( *name* [, *fontCollection*] ) + +*name* +: *required* A **String** with the name of the family, such as `"Arial"`. + +*fontCollection* +: *optional* A [**FontCollection**](FontCollection) in which to look for the family. When it is omitted, the installed fonts are searched. + +Creating a family does not fail when the name is unknown. The object is created, [**IsAvailable**](#isavailable) returns **False**, and **LastResult** is **FontFamilyNotFound**. Every other member then fails with **InvalidParameter** and returns an empty value. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim missing As FontFamily = FontFamily("No such family") +Debug.Print missing.IsAvailable ' False +Debug.Print missing.LastResult ' 14 +Debug.Print missing.IsBoldAvailable ' False +Debug.Print missing.LastResult ' 2 +``` + +### Clone + +Syntax: *copy* **=** *family*.**Clone**( ) + +Returns a new **FontFamily** for the same family. + +## Generic families + +Syntax: *family* **= GenericSansSerif**( ) + +Syntax: *family* **= GenericSerif**( ) + +Syntax: *family* **= GenericMonospace**( ) + +Each function returns a family that exists on every system, which makes it the safe choice for a font that must not fail. The families are a sans serif face, a serif face and a fixed-pitch face. Windows decides which installed font stands for each. The object is created on the first call and every later call returns the same object. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim a As FontFamily = GenericSansSerif() +Debug.Print a.IsAvailable ' True +Debug.Print a Is GenericSansSerif() ' True +Debug.Print GenericSerif() Is GenericSansSerif() ' False +Debug.Print GenericMonospace().IsAvailable ' True +``` + +## Name and availability + +### FamilyName +{: .no_toc } + +Syntax: *name* **=** *family*.**FamilyName** [ ( *language* ) ] + +*language* +: *optional* An **Integer** language identifier (a `LANGID`) that selects the language of the name. The default 0 is the neutral language, which gives the name in the language of the system. For example, 1033 asks for US English. + +Returns a **String** with the name of the family. The result is an empty string when the family is not available. + +> [!WARNING] 0.9.45.0 +> **FamilyName** returns the name followed by a NUL character (`vbNullChar`). The name read back therefore does not equal the name that was given: `FontFamily("Arial").FamilyName = "Arial"` is **False**. Remove the character before comparing or displaying the name, for example with `Replace(name, vbNullChar, "")`. Passing the name, with its NUL, to **FontFamily**( ) or to **Font**( ) still finds the family. +> +> ```tb check_build check_run +> Dim user As GdiPlusUser = GdiPlusUser() +> +> Dim name As String = GenericSansSerif().FamilyName +> Debug.Print InStr(name, vbNullChar) = Len(name) ' True +> Debug.Print Len(Replace(name, vbNullChar, "")) = Len(name) - 1 ' True +> Debug.Print FontFamily(Replace(name, vbNullChar, "")).IsAvailable ' True +> ``` + +### IsAvailable +{: .no_toc } + +Syntax: *family*.**IsAvailable** + +Returns **True** when the object holds a GDI+ font family, and **False** when creating it failed. + +### IsStyleAvailable +{: .no_toc } + +Syntax: *available* **=** *family*.**IsStyleAvailable**( *style* ) + +*style* +: *required* A [**GpFontStyle**](Enumerations/GpFontStyle) value. + +Returns **True** when the family has fonts of that style. A [**Font**](Font) created with a style that its family lacks is not available, and its **LastResult** is **FontStyleNotFound**. + +### IsBoldAvailable, IsItalicAvailable, IsBoldItalicAvailable, IsUnderlinedAvailable, IsStrikeoutAvailable +{: .no_toc } + +Syntax: *family*.**IsBoldAvailable** + +Each property returns **True** when the family has fonts of the style in its name. They are the same as **IsStyleAvailable** called with **FontStyleBold**, **FontStyleItalic**, **FontStyleBoldItalic**, **FontStyleUnderline** and **FontStyleStrikeout**. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim ff As FontFamily = GenericSansSerif() +Debug.Print ff.IsStyleAvailable(FontStyleRegular) ' True +Debug.Print ff.IsBoldAvailable = ff.IsStyleAvailable(FontStyleBold) ' True +Debug.Print ff.IsItalicAvailable = ff.IsStyleAvailable(FontStyleItalic) ' True +``` + +## Design metrics + +The four properties return **Integer** values in the design units of the font file, a grid that depends on the typeface. For example, many TrueType fonts use 2048 units to the em. The values are not pixels: scale them by the size of a font, as in *Size* x *CellAscent* / *EmHeight*. A [**Font**](Font) does this scaling in its [**Ascent**](Font#ascent), [**Descent**](Font#descent) and [**LineSpacing**](Font#linespacing) properties. All four take the style, because the metrics of a bold or italic font can differ from the regular ones. + +### EmHeight +{: .no_toc } + +Syntax: *units* **=** *family*.**EmHeight**( *style* ) + +Returns the height of the em square, in design units. + +### CellAscent +{: .no_toc } + +Syntax: *units* **=** *family*.**CellAscent**( *style* ) + +Returns the height of the character cell above the baseline, in design units. + +### CellDescent +{: .no_toc } + +Syntax: *units* **=** *family*.**CellDescent**( *style* ) + +Returns the height of the character cell below the baseline, in design units. + +### LineSpacing +{: .no_toc } + +Syntax: *units* **=** *family*.**LineSpacing**( *style* ) + +Returns the distance between the baselines of two consecutive lines, in design units. + +All four take a [**GpFontStyle**](Enumerations/GpFontStyle) value as *style*. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim ff As FontFamily = GenericSansSerif() +Dim em As Long = ff.EmHeight(FontStyleRegular) +Dim size As Single = 20! + +Dim f As GdiPlus.Font = Font(ff, size, FontStyleRegular, UnitPixel) +Debug.Print Abs(f.Ascent - size * ff.CellAscent(FontStyleRegular) / em) < 0.01 ' True +Debug.Print Abs(f.LineSpacing - size * ff.LineSpacing(FontStyleRegular) / em) < 0.01 ' True +``` + +## See Also + +- [Font](Font) class -- a font created from a family +- [FontCollection](FontCollection) class -- a set of families +- [Enumerations/GpFontStyle](Enumerations/GpFontStyle) -- the styles +- [FontFamily class](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusheaders/nl-gdiplusheaders-fontfamily) -- Microsoft's GDI+ reference diff --git a/docs/Reference/Contributed/GdiPlus/GdiPlusAbort.md b/docs/Reference/Contributed/GdiPlus/GdiPlusAbort.md new file mode 100644 index 00000000..f81a65a0 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/GdiPlusAbort.md @@ -0,0 +1,40 @@ +--- +title: GdiPlusAbort +parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/GdiPlusAbort +has_toc: false +--- + +# GdiPlusAbort interface +{: .no_toc } + +An object that GDI+ can ask whether a long operation should stop. + +**GdiPlusAbort** declares one method, **Abort**. A class that implements it can be passed to [**Image**](Image)**.SetAbort**, which hands it to GDI+. It mirrors the `GdiplusAbort` interface of GDI+ 1.1. + +```tb check_build +Class StopWhenAsked + Implements GdiPlusAbort + + Public StopNow As Boolean + + Private Function GdiPlusAbort_Abort() As Long Implements GdiPlusAbort.Abort + Return If(StopNow, 1, 0) + End Function +End Class +``` + +## Abort + +Syntax: *object*.**Abort**( ) As **Long** + +GDI+ calls it from time to time during a long operation on the image. Returning a value other than 0 asks GDI+ to stop the operation; returning 0 lets it go on. + +> [!WARNING] 0.9.45.0 +> Do not use this interface. GDI+ 1.0 and 1.1 do not implement the aborts, and an image that has been given an implementation with **SetAbort** causes an access violation in GDI+ the next time it is drawn. + +## See Also + +- [Image](Image) class -- **SetAbort** +- [Graphics](Graphics) class -- **SetAbort**, which takes a raw pointer +- [Types](Types/) -- the types of the package diff --git a/docs/Reference/Contributed/GdiPlus/GdiPlusBase.md b/docs/Reference/Contributed/GdiPlus/GdiPlusBase.md new file mode 100644 index 00000000..3b239bfa --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/GdiPlusBase.md @@ -0,0 +1,152 @@ +--- +title: GdiPlusBase +parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/GdiPlusBase +has_toc: false +--- + +# GdiPlusBase class +{: .no_toc } + +The base class of the classes of the package. It keeps the result of the last GDI+ call and carries out the error handling. + +A program does not create a **GdiPlusBase**. Every other class of the package inherits from it: [**GdiPlusUser**](GdiPlusUser), [**Graphics**](Graphics), [**Pen**](Pen), [**Bitmap**](Bitmap) and the rest, so the members below are members of all of them. A variable of the type **GdiPlusBase** holds any one of them. + +Almost every method and constructor of the package calls GDI+, and GDI+ reports a failure as a status code. A method that returns no value returns that status as a [**GpStatus**](Enumerations/GpStatus); the other methods return their value and leave the status in **LastResult**. When a constructor fails, it creates an object that cannot be used, and its **LastResult** says why. + +## Creating + +A **GdiPlusBase** cannot be created. Create one of the classes that inherit from it, such as [**GdiPlusUser**](GdiPlusUser#creating), [**Graphics**](Graphics#creating) or [**Pen**](Pen#creating). + +## Last result + +### LastResult + +Syntax: *object*.**LastResult** As **GpStatus** + +Read-only. Returns the status of the most recent call on the object that failed. **Ok**, the value 0, means that none has failed. + +A successful call does not set **LastResult** back to **Ok**. Clear it with **ClearResult** or **GetLastResult** before a call whose result you want to look at. + +### Status, StatusNL + +Syntax: *object*.**Status** As **String** \ +Syntax: *object*.**StatusNL** As **String** + +Read-only. Return the text of **LastResult**, such as `Ok`, `Invalid Parameter` or `Out of Memory`. **StatusNL** ends the text with a carriage return and a line feed. The text of any status is also returned by [**AsText**](Helpers#astext). + +### ClearResult, GetLastResult + +Syntax: *object*.**ClearResult**( ) As **GpStatus** \ +Syntax: *object*.**GetLastResult**( ) As **GpStatus** + +Both set **LastResult** back to **Ok** and return the value it had. They are the same function. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim bmp As Bitmap = Bitmap(8!, 8!) +Debug.Print bmp.LastResult ' 0 +Debug.Print bmp.Status ' Ok +Dim c As Color = bmp.Pixel(100, 100) ' outside the bitmap +Debug.Print bmp.LastResult ' 2 +Debug.Print bmp.Status ' Invalid Parameter +c = bmp.Pixel(1, 1) +Debug.Print bmp.LastResult ' 2 -- a good call does not clear it +Debug.Print bmp.GetLastResult() ' 2 +Debug.Print bmp.LastResult ' 0 +``` + +## Memory + +### Alloc, Free + +Syntax: *class*.**Alloc**( *size* As **LongPtr** ) As **LongPtr** \ +Syntax: *class*.**Free**( *pointer* As **LongPtr** ) + +Static members. **Alloc** reserves a block of *size* bytes with the allocator of GDI+ and returns its address, or 0. **Free** releases a block that **Alloc** returned. They are for the buffers that GDI+ itself hands over to or takes from a program. + +> [!NOTE] 0.9.45.0 +> Call them through a class that inherits from **GdiPlusBase**, as in `GdiPlusUser.Alloc(64)`. The name `GdiPlusBase.Alloc` is not recognised. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim block As LongPtr = GdiPlusUser.Alloc(64) +Debug.Print block <> 0 ' True +GdiPlusUser.Free block +``` + +## Error handling + +By default a failure is only recorded in **LastResult**. Three variables of the package, shared by all objects, choose another behaviour. + +### GdipErrorHandlingStrategy + +Syntax: **GdipErrorHandlingStrategy** [ = *strategy* ] As [**GpErrorHandlingStrategy**](Enumerations/GpErrorHandlingStrategy) + +What happens, after the status has been recorded, when a call fails: + +| Strategy | Behaviour | +|---|---| +| **IgnoreErrors** | Nothing more. This is the default. | +| **RaiseErrors** | A run-time error is raised with the number **GdipErrorCodeBase** plus the status, the source `GdiPlus:` followed by the type name of the object (such as `GdiPlus:Bitmap`) and the status number as its description. | +| **HandleErrors** | The function in **GdipErrorHandler** is called, when it is set. | +| **StopOnErrors** | A `Stop` statement runs, which acts as a breakpoint in the debugger. | + +### GdipErrorCodeBase + +Syntax: **GdipErrorCodeBase** [ = *value* ] As **Long** + +The number that is added to the status to make the error number under **RaiseErrors**. The default is 3300, so a status 2 is error 3302. + +### GdipErrorHandler + +Syntax: **GdipErrorHandler** [ = *function* ] As **GdipErrorHandler** + +Under **HandleErrors**, the function that is called with the object that failed. Its **LastResult** has been set to the status. The delegate type has the signature **Function**( *obj* As **GdiPlusBase** ). The variable is 0 until a function is assigned. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim bmp As Bitmap = Bitmap(8!, 8!) +GdipErrorHandlingStrategy = RaiseErrors +On Error Resume Next +Dim c As Color = bmp.Pixel(100, 100) ' outside the bitmap +Debug.Print Err.Number ' 3302 +Debug.Print Err.Source ' GdiPlus:Bitmap +Debug.Print Err.Description ' 2 +GdipErrorHandlingStrategy = IgnoreErrors +``` + +A handler is a function in a module, assigned with **CType** and **AddressOf**. + +```tb check_build projname=gdiplusbase-handler +Public LastFailure As String + +Function OnGdiPlusError(ByVal obj As GdiPlusBase) As Variant + LastFailure = TypeName(obj) & " " & obj.LastResult +End Function +``` + +```tb check_build check_run projname=gdiplusbase-handler +Dim user As GdiPlusUser = GdiPlusUser() +Dim bmp As Bitmap = Bitmap(8!, 8!) +GdipErrorHandlingStrategy = HandleErrors +GdipErrorHandler = CType(Of GdipErrorHandler)(AddressOf OnGdiPlusError) +Dim c As Color = bmp.Pixel(100, 100) ' outside the bitmap +Debug.Print LastFailure ' Bitmap 2 +GdipErrorHandlingStrategy = IgnoreErrors +``` + +## Protected members + +### SetStatus + +Syntax: **SetStatus**( *status* As **GpStatus** ) As **GpStatus** + +For the classes of the package. Called by essentially every method after a GDI+ call, it does nothing when *status* is **Ok**. Otherwise it records the status in **LastResult**, applies the error-handling strategy, and returns the status. + +## See Also + +- [GdiPlusUser](GdiPlusUser) class -- starts GDI+; the first object every program creates +- [GpStatus](Enumerations/GpStatus) enumeration -- the status codes +- [GpErrorHandlingStrategy](Enumerations/GpErrorHandlingStrategy) enumeration -- the strategies +- [Helpers](Helpers) -- **AsText** and the other module functions diff --git a/docs/Reference/Contributed/GdiPlus/GdiPlusUser.md b/docs/Reference/Contributed/GdiPlus/GdiPlusUser.md new file mode 100644 index 00000000..4a099d54 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/GdiPlusUser.md @@ -0,0 +1,120 @@ +--- +title: GdiPlusUser +parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/GdiPlusUser +has_toc: false +--- + +# GdiPlusUser class +{: .no_toc } + +Starts GDI+ for the program. One instance must exist before any other class of the package is used. + +GDI+ must be started before a program creates a pen, a bitmap or any other GDI+ object, and a **GdiPlusUser** does it. Without one, the other classes fail with status 18, *GdiplusNotInitialized*. **GdiPlusUser** inherits from [**GdiPlusBase**](GdiPlusBase), so it has the members of that class as well as the ones below. + +Create the instance with the module function **GdiPlusUser**, keep it in a variable that lives as long as the program uses GDI+, and release it when the program is done. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Debug.Print user.LastResult ' 0 +Dim bmp As Bitmap = Bitmap(64!, 64!) +Debug.Print bmp.LastResult ' 0 +``` + +> [!WARNING] 0.9.45.0 +> Two whole numbers without a format do not create a bitmap of that size. `Bitmap(64, 64)` binds to the form that takes a GDI bitmap handle and a palette handle, treats 64 and 64 as handles, and returns an unusable object with **LastResult** 7 (**Win32Error**), without any error being raised. Pass **Single** values: `Bitmap(64!, 64!)`, or give a format, as in `Bitmap(64, 64, PixelFormat32bppARGB)`. [**Bitmap**](Bitmap#creating) has the details. + +## Creating + +Syntax: **GdiPlusUser**( [ *startupParams* ] ) \ +Syntax: **GdiPlusUser**( *input* ) \ +Syntax: **GdiPlusUser**( *input*, *output* ) \ +Syntax: **New GdiPlusUser**( ... ) + +The module function **GdiPlusUser** and the `New` form take the same arguments. + +*startupParams* +: *optional* A [**GdiplusStartupParams**](Enumerations/GdiplusStartupParams) value. The default is **GdiplusStartupDefault**. With this form the package asks for GDI+ version 2 and, when the system does not have it, version 1; the flags apply to version 2 only. If neither starts, **LastResult** of the new instance says why. + +*input* +: *required* A [**GdiplusStartupInput**](Types/GdiplusStartupInput) that gives the version and the settings exactly. There is no fallback to version 1. + +*output* +: *required* A [**GdiplusStartupOutput**](Types/GdiplusStartupOutput) that receives the hook and unhook functions of GDI+. Needed when *input* has **SuppressBackgroundThread** set. + +> [!NOTE] 0.9.45.0 +> Every instance calls GDI+ to start with its own arguments, not only the first. A later instance given an invalid *input* reports the failure in its **LastResult**, although GDI+ is already running. + +> [!NOTE] 0.9.45.0 +> Releasing the last instance does not shut GDI+ down: objects that exist keep working, and new ones can still be made. GDI+ stays started until the program ends. + +## Keeping the instance alive + +Hold the instance in a variable that is created before any other GDI+ object and lives longer than all of them. In a form or a class, create it in the load handler or the constructor; in a program with a start-up procedure, create it there. + +```tb check_build +Class Painter + Private mGdiPlus As GdiPlusUser + Private mBitmap As Bitmap + + Sub New() + Set mGdiPlus = GdiPlusUser() + Set mBitmap = Bitmap(100!, 100!) + End Sub +End Class +``` + +Do not declare the variable with `New`, as in `Dim user As New GdiPlusUser`. Such a variable creates its object the first time it is used, and GDI+ objects created earlier fail with status 18: + +```tb check_build +Dim lazy As New GdiPlusUser +Dim bmp As Bitmap = Bitmap(64!, 64!) ' status 18: lazy has not been touched yet +Debug.Print lazy.LastResult ' lazy is created only here +``` + +Code that handles the window messages itself creates the instance in response to `WM_CREATE` and releases it, with `Set user = Nothing`, in response to `WM_DESTROY`. + +## Starting with other settings + +To choose the version, to suppress the background thread or to pass the other startup settings, build a [**GdiplusStartupInput**](Types/GdiplusStartupInput) and pass it to the constructor of the first instance, at the start of the program. + +```tb check_build +Dim settings As GdiplusStartupInput +settings.GdiplusVersion = 2 +settings.StartupParameters = GdiplusStartupNoSetRound +Dim user As GdiPlusUser = GdiPlusUser(settings) +If user.LastResult <> Ok Then Debug.Print user.Status +``` + +## Methods + +### GetBuildNumber + +Syntax: *user*.**GetBuildNumber**( ) As **Long** + +Returns the build number of the GDI+ library that is running. The value depends on the version of Windows. **LastResult** records a failure. + +### TestControlForceBilinear, TestControlNoICM + +Syntax: *user*.**TestControlForceBilinear**( *force* As **Boolean** ) As **GpStatus** \ +Syntax: *user*.**TestControlNoICM**( *noICM* As **Boolean** ) As **GpStatus** + +Meant to switch two debugging switches of GDI+: bilinear scaling forced for every scaled image, and the colour management turned off. + +> [!WARNING] 0.9.45.0 +> Both methods call themselves without end. Calling either on a **GdiPlusUser** ends the program with a stack overflow. Call the module functions of the same names, [**TestControlForceBilinear**](Helpers#testcontrolforcebilinear) and [**TestControlNoICM**](Helpers#testcontrolnoicm), which do what the methods were written to do. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Debug.Print user.GetBuildNumber() > 0 ' True +Debug.Print TestControlNoICM(False) ' 0 +``` + +## See Also + +- [GdiPlusBase](GdiPlusBase) class -- the members of every class: **LastResult**, **Status** and the error handling +- [GdiplusStartupInput](Types/GdiplusStartupInput) type -- the startup settings +- [GdiplusStartupOutput](Types/GdiplusStartupOutput) type -- the hook and unhook functions +- [GdiplusStartupParams](Enumerations/GdiplusStartupParams) enumeration -- the startup flags +- [Helpers](Helpers) -- the module functions of the package +- [GdiplusStartup](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusinit/nf-gdiplusinit-gdiplusstartup) -- the GDI+ function on Microsoft Learn diff --git a/docs/Reference/Contributed/GdiPlus/Graphics.md b/docs/Reference/Contributed/GdiPlus/Graphics.md new file mode 100644 index 00000000..ac353aec --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Graphics.md @@ -0,0 +1,1957 @@ +--- +title: Graphics +parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Graphics +has_toc: false +--- + +# Graphics class +{: .no_toc } + +The drawing surface of GDI+: a **Graphics** object draws lines, shapes, text and images on a bitmap, a metafile, a window or a device context. + +A **Graphics** object does all the rendering. It is created for one target, a [**Bitmap**](Bitmap), a [**Metafile**](Metafile), a window or a device context, and it keeps the state that applies to every later drawing call: the clipping area, the world transformation, the smoothing and text quality. A drawing call takes a [**Pen**](Pen) for outlines or a brush for fills, and the shape in either floating-point or integer coordinates. A **Graphics** object is meant to be short-lived. It starts its work when it is created and finishes it when the last reference to it is released. + +**Graphics** implements [**ITransformable**](ITransformable) and [**IDeviceContext**](IDeviceContext). The class mirrors the GDI+ [Graphics](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusgraphics/nl-gdiplusgraphics-graphics) class of the C++ wrapper. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim bmp As Bitmap = Bitmap(16, 8, PixelFormat32bppARGB) +Dim g As Graphics = Graphics(bmp) +g.SmoothingMode = SmoothingModeNone + +Dim red As Color = Color(255, 0, 0) +g.FillRectangle(SolidBrush(red), 2, 2, 4, 3) + +Debug.Print bmp.Pixel(3, 3).Value = red.Value ' True +Debug.Print bmp.Pixel(8, 3).Value = red.Value ' False +``` + +* TOC +{:toc} + +## Creating + +A **Graphics** object is created with a package function of the same name as the class, or with **New**. Which function creates it depends on the target. A **Graphics** object that is created for a window or a device context draws on that target directly. A buffered one draws on a bitmap of its own and copies it to the target when the object is destroyed, so the target never shows a half-drawn picture. + +A **Graphics** object does not own its target. The device context or window must stay valid for as long as the object exists. A **Graphics** object created for an image keeps a reference to the image, so the image is not released before the **Graphics** object. + +> [!NOTE] 0.9.45.0 +> The package needs a [**GdiPlusUser**](GdiPlusUser) object to be alive for as long as any GDI+ object exists. A program creates one before the first **Graphics** object and keeps it. + +### Graphics, GraphicsFromImage +{: #graphics } + +Syntax: *graphics* **= Graphics**( *image* ) + +Syntax: *graphics* **= GraphicsFromImage**( *image* ) + +Syntax: *graphics* **= New Graphics**( *image* ) + +Creates a **Graphics** object that draws on an image. + +*image* +: *required* An [**Image**](Image) to draw on. This is a [**Bitmap**](Bitmap), or a [**Metafile**](Metafile). Drawing on a **Metafile** records the drawing calls for later playback. + +Drawing on a bitmap changes the pixels of the bitmap. The three forms are the same. + +> [!NOTE] 0.9.45.0 +> The function and the constructor with a value of **Nothing** do not report an error. They return an object whose **LastResult** is **Ok**, and every drawing call on it then fails with **InvalidParameter**. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim bmp As Bitmap = Bitmap(8, 8, PixelFormat32bppARGB) + +Dim g As Graphics = Graphics(bmp) +Debug.Print g.LastResult ' 0 +g.Clear(Color(0, 0, 255)) +Debug.Print bmp.Pixel(4, 4).Value = Color(0, 0, 255).Value ' True + +Dim none As Graphics = Graphics(Nothing) +Debug.Print none.LastResult ' 0 +Debug.Print none.Clear(Color(0, 0, 255)) ' 2 +``` + +### GraphicsFromHDC + +Syntax: *graphics* **= GraphicsFromHDC**( *hdc* [, *hdevice* ] ) + +Creates a **Graphics** object that draws on a device context. + +*hdc* +: *required* A **LongPtr**: the handle of the device context. + +*hdevice* +: *optional* A **LongPtr**: the handle of a device, for a device context that belongs to a printer. The default is 0. + +### BufferedGraphicsFromHDC + +Syntax: *graphics* **= BufferedGraphicsFromHDC**( *hdc*, *drawArea* ) + +Creates a buffered **Graphics** object for a device context. All drawing goes to a bitmap compatible with *hdc*. When the object is destroyed, the bitmap is copied to *hdc*. + +*hdc* +: *required* A **LongPtr**: the handle of the device context, usually the one of a form that is being painted. + +*drawArea* +: *required* A [**GpRect**](Types/GpRect): the area of *hdc* that is painted, in the coordinates of *hdc*. + +This is the way to paint a form without flicker. A buffered **Graphics** object shows its result only when it is destroyed. Set the variable to **Nothing**, or let it go out of scope, before the procedure that painted ends. + +### GraphicsFromHWND, GraphicsFromHWNDWithICM +{: #graphicsfromhwnd } + +Syntax: *graphics* **= GraphicsFromHWND**( *hwnd* ) + +Syntax: *graphics* **= GraphicsFromHWNDWithICM**( *hwnd* ) + +Creates a **Graphics** object that draws on the client area of a window. **GraphicsFromHWNDWithICM** also applies image colour management (ICM) to what is drawn. + +*hwnd* +: *required* A **LongPtr**: the handle of the window. + +### BufferedGraphicsFromHWND + +Syntax: *graphics* **= BufferedGraphicsFromHWND**( *hwnd* ) + +Creates a buffered **Graphics** object for a window that is handling a `WM_PAINT` message. The function calls the Windows function `BeginPaint` for the window and `BeginBufferedPaint` for the area that needs painting. Destroying the object copies the buffer to the window and ends the painting (`EndPaint`). There is no ICM form of this function. + +*hwnd* +: *required* A **LongPtr**: the handle of the window. + +> [!IMPORTANT] 0.9.45.0 +> Create the object only while handling `WM_PAINT`, and do not call `BeginPaint` or `EndPaint` for the window in the same handler: the object does both. + +### Graphics (options) + +Syntax: *graphics* **= Graphics**( *options*, *h1*, *h2* ) + +Syntax: *graphics* **= New Graphics**( *options*, *h1* [, *h2* ] ) + +The general constructor, which the functions above call. + +*options* +: *required* A [**GraphicsCreationOptions**](Enumerations/GraphicsCreationOptions) value, or several added together. One of **FromHDC** and **FromHWND** names the kind of *h1*. **Buffered**, **WithHDevice** and **WithICM** change how the object is created. + +*h1* +: *required* The handle of the device context or window. + +*h2* +: *required* in the function, *optional* in **New**. With **FromHDC** and **WithHDevice**, the handle of the device. With **FromHDC** and **Buffered**, a pointer to a **RECT** that holds the area to paint. With **FromHWND** and **Buffered**, a pointer to a `BP_PAINTPARAMS` structure, or 0. Otherwise 0. + +The function takes *h1* and *h2* as **Long** and **New** as **LongPtr**. Use the specific functions above in preference to this one. + +## Painting a window or a form + +The rendering period of a **Graphics** object starts when it is created and ends when it is destroyed. For a window, a program creates the object in its paint handler, draws, and releases it. A program that handles the window messages itself creates the buffered object for the window when it receives `WM_PAINT`: + +```tb check_build slot=module +Private Const WM_CREATE = &H1 +Private Const WM_DESTROY = &H2 +Private Const WM_SIZE = &H5 +Private Const WM_PAINT = &HF + +Private Declare PtrSafe Function InvalidateRect Lib "user32" (ByVal hWnd As LongPtr, ByVal lpRect As LongPtr, ByVal bErase As Long) As Long +Private Declare PtrSafe Function DefWindowProcW Lib "user32" (ByVal hWnd As LongPtr, ByVal msg As Long, ByVal wParam As LongPtr, ByVal lParam As LongPtr) As LongPtr + +Private mUser As GdiPlusUser + +Public Function WndProc(ByVal hWnd As LongPtr, ByVal message As Long, ByVal wParam As LongPtr, ByVal lParam As LongPtr) As LongPtr + Select Case message + Case WM_CREATE + Set mUser = GdiPlusUser() + Case WM_PAINT + Dim gr As Graphics = BufferedGraphicsFromHWND(hWnd) + gr.Clear(Color(255, 255, 255)) + gr.DrawLine(Pen(Color(0, 0, 255), 3), 10, 10, 100, 60) + Set gr = Nothing ' copies the buffer to the window + Return 0 + Case WM_SIZE + InvalidateRect hWnd, 0, 0 + Case WM_DESTROY + Set mUser = Nothing + End Select + Return DefWindowProcW(hWnd, message, wParam, lParam) +End Function +``` + +In a form, the **Paint** event gives the form's device context in the **hDC** property. The form creates its **GdiPlusUser** when it loads, and repaints when it is resized: + +```tb check_build inherits=Form +Dim mGdiPlus As GdiPlusUser + +Sub Form_Load() + ScaleMode = vbPixels + Set mGdiPlus = GdiPlusUser() +End Sub + +Sub Form_Paint() + Dim area As GpRect = GpRect(0, 0, ScaleWidth, ScaleHeight) + Dim gr As Graphics = BufferedGraphicsFromHDC(hDC, area) + gr.Clear(Color(255, 255, 255)) + gr.DrawString("Hello", GdiPlus.Font("Segoe UI", 20), GpPointF(20, 20), SolidBrush(Color(0, 0, 0))) + Set gr = Nothing +End Sub + +Sub Form_Resize() + Refresh +End Sub +``` + +> [!WARNING] 0.9.45.0 +> A **GdiPlusUser** declared with **Dim ... As New** is not created until the variable is first used, so the GDI+ objects that are created before that fail with **GdiplusNotInitialized** (18). Declare the variable and set it with `Set mGdiPlus = GdiPlusUser()` in the **Load** event, as above. + +## Status and results + +A method that does not return a value returns a [**GpStatus**](Enumerations/GpStatus): **Ok** (0), or the reason it failed. The same status is stored in the **LastResult** property, which the **Graphics** class inherits from the package's base class together with **Status**, **StatusNL**, **ClearResult** and **GetLastResult**. A property, or a function that returns a value, returns no status: read **LastResult** after the call. **LastResult** keeps the most recent error. It is not set back to **Ok** by a call that succeeds, only by **ClearResult** and **GetLastResult**. + +What happens on an error is set for the whole package by the global variable **GdipErrorHandlingStrategy**: the error can be ignored, raised as an error, passed to a handler or stopped at with **Stop**. The default is to ignore it, so the examples on this page read **LastResult** and the returned status. + +In the descriptions below, a method with no result mentioned returns the **GpStatus**. + +## Flush + +### Flush + +Syntax: *status* **=** *graphics*.**Flush**( *intention* ) + +Forces the pending drawing operations to be executed. + +*intention* +: *required* A [**GpFlushIntention**](Enumerations/GpFlushIntention). **FlushIntentionFlush** returns at once. **FlushIntentionSync** returns when the operations have been completed. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim bmp As Bitmap = Bitmap(4, 4, PixelFormat32bppARGB) +Dim g As Graphics = Graphics(bmp) + +g.Clear(Color(255, 0, 0)) +Debug.Print g.Flush(FlushIntentionSync) ' 0 +``` + +### SetAbort + +Syntax: *status* **=** *graphics*.**SetAbort**( *pIAbort* ) + +*pIAbort* +: *required* A **LongPtr** to a GDI+ abort object. + +The method calls the GDI+ function that sets an abort callback. The callback is not implemented in GDI+ 1.0 and 1.1, which are the versions that Windows has. + +## Bulk clearing + +### Clear + +Syntax: *graphics*.**Clear**( *color* ) + +Syntax: *graphics*.**Clear**( *rgb* ) + +Fills the whole drawing surface with a colour. The colour replaces what was there, its alpha value included. The clipping area applies. + +*color* +: *required* A [**Color**](Types/Color). + +*rgb* +: *required* A **Long** colour. + +> [!WARNING] 0.9.45.0 +> The *rgb* form reads its **Long** as `&H00RRGGBB`, not as a VB colour: `Clear(vbRed)` and `Clear(RGB(255, 0, 0))` fill with blue. It also forces the alpha value to 255, so a [**CColor**](Enumerations/CColor) member passed to it loses its alpha. Pass a **Color**, as in `Clear(Color(255, 0, 0))`. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim bmp As Bitmap = Bitmap(4, 4, PixelFormat32bppARGB) +Dim g As Graphics = Graphics(bmp) + +g.Clear(Color(255, 0, 0)) +Debug.Print bmp.Pixel(1, 1).Value = Color(255, 0, 0).Value ' True + +g.Clear(Color(0, 0, 0, 0)) ' fully transparent +Debug.Print bmp.Pixel(1, 1).Value = 0 ' True + +g.Clear(RGB(255, 0, 0)) ' the Long form: blue +Debug.Print bmp.Pixel(1, 1).Value = Color(0, 0, 255).Value ' True + +g.SetClip(GpRect(0, 0, 2, 2)) ' the clipping area applies +g.Clear(Color(0, 255, 0)) +Debug.Print bmp.Pixel(1, 1).Value = Color(0, 255, 0).Value ' True +Debug.Print bmp.Pixel(3, 3).Value = Color(0, 255, 0).Value ' False +``` + +## Outline drawing + +The methods that draw outlines take a [**Pen**](Pen) first. The outline is centred on the edge of the shape, so with a one-pixel pen and no smoothing, **DrawRectangle** with the width 4 covers 5 pixels. An angle is in degrees. A start angle of 0 is the direction of the positive x axis, to the right, and a positive sweep angle turns clockwise on the screen. A *pen* of **Nothing** is an error: the call returns **InvalidParameter** and draws nothing. + +Almost every method exists in two sets of overloads. The floating-point set takes **Single**, [**GpPointF**](Types/GpPointF), [**GpSizeF**](Types/GpSizeF) and [**GpRectF**](Types/GpRectF), and arrays of them. The integer set takes **Long**, [**GpPoint**](Types/GpPoint), [**GpSize**](Types/GpSize) and [**GpRect**](Types/GpRect), and arrays of them. The two never mix in one call. When a method has overloads that take plain coordinates, the integer one has the suffix `I`: **DrawLineI**. The overloads with a point, a size or a rectangle have the same name in both sets. + +> [!NOTE] 0.9.45.0 +> A whole number written in the source is a **Long**, but the call `DrawLine(pen, 0, 5, 15, 5)` takes the floating-point overload: **Long** converts to **Single**. Call the `I` method to use the integer set with plain coordinates. + +### DrawLine, DrawLineI +{: #drawline } + +Syntax: *graphics*.**DrawLine**( *pen*, *x1*, *y1*, *x2*, *y2* ) + +Syntax: *graphics*.**DrawLine**( *pen*, *pt1*, *pt2* ) + +Syntax: *graphics*.**DrawLine**( *pen*, *rect* ) + +Syntax: *graphics*.**DrawLineI**( *pen*, *x1*, *y1*, *x2*, *y2* ) + +Draws a line. + +*pen* +: *required* The [**Pen**](Pen). + +*x1*, *y1*, *x2*, *y2* +: *required* **Single** (**Long** for **DrawLineI**): the start and end points. + +*pt1*, *pt2* +: *required* [**GpPointF**](Types/GpPointF) or [**GpPoint**](Types/GpPoint): the start and end points. + +*rect* +: *required* [**GpRectF**](Types/GpRectF) or [**GpRect**](Types/GpRect). The line is the diagonal of the rectangle from its top left corner to its bottom right corner. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim bmp As Bitmap = Bitmap(16, 12, PixelFormat32bppARGB) +Dim g As Graphics = Graphics(bmp) +g.SmoothingMode = SmoothingModeNone + +Dim red As Color = Color(255, 0, 0) +Dim p As Pen = Pen(red, 1) + +g.DrawLine(p, 1, 2, 14, 2) ' from (1, 2) to (14, 2) +g.DrawLine(p, GpPointF(1, 5), GpPointF(14, 5)) +g.DrawLine(p, GpRectF(4, 7, 3, 3)) ' from (4, 7) to (7, 10) + +Debug.Print bmp.Pixel(1, 2).Value = red.Value ' True +Debug.Print bmp.Pixel(14, 2).Value = red.Value ' True +Debug.Print bmp.Pixel(8, 2).Value = red.Value ' True +Debug.Print bmp.Pixel(8, 3).Value = red.Value ' False +Debug.Print bmp.Pixel(8, 5).Value = red.Value ' True +Debug.Print bmp.Pixel(4, 7).Value = red.Value ' True +Debug.Print bmp.Pixel(7, 10).Value = red.Value ' True + +Dim noPen As Pen = Nothing +Debug.Print g.DrawLine(noPen, 0, 0, 5, 5) ' 2 +``` + +### DrawLines + +Syntax: *graphics*.**DrawLines**( *pen*, *points* ) + +Draws a series of connected lines through the points. + +*pen* +: *required* The [**Pen**](Pen). + +*points* +: *required* An array of [**GpPointF**](Types/GpPointF) or [**GpPoint**](Types/GpPoint). The array has at least two points. + +### DrawArc, DrawArcI +{: #drawarc } + +Syntax: *graphics*.**DrawArc**( *pen*, *x*, *y*, *width*, *height*, *startAngle*, *sweepAngle* ) + +Syntax: *graphics*.**DrawArc**( *pen*, *pt*, *size*, *startAngle*, *sweepAngle* ) + +Syntax: *graphics*.**DrawArc**( *pen*, *rect*, *startAngle*, *sweepAngle* ) + +Syntax: *graphics*.**DrawArcI**( *pen*, *x*, *y*, *width*, *height*, *startAngle*, *sweepAngle* ) + +Draws part of the outline of an ellipse. + +*pen* +: *required* The [**Pen**](Pen). + +*x*, *y*, *width*, *height* +: *required* **Single** (**Long** for **DrawArcI**): the bounding rectangle of the whole ellipse. + +*pt*, *size* +: *required* The upper left corner and the size of the bounding rectangle: [**GpPointF**](Types/GpPointF) and [**GpSizeF**](Types/GpSizeF), or [**GpPoint**](Types/GpPoint) and [**GpSize**](Types/GpSize). + +*rect* +: *required* The bounding rectangle: [**GpRectF**](Types/GpRectF) or [**GpRect**](Types/GpRect). + +*startAngle* +: *required* A **Single**: the angle in degrees from the x axis to the start of the arc. + +*sweepAngle* +: *required* A **Single**: the angle in degrees from *startAngle* to the end of the arc. A positive angle is clockwise. + +### DrawBezier, DrawBezierI +{: #drawbezier } + +Syntax: *graphics*.**DrawBezier**( *pen*, *x1*, *y1*, *x2*, *y2*, *x3*, *y3*, *x4*, *y4* ) + +Syntax: *graphics*.**DrawBezier**( *pen*, *pt1*, *pt2*, *pt3*, *pt4* ) + +Syntax: *graphics*.**DrawBezierI**( *pen*, *x1*, *y1*, *x2*, *y2*, *x3*, *y3*, *x4*, *y4* ) + +Draws a Bezier curve. The curve starts at the first point and ends at the fourth. The second and third points are control points that shape it. + +*pen* +: *required* The [**Pen**](Pen). + +*x1*, *y1*, ..., *x4*, *y4* +: *required* **Single** (**Long** for **DrawBezierI**): the four points. + +*pt1*, *pt2*, *pt3*, *pt4* +: *required* [**GpPointF**](Types/GpPointF) or [**GpPoint**](Types/GpPoint): the four points. + +### DrawBeziers + +Syntax: *graphics*.**DrawBeziers**( *pen*, *points* ) + +Draws a series of connected Bezier curves. + +*pen* +: *required* The [**Pen**](Pen). + +*points* +: *required* An array of [**GpPointF**](Types/GpPointF) or [**GpPoint**](Types/GpPoint). The first curve takes four points, and each further curve takes the end point of the previous one and three more, so the array has 3n + 1 points. + +### DrawRectangle, DrawRectangleI +{: #drawrectangle } + +Syntax: *graphics*.**DrawRectangle**( *pen*, *x*, *y*, *width*, *height* ) + +Syntax: *graphics*.**DrawRectangle**( *pen*, *pt*, *size* ) + +Syntax: *graphics*.**DrawRectangle**( *pen*, *rect* ) + +Syntax: *graphics*.**DrawRectangleI**( *pen*, *x*, *y*, *width*, *height* ) + +Draws the outline of a rectangle. + +*pen* +: *required* The [**Pen**](Pen). + +*x*, *y*, *width*, *height* +: *required* **Single** (**Long** for **DrawRectangleI**): the rectangle. + +*pt*, *size* +: *required* The upper left corner and the size. + +*rect* +: *required* The rectangle: [**GpRectF**](Types/GpRectF) or [**GpRect**](Types/GpRect). + +### DrawRectangles + +Syntax: *graphics*.**DrawRectangles**( *pen*, *rects* ) + +Draws the outlines of several rectangles. + +*pen* +: *required* The [**Pen**](Pen). + +*rects* +: *required* An array of [**GpRectF**](Types/GpRectF) or [**GpRect**](Types/GpRect). + +### DrawEllipse, DrawEllipseI +{: #drawellipse } + +Syntax: *graphics*.**DrawEllipse**( *pen*, *x*, *y*, *width*, *height* ) + +Syntax: *graphics*.**DrawEllipse**( *pen*, *pt*, *size* ) + +Syntax: *graphics*.**DrawEllipse**( *pen*, *rect* ) + +Syntax: *graphics*.**DrawEllipseI**( *pen*, *x*, *y*, *width*, *height* ) + +Draws the outline of an ellipse that fits in a rectangle. + +*pen* +: *required* The [**Pen**](Pen). + +*x*, *y*, *width*, *height* +: *required* **Single** (**Long** for **DrawEllipseI**): the bounding rectangle. + +*pt*, *size* +: *required* The upper left corner and the size of the bounding rectangle. + +*rect* +: *required* The bounding rectangle: [**GpRectF**](Types/GpRectF) or [**GpRect**](Types/GpRect). + +### DrawPie, DrawPieI +{: #drawpie } + +Syntax: *graphics*.**DrawPie**( *pen*, *x*, *y*, *width*, *height*, *startAngle*, *sweepAngle* ) + +Syntax: *graphics*.**DrawPie**( *pen*, *pt*, *size*, *startAngle*, *sweepAngle* ) + +Syntax: *graphics*.**DrawPie**( *pen*, *rect*, *startAngle*, *sweepAngle* ) + +Syntax: *graphics*.**DrawPieI**( *pen*, *x*, *y*, *width*, *height*, *startAngle*, *sweepAngle* ) + +Draws the outline of a pie slice: an arc of an ellipse and the two straight lines from its ends to the centre of the ellipse. The parameters are the ones of [**DrawArc**](#drawarc). + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim bmp As Bitmap = Bitmap(20, 20, PixelFormat32bppARGB) +Dim g As Graphics = Graphics(bmp) +g.SmoothingMode = SmoothingModeNone + +Dim red As Color = Color(255, 0, 0) +Dim p As Pen = Pen(red, 1) + +' A rectangle of width 4 covers 5 pixels with a one-pixel pen +g.DrawRectangle(p, 2, 2, 4, 4) +Debug.Print bmp.Pixel(6, 4).Value = red.Value ' True +Debug.Print bmp.Pixel(7, 4).Value = red.Value ' False + +' A quarter of a circle, from 3 o'clock clockwise to 6 o'clock +g.Clear(Color(0, 0, 0, 0)) +g.DrawArc(p, 2, 2, 16, 16, 0, 90) +Debug.Print bmp.Pixel(18, 10).Value = red.Value ' True -- the start, at 3 o'clock +Debug.Print bmp.Pixel(10, 18).Value = red.Value ' True -- the end, at 6 o'clock +Debug.Print bmp.Pixel(2, 10).Value = red.Value ' False -- 9 o'clock is not on the arc + +' The same quarter as a pie slice adds the two radii +g.Clear(Color(0, 0, 0, 0)) +g.DrawPie(p, 2, 2, 16, 16, 0, 90) +Debug.Print bmp.Pixel(14, 10).Value = red.Value ' True -- on the horizontal radius +Debug.Print bmp.Pixel(10, 14).Value = red.Value ' True -- on the vertical radius + +' The outline of an ellipse in a rectangle that is 16 wide and 8 high +g.Clear(Color(0, 0, 0, 0)) +g.DrawEllipse(p, 2, 4, 16, 8) +Debug.Print bmp.Pixel(2, 8).Value = red.Value ' True -- the left end +Debug.Print bmp.Pixel(10, 4).Value = red.Value ' True -- the top +Debug.Print bmp.Pixel(10, 8).Value = red.Value ' False -- the centre +``` + +### DrawPolygon + +Syntax: *graphics*.**DrawPolygon**( *pen*, *points* ) + +Draws the outline of a polygon. The last point is joined to the first. + +*pen* +: *required* The [**Pen**](Pen). + +*points* +: *required* An array of [**GpPointF**](Types/GpPointF) or [**GpPoint**](Types/GpPoint). + +### DrawPath + +Syntax: *graphics*.**DrawPath**( [ *pen* [, *path* ] ] ) + +Draws the outline of a path. + +*pen* +: *optional* The [**Pen**](Pen). + +*path* +: *optional* The [**GraphicsPath**](GraphicsPath). + +Both parameters are optional only in the declaration. A call without them, or with **Nothing**, draws nothing and returns **InvalidParameter**. + +### DrawCurve + +Syntax: *graphics*.**DrawCurve**( *pen*, *points* ) + +Syntax: *graphics*.**DrawCurve**( *pen*, *points*, *tension* ) + +Syntax: *graphics*.**DrawCurve**( *pen*, *points*, *offset*, *numberOfSegments* [, *tension* ] ) + +Draws a cardinal spline: a smooth curve that passes through every point. + +*pen* +: *required* The [**Pen**](Pen). + +*points* +: *required* An array of [**GpPointF**](Types/GpPointF) or [**GpPoint**](Types/GpPoint). + +*tension* +: *optional* A **Single** that sets how sharply the curve bends at the points. 0 joins the points with straight lines. The default is 0.5. + +*offset* +: *required* A **Long**: the index of the first point of the array that is used. The index counts from 0, whatever the lower bound of the array is. + +*numberOfSegments* +: *required* A **Long**: the number of segments to draw after the first point. + +### DrawClosedCurve + +Syntax: *graphics*.**DrawClosedCurve**( *pen*, *points* [, *tension* ] ) + +Draws a closed cardinal spline: the curve passes through every point and returns from the last point to the first. + +*pen* +: *required* The [**Pen**](Pen). + +*points* +: *required* An array of [**GpPointF**](Types/GpPointF) or [**GpPoint**](Types/GpPoint). + +*tension* +: *optional* A **Single**: the tension of the curve. The default is 0.5. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim bmp As Bitmap = Bitmap(24, 24, PixelFormat32bppARGB) +Dim g As Graphics = Graphics(bmp) +g.SmoothingMode = SmoothingModeNone + +Dim red As Color = Color(255, 0, 0) +Dim p As Pen = Pen(red, 1) + +Dim star(1 To 5) As GpPointF +star(1) = GpPointF(12, 1) +star(2) = GpPointF(18, 22) +star(3) = GpPointF(2, 9) +star(4) = GpPointF(22, 9) +star(5) = GpPointF(6, 22) + +g.DrawPolygon(p, star) +Debug.Print bmp.Pixel(12, 1).Value = red.Value ' True -- a vertex +Debug.Print bmp.Pixel(12, 9).Value = red.Value ' True -- on the edge from (2, 9) to (22, 9) +Debug.Print bmp.Pixel(12, 14).Value = red.Value ' False -- the centre is empty + +' A Bezier curve starts at its first point and ends at its fourth +g.Clear(Color(0, 0, 0, 0)) +g.DrawBezier(p, 1, 20, 6, 2, 18, 2, 22, 20) +Debug.Print bmp.Pixel(1, 20).Value = red.Value ' True +Debug.Print bmp.Pixel(22, 20).Value = red.Value ' True +Debug.Print bmp.Pixel(6, 2).Value = red.Value ' False -- a control point is not on the curve +``` + +### DrawString + +Syntax: *graphics*.**DrawString**( *str*, *font*, *layoutRect*, *format*, *brush* ) + +Syntax: *graphics*.**DrawString**( *str*, *font*, *origin*, *brush* ) + +Syntax: *graphics*.**DrawString**( *str*, *font*, *x*, *y*, *brush* ) + +Syntax: *graphics*.**DrawString**( *str*, *font*, *origin*, *format*, *brush* ) + +Syntax: *graphics*.**DrawString**( *str*, *font*, *x*, *y*, *format*, *brush* ) + +Draws a string. + +*str* +: *required* A **String**. A null string is drawn as an empty string. + +*font* +: *required* The [**Font**](Font) that is used. + +*layoutRect* +: *required* A [**GpRectF**](Types/GpRectF): the rectangle that the text is laid out in. The text wraps at its width and is clipped to it, as *format* directs. + +*origin* +: *required* A [**GpPointF**](Types/GpPointF): the upper left corner of the text. + +*x*, *y* +: *required* **Single**: the upper left corner of the text. + +*format* +: *required* A [**StringFormat**](StringFormat) with the alignment, wrapping and trimming, or **Nothing** for the generic default format. The forms without *format* use the default format. + +*brush* +: *required* The brush that paints the characters. + +The text methods have no integer overloads. + +> [!NOTE] 0.9.45.0 +> **Font** is also the name of the standard font type of the **stdole** library. A program that references both writes the package's class as `GdiPlus.Font`, as in `Dim f As GdiPlus.Font = GdiPlus.Font("Segoe UI", 12)`. Without the prefix the function does not return a usable font. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim bmp As Bitmap = Bitmap(120, 40, PixelFormat32bppARGB) +Dim g As Graphics = Graphics(bmp) + +Dim f As GdiPlus.Font = GdiPlus.Font("Arial", 14) +Dim black As SolidBrush = SolidBrush(Color(0, 0, 0)) + +Debug.Print g.DrawString("Text", f, 10, 5, black) ' 0 + +' Some pixels in the area of the text are no longer transparent +Dim n As Long, x As Long, y As Long +For y = 5 To 30 + For x = 10 To 80 + If bmp.Pixel(x, y).Value <> 0 Then n = n + 1 + Next +Next +Debug.Print n > 20 ' True +``` + +### DrawDriverString + +Syntax: *graphics*.**DrawDriverString**( *str*, *font*, *brush*, *position*, *flags*, *matrix* ) + +Syntax: *graphics*.**DrawDriverString**( *str*, *font*, *brush*, *positions*, *flags*, *matrix* ) + +Syntax: *graphics*.**DrawDriverString**( *glyphs*, *font*, *brush*, *position*, *flags*, *matrix* ) + +Syntax: *graphics*.**DrawDriverString**( *glyphs*, *font*, *brush*, *positions*, *flags*, *matrix* ) + +Draws characters, or glyphs of the font, at positions that the program gives. This is the low-level text function that a text layout engine uses. + +*str* +: *required* A **String**. Its characters are looked up in the font's character map (**DriverStringOptionsCmapLookup** is always set). + +*glyphs* +: *required* An array of **Integer**: glyph indexes of the font. **DriverStringOptionsCmapLookup** is never set. + +*font* +: *required* The [**Font**](Font) that is used. + +*brush* +: *required* The brush that paints the glyphs. + +*position* +: *required* A [**GpPointF**](Types/GpPointF): the origin of the first glyph. The others follow it, each placed by the advance width of the glyph before it (**DriverStringOptionsRealizedAdvance** is always set). + +*positions* +: *required* An array of [**GpPointF**](Types/GpPointF) with the origin of each glyph (**DriverStringOptionsRealizedAdvance** is never set). + +*flags* +: *required* A [**GpDriverStringOptions**](Enumerations/GpDriverStringOptions) value. The methods set or clear the two options that their form needs, and the others are used as given. + +*matrix* +: *required* A [**Matrix**](Matrix) that transforms the glyph positions, or **Nothing**. + +> [!NOTE] 0.9.45.0 +> A call that passes a **SolidBrush** variable, or the number 0 as *flags*, can match both the *str* and the *glyphs* overloads, and the compiler then reports that it cannot tell the overloads apart. Declare the brush variable as `Brush`, and pass the flags as a variable of the type **GpDriverStringOptions**. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim bmp As Bitmap = Bitmap(60, 30, PixelFormat32bppARGB) +Dim g As Graphics = Graphics(bmp) + +Dim f As GdiPlus.Font = GdiPlus.Font("Arial", 14) +Dim brush As Brush = SolidBrush(Color(0, 0, 0)) +Dim noMatrix As Matrix = Nothing + +Debug.Print g.DrawDriverString("Hi", f, brush, GpPointF(5, 5), DriverStringOptionsCmapLookup, noMatrix) ' 0 + +Dim box As GpRectF +Debug.Print g.MeasureDriverString("Hi", f, GpPointF(5, 5), DriverStringOptionsCmapLookup, noMatrix, box) ' 0 +Debug.Print box.Width > 5 ' True +``` + +## Filled drawing + +The methods that fill take a brush in place of a pen: a [**SolidBrush**](SolidBrush), a [**HatchBrush**](HatchBrush), a [**LinearGradientBrush**](LinearGradientBrush), a [**PathGradientBrush**](PathGradientBrush) or a [**TextureBrush**](TextureBrush). A fill covers exactly the area of the shape, so **FillRectangle** with the width 3 covers 3 pixels. A *brush* of **Nothing** is an error: the call returns **InvalidParameter** and draws nothing. + +### FillRectangle, FillRectangleI +{: #fillrectangle } + +Syntax: *graphics*.**FillRectangle**( *brush*, *x*, *y*, *width*, *height* ) + +Syntax: *graphics*.**FillRectangle**( *brush*, *pt*, *size* ) + +Syntax: *graphics*.**FillRectangle**( *brush*, *rect* ) + +Syntax: *graphics*.**FillRectangleI**( *brush*, *x*, *y*, *width*, *height* ) + +Fills a rectangle. + +*brush* +: *required* The brush. + +*x*, *y*, *width*, *height* +: *required* **Single** (**Long** for **FillRectangleI**): the rectangle. + +*pt*, *size* +: *required* The upper left corner and the size. + +*rect* +: *required* The rectangle: [**GpRectF**](Types/GpRectF) or [**GpRect**](Types/GpRect). + +### FillRectangles + +Syntax: *graphics*.**FillRectangles**( *brush*, *rects* ) + +Fills several rectangles. + +*brush* +: *required* The brush. + +*rects* +: *required* An array of [**GpRectF**](Types/GpRectF) or [**GpRect**](Types/GpRect). + +### FillPolygon + +Syntax: *graphics*.**FillPolygon**( *brush*, *points* [, *fillMode* ] ) + +Fills the inside of a polygon. The last point is joined to the first. + +*brush* +: *required* The brush. + +*points* +: *required* An array of [**GpPointF**](Types/GpPointF) or [**GpPoint**](Types/GpPoint). + +*fillMode* +: *optional* A [**GpFillmode**](Enumerations/GpFillmode) that decides which areas of a self-crossing polygon are inside. The default is **FillModeAlternate**. + +### FillEllipse, FillEllipseI +{: #fillellipse } + +Syntax: *graphics*.**FillEllipse**( *brush*, *x*, *y*, *width*, *height* ) + +Syntax: *graphics*.**FillEllipse**( *brush*, *pt*, *size* ) + +Syntax: *graphics*.**FillEllipse**( *brush*, *rect* ) + +Syntax: *graphics*.**FillEllipseI**( *brush*, *x*, *y*, *width*, *height* ) + +Fills an ellipse that fits in a rectangle. The parameters are the ones of [**FillRectangle**](#fillrectangle). + +### FillPie, FillPieI +{: #fillpie } + +Syntax: *graphics*.**FillPie**( *brush*, *x*, *y*, *width*, *height*, *startAngle*, *sweepAngle* ) + +Syntax: *graphics*.**FillPie**( *brush*, *pt*, *size*, *startAngle*, *sweepAngle* ) + +Syntax: *graphics*.**FillPie**( *brush*, *rect*, *startAngle*, *sweepAngle* ) + +Syntax: *graphics*.**FillPieI**( *brush*, *x*, *y*, *width*, *height*, *startAngle*, *sweepAngle* ) + +Fills a pie slice. The shape and the parameters are the ones of [**DrawPie**](#drawpie), with a *brush* in place of the *pen*. + +### FillPath + +Syntax: *graphics*.**FillPath**( *brush*, *path* ) + +Fills the inside of a [**GraphicsPath**](GraphicsPath). The fill mode of the path decides which areas are inside. + +### FillClosedCurve + +Syntax: *graphics*.**FillClosedCurve**( *brush*, *points* ) + +Syntax: *graphics*.**FillClosedCurve**( *brush*, *points*, *fillMode* [, *tension* ] ) + +Fills the inside of a closed cardinal spline through the points (see [**DrawClosedCurve**](#drawclosedcurve)). + +*brush* +: *required* The brush. + +*points* +: *required* An array of [**GpPointF**](Types/GpPointF) or [**GpPoint**](Types/GpPoint). + +*fillMode* +: *required* A [**GpFillmode**](Enumerations/GpFillmode). + +*tension* +: *optional* A **Single**. The default is 0.5. + +### FillRegion + +Syntax: *graphics*.**FillRegion**( *brush*, *region* ) + +Fills a [**Region**](Region). + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim bmp As Bitmap = Bitmap(24, 24, PixelFormat32bppARGB) +Dim g As Graphics = Graphics(bmp) +g.SmoothingMode = SmoothingModeNone + +Dim green As Color = Color(0, 255, 0) +Dim br As SolidBrush = SolidBrush(green) + +' A fill covers the rectangle exactly: 3 pixels wide, 2 high +g.FillRectangle(br, 5, 2, 3, 2) +Debug.Print bmp.Pixel(5, 2).Value = green.Value ' True +Debug.Print bmp.Pixel(7, 3).Value = green.Value ' True +Debug.Print bmp.Pixel(8, 3).Value = green.Value ' False +Debug.Print bmp.Pixel(7, 4).Value = green.Value ' False + +' A pentagram: the centre is inside with the Winding mode, outside with the Alternate mode +Dim star(1 To 5) As GpPointF +star(1) = GpPointF(12, 6) +star(2) = GpPointF(17, 23) +star(3) = GpPointF(4, 12) +star(4) = GpPointF(20, 12) +star(5) = GpPointF(7, 23) + +g.Clear(Color(0, 0, 0, 0)) +g.FillPolygon(br, star) +Debug.Print bmp.Pixel(12, 15).Value = green.Value ' False +g.Clear(Color(0, 0, 0, 0)) +g.FillPolygon(br, star, FillModeWinding) +Debug.Print bmp.Pixel(12, 15).Value = green.Value ' True + +' A region and a path +g.Clear(Color(0, 0, 0, 0)) +g.FillRegion(br, Region(GpRect(12, 12, 5, 5))) +Debug.Print bmp.Pixel(14, 14).Value = green.Value ' True +Debug.Print bmp.Pixel(17, 14).Value = green.Value ' False + +Dim path As GraphicsPath = GraphicsPath() +path.AddRectangle(GpRect(2, 2, 6, 4)) +g.Clear(Color(0, 0, 0, 0)) +g.FillPath(br, path) +Debug.Print bmp.Pixel(7, 5).Value = green.Value ' True +Debug.Print bmp.Pixel(8, 5).Value = green.Value ' False + +' A pie slice +g.Clear(Color(0, 0, 0, 0)) +g.FillPie(br, 2, 2, 20, 20, 180, 90) +Debug.Print bmp.Pixel(6, 6).Value = green.Value ' True -- the upper left quarter +Debug.Print bmp.Pixel(18, 18).Value = green.Value ' False + +' No brush +Dim noBrush As Brush = Nothing +Debug.Print g.FillRectangle(noBrush, 0, 0, 3, 3) ' 2 +``` + +## Image drawing + +### DrawImage + +Syntax: *graphics*.**DrawImage**( *image*, *pt* ) + +Syntax: *graphics*.**DrawImage**( *image*, *x*, *y* ) + +Syntax: *graphics*.**DrawImage**( *image*, *rect* ) + +Syntax: *graphics*.**DrawImage**( *image*, *x*, *y*, *width*, *height* ) + +Syntax: *graphics*.**DrawImage**( *image*, *destPoints* ) + +Syntax: *graphics*.**DrawImage**( *image*, *x*, *y*, *srcX*, *srcY*, *srcWidth*, *srcHeight*, *srcUnit* ) + +Syntax: *graphics*.**DrawImage**( *image*, *destRect*, *srcRect*, *srcUnit* [, *attributes* [, *callback* [, *callbackData* ] ] ] ) + +Syntax: *graphics*.**DrawImage**( *image*, *destPoints*, *srcX*, *srcY*, *srcWidth*, *srcHeight*, *srcUnit* [, *attributes* [, *callback* [, *callbackData* ] ] ] ) + +Syntax: *graphics*.**DrawImage**( *image*, *sourceRect*, *xForm*, *effect*, *attributes*, *srcUnit* ) + +Draws an image, or a part of it. + +*image* +: *required* The [**Image**](Image) to draw. + +*pt*, *x*, *y* +: *required* The upper left corner of the drawn image, in [**GpPointF**](Types/GpPointF) or [**GpPoint**](Types/GpPoint), or as **Single** numbers. The image is drawn at its own size. + +*rect*, *width*, *height* +: *required* The rectangle that the image is scaled to fit: a [**GpRectF**](Types/GpRectF) or a [**GpRect**](Types/GpRect), or *x*, *y*, *width* and *height* as **Single** numbers. + +*destPoints* +: *required* An array of three [**GpPointF**](Types/GpPointF) or [**GpPoint**](Types/GpPoint): where the upper left, upper right and lower left corners of the image go. The image is drawn as a parallelogram, so it can be rotated and sheared. + +*srcX*, *srcY*, *srcWidth*, *srcHeight* +: *required* The part of the image that is drawn, in *srcUnit*. **Single** in the floating-point form, **Long** in the integer form. + +*srcRect* +: *required* The part of the image that is drawn, as a rectangle in *srcUnit*, the same type as *destRect*. + +*destRect* +: *required* The rectangle that the part of the image is scaled to fit: a [**GpRectF**](Types/GpRectF) or a [**GpRect**](Types/GpRect). + +*srcUnit* +: *required* A [**GpUnit**](Enumerations/GpUnit) that gives the unit of the source: **UnitPixel** for the pixels of a bitmap. + +*attributes* +: *optional* An [**ImageAttributes**](ImageAttributes) object with colour adjustments. The default is none. + +*callback*, *callbackData* +: *optional* **LongPtr**: the address of an abort callback and a value to pass to it. The default is none. + +*sourceRect* +: *required* A [**GpRectF**](Types/GpRectF): the part of the image that is drawn, in pixels. + +*xForm* +: *required* A [**Matrix**](Matrix) that transforms the drawn image, or **Nothing**. + +*effect* +: *required* An **Effect** that is applied to the image, or **Nothing**. + +The last form needs GDI+ 1.1, which Windows 7 and later have. Of the overloads with plain coordinates, only the ones with a position, with a position and a size, and with a position and a source part have the integer method **DrawImageI**. + +> [!WARNING] 0.9.45.0 +> The calls `DrawImage(image, rect)`, with a **GpRectF** or a **GpRect**, and `DrawImage(image, destPoints, srcX, srcY, srcWidth, srcHeight, srcUnit)` with an array of **GpPointF** do not return. Use the overload with *x*, *y*, *width* and *height* (or **DrawImageI**), the one with *destRect* and *srcRect*, or the integer form of the second call. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +' A source image of 4 x 2 pixels: the left half red, the right half blue +Dim src As Bitmap = Bitmap(4, 2, PixelFormat32bppARGB) +Dim gs As Graphics = Graphics(src) +Dim red As Color = Color(255, 0, 0) +Dim blue As Color = Color(0, 0, 255) +gs.Clear(red) +gs.FillRectangle(SolidBrush(blue), 2, 0, 2, 2) + +Dim bmp As Bitmap = Bitmap(20, 10, PixelFormat32bppARGB) +Dim g As Graphics = Graphics(bmp) +g.InterpolationMode = InterpolationModeNearestNeighbor +g.PixelOffsetMode = PixelOffsetModeHalf + +' At its own size, with its upper left corner at (1, 1) +g.DrawImage(src, 1, 1) +Debug.Print bmp.Pixel(1, 1).Value = red.Value ' True +Debug.Print bmp.Pixel(4, 2).Value = blue.Value ' True +Debug.Print bmp.Pixel(5, 2).Value = 0 ' True -- the image is 4 wide + +' Scaled to 8 x 4 pixels +g.Clear(Color(0, 0, 0, 0)) +g.DrawImage(src, 1, 1, 8, 4) +Debug.Print bmp.Pixel(4, 3).Value = red.Value ' True +Debug.Print bmp.Pixel(5, 3).Value = blue.Value ' True +Debug.Print bmp.Pixel(8, 4).Value = blue.Value ' True +Debug.Print bmp.Pixel(9, 4).Value = 0 ' True + +' Only the blue half, scaled into a destination rectangle +g.Clear(Color(0, 0, 0, 0)) +g.DrawImage(src, GpRectF(10, 2, 6, 4), GpRectF(2, 0, 2, 2), UnitPixel) +Debug.Print bmp.Pixel(10, 2).Value = blue.Value ' True +Debug.Print bmp.Pixel(15, 5).Value = blue.Value ' True +Debug.Print bmp.Pixel(16, 5).Value = 0 ' True + +' A part of the image at its own size: columns 1 and 2, at (10, 5) +g.Clear(Color(0, 0, 0, 0)) +g.DrawImage(src, 10, 5, 1, 0, 2, 2, UnitPixel) +Debug.Print bmp.Pixel(10, 5).Value = red.Value ' True +Debug.Print bmp.Pixel(11, 5).Value = blue.Value ' True +``` + +### DrawImageI + +Syntax: *graphics*.**DrawImageI**( *image*, *x*, *y* ) + +Syntax: *graphics*.**DrawImageI**( *image*, *x*, *y*, *width*, *height* ) + +Syntax: *graphics*.**DrawImageI**( *image*, *x*, *y*, *srcX*, *srcY*, *srcWidth*, *srcHeight*, *srcUnit* ) + +The overloads of [**DrawImage**](#drawimage) with plain coordinates, for **Long** coordinates. + +### DrawCachedBitmap + +Syntax: *graphics*.**DrawCachedBitmap**( *cb*, *offset* ) + +Draws a [**CachedBitmap**](CachedBitmap), a bitmap that was converted to the pixel format of a **Graphics** object, at an offset. A cached bitmap is drawn faster than the bitmap it was made from. + +*cb* +: *required* The [**CachedBitmap**](CachedBitmap). + +*offset* +: *required* A [**GpPoint**](Types/GpPoint): where the upper left corner of the bitmap goes. + +### DrawCachedBitmapI + +Syntax: *graphics*.**DrawCachedBitmapI**( *cb*, *x*, *y* ) + +The same as [**DrawCachedBitmap**](#drawcachedbitmap), with the position as two numbers. + +*cb* +: *required* The [**CachedBitmap**](CachedBitmap). + +*x*, *y* +: *required* **Long**: where the upper left corner of the bitmap goes. + +Both methods fail with **WrongState** when the format of the **Graphics** object is not the one of the cached bitmap, for example after the display's resolution or colour depth has changed. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim src As Bitmap = Bitmap(3, 3, PixelFormat32bppARGB) +Dim red As Color = Color(255, 0, 0) +Graphics(src).Clear(red) + +Dim bmp As Bitmap = Bitmap(10, 10, PixelFormat32bppARGB) +Dim g As Graphics = Graphics(bmp) + +Dim cb As CachedBitmap = CachedBitmap(src, g) +Debug.Print g.DrawCachedBitmapI(cb, 4, 4) ' 0 +Debug.Print bmp.Pixel(5, 5).Value = red.Value ' True +Debug.Print bmp.Pixel(3, 3).Value = red.Value ' False +``` + +## Text measurement + +### MeasureString + +Syntax: *graphics*.**MeasureString**( *str*, *font*, *layoutRect*, *format*, *boundingBox* [, *codepointsFitted* [, *linesFilled* ] ] ) + +Syntax: *graphics*.**MeasureString**( *str*, *font*, *layoutSize*, *format*, *size* [, *codepointsFitted* [, *linesFilled* ] ] ) + +Syntax: *graphics*.**MeasureString**( *str*, *font*, *origin*, *format*, *boundingBox* ) + +Syntax: *graphics*.**MeasureString**( *str*, *font*, *layoutRect*, *boundingBox* ) + +Syntax: *graphics*.**MeasureString**( *str*, *font*, *origin*, *boundingBox* ) + +Measures a string: the rectangle that **DrawString** would fill with it. + +*str* +: *required* A **String**. + +*font* +: *required* The [**Font**](Font). + +*layoutRect* +: *required* A [**GpRectF**](Types/GpRectF): the rectangle that the text is laid out in. + +*layoutSize* +: *required* A [**GpSizeF**](Types/GpSizeF): the size of the layout rectangle, which starts at (0, 0). + +*origin* +: *required* A [**GpPointF**](Types/GpPointF): the upper left corner of the text, with no limit to its width. + +*format* +: *required* The [**StringFormat**](StringFormat), or **Nothing** for the default. + +*boundingBox* +: *required* A [**GpRectF**](Types/GpRectF) that receives the rectangle that the text fills. + +*size* +: *required* A [**GpSizeF**](Types/GpSizeF) that receives the size of the rectangle that the text fills. + +*codepointsFitted* +: *optional* A **Long** that receives the number of characters that fit in the layout rectangle. + +*linesFilled* +: *optional* A **Long** that receives the number of lines that the text fills. + +The text methods have no integer overloads. + +### MeasureCharacterRanges + +Syntax: *regions* **=** *graphics*.**MeasureCharacterRanges**( *str*, *font*, *layoutRect*, *format* ) + +Syntax: *status* **=** *graphics*.**MeasureCharacterRanges**( *str*, *font*, *layoutRect*, *format*, *regions* ) + +Measures the area that each of a set of character ranges fills when the string is drawn. + +*str* +: *required* A **String**. + +*font* +: *required* The [**Font**](Font). + +*layoutRect* +: *required* A [**GpRectF**](Types/GpRectF): the layout rectangle. + +*format* +: *required* A [**StringFormat**](StringFormat) whose **MeasurableCharacterRanges** property holds the ranges, an array of [**CharacterRange**](Types/CharacterRange). + +*regions* +: *required* An array of [**Region**](Region) that receives one region for each range. The array can have any size, and it can be empty. It is resized to the number of ranges, and the **Region** objects that it already holds are reused. + +The first form returns the array of regions. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim bmp As Bitmap = Bitmap(200, 60, PixelFormat32bppARGB) +Dim g As Graphics = Graphics(bmp) + +Dim f As GdiPlus.Font = GdiPlus.Font("Arial", 12) +Dim fmt As StringFormat = StringFormat() + +Dim box As GpRectF +Debug.Print g.MeasureString("Hello", f, GpPointF(10, 5), box) ' 0 +Debug.Print box.X ' 10 +Debug.Print box.Y ' 5 +Debug.Print box.Width > 20 ' True +Debug.Print box.Height > 10 ' True + +Dim sz As GpSizeF +g.MeasureString("Hello", f, GpSizeF(200, 60), fmt, sz) +Debug.Print sz.Width > 20 ' True + +' The ranges: characters 0 and 1, and the characters 2 to 4 +Dim ranges(0 To 1) As CharacterRange +ranges(0) = CharacterRange(0, 2) +ranges(1) = CharacterRange(2, 3) +fmt.MeasurableCharacterRanges = ranges + +Dim regions() As Region = g.MeasureCharacterRanges("Hello", f, GpRectF(0, 0, 200, 60), fmt) +Debug.Print UBound(regions) - LBound(regions) + 1 ' 2 +``` + +### MeasureDriverString + +Syntax: *graphics*.**MeasureDriverString**( *str*, *font*, *position*, *flags*, *matrix*, *boundingBox* ) + +Syntax: *graphics*.**MeasureDriverString**( *str*, *font*, *positions*, *flags*, *matrix*, *boundingBox* ) + +Syntax: *graphics*.**MeasureDriverString**( *glyphs*, *font*, *position*, *flags*, *matrix*, *boundingBox* ) + +Syntax: *graphics*.**MeasureDriverString**( *glyphs*, *font*, *positions*, *flags*, *matrix*, *boundingBox* ) + +Measures the rectangle that [**DrawDriverString**](#drawdriverstring) would fill. The parameters of the four forms are the ones of **DrawDriverString**, without the brush, and *boundingBox* is a [**GpRectF**](Types/GpRectF) that receives the rectangle. + +The note under **DrawDriverString** about the overloads of the *str* and *glyphs* forms applies here too, for the *glyphs* forms. + +## Metafile + +### EnumerateMetaFile + +Syntax: *graphics*.**EnumerateMetaFile**( *metafile*, *dest*, *callback* [, *callbackData* [, *attributes* ] ] ) + +Syntax: *graphics*.**EnumerateMetaFile**( *metafile*, *dest*, *srcRect*, *srcUnit*, *callback* [, *callbackData* [, *attributes* ] ] ) + +Plays a [**Metafile**](Metafile) record by record. The **Graphics** object calls the *callback* for each record. The callback can play the record with the **PlayRecord** method of the metafile, change it, or skip it. + +*metafile* +: *required* The [**Metafile**](Metafile). + +*dest* +: *required* Where the metafile is drawn: a [**GpPointF**](Types/GpPointF) or [**GpPoint**](Types/GpPoint) for its upper left corner, a [**GpRectF**](Types/GpRectF) or [**GpRect**](Types/GpRect) that it is scaled to, or an array of three points that place its corners as in [**DrawImage**](#drawimage). + +*srcRect* +: *optional* The part of the metafile that is played, in *srcUnit*: a [**GpRectF**](Types/GpRectF) or a [**GpRect**](Types/GpRect), the same type as *dest*. + +*srcUnit* +: *optional* A [**GpUnit**](Enumerations/GpUnit). + +*callback* +: *required* A function, passed as `AddressOf`, of the delegate type **EnumerateMetafileProc**. It receives the record type, the flags, the size and a pointer of the record data, and *callbackData*. A function that returns 0 stops the enumeration. + +*callbackData* +: *optional* A **LongPtr** that is passed to the callback. The default is 0. + +*attributes* +: *optional* An [**ImageAttributes**](ImageAttributes) object with colour adjustments. + +```tb check_build +Private Function OnRecord(ByVal nType As GpEmfPlusRecordType, ByVal dwFlags As Long, ByVal cbData As Long, ByVal data As LongPtr, ByVal callbackData As LongPtr) As Long + Return 1 ' continue with the next record +End Function + +Sub PlayMetafile(g As Graphics, mf As Metafile) + g.EnumerateMetaFile mf, GpPoint(0, 0), AddressOf OnRecord +End Sub +``` + +### AddMetafileComment + +Syntax: *graphics*.**AddMetafileComment**( *data*, *sizeData* ) + +Adds a comment record to the metafile that the **Graphics** object records. + +*data* +: *required* The first **Byte** of the comment data, passed by reference. + +*sizeData* +: *required* A **Long**: the number of bytes of data. + +The method is only valid for a **Graphics** object that records a metafile. For a **Graphics** object of another kind it returns **InvalidParameter**. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim bmp As Bitmap = Bitmap(4, 4, PixelFormat32bppARGB) +Dim g As Graphics = Graphics(bmp) + +Dim data(0 To 3) As Byte +Debug.Print g.AddMetafileComment(data(0), 4) ' 2 -- this Graphics does not record a metafile +``` + +## Clipping + +The clipping area limits what is drawn. It is an area of the surface, and drawing outside it changes nothing. A new **Graphics** object has no clipping area, which means that all of the surface is open. The clipping area is set in world coordinates. It is transformed by the world transformation at the time it is set, and then does not change when the transformation does. + +### SetClip + +Syntax: *graphics*.**SetClip**( *g* [, *combineMode* ] ) + +Syntax: *graphics*.**SetClip**( *rect* [, *combineMode* ] ) + +Syntax: *graphics*.**SetClip**( *path* [, *combineMode* ] ) + +Syntax: *graphics*.**SetClip**( *region* [, *combineMode* ] ) + +Syntax: *graphics*.**SetClip**( *hRgn* [, *combineMode* ] ) + +Sets the clipping area, or combines the current clipping area with a shape. + +*g* +: *required* A **Graphics** object whose clipping area is used. + +*rect* +: *required* A [**GpRectF**](Types/GpRectF) or a [**GpRect**](Types/GpRect). + +*path* +: *required* A [**GraphicsPath**](GraphicsPath). + +*region* +: *required* A [**Region**](Region). + +*hRgn* +: *required* A **LongPtr**: the handle of a GDI region. It is already in device coordinates, and it is not transformed. The region still belongs to the caller. + +*combineMode* +: *optional* A [**GpCombineMode**](Enumerations/GpCombineMode) that says how the shape is combined with the current clipping area. The default is **CombineModeReplace**. + +### IntersectClip + +Syntax: *graphics*.**IntersectClip**( *rect* ) + +Syntax: *graphics*.**IntersectClip**( *region* ) + +Sets the clipping area to the area that the current one and the shape have in common. *rect* is a [**GpRectF**](Types/GpRectF) or a [**GpRect**](Types/GpRect), *region* a [**Region**](Region). + +### ExcludeClip + +Syntax: *graphics*.**ExcludeClip**( *rect* ) + +Syntax: *graphics*.**ExcludeClip**( *region* ) + +Removes the shape from the clipping area. *rect* is a [**GpRectF**](Types/GpRectF) or a [**GpRect**](Types/GpRect), *region* a [**Region**](Region). + +### ResetClip + +Syntax: *graphics*.**ResetClip**( ) + +Opens all of the surface again. + +### TranslateClip, TranslateClipI +{: #translateclip } + +Syntax: *graphics*.**TranslateClip**( *delta* ) + +Syntax: *graphics*.**TranslateClip**( *dx*, *dy* ) + +Syntax: *graphics*.**TranslateClipI**( *dx*, *dy* ) + +Moves the clipping area. + +*delta* +: *required* A [**GpPointF**](Types/GpPointF) or a [**GpPoint**](Types/GpPoint). + +*dx*, *dy* +: *required* **Single** (**Long** for **TranslateClipI**): the distance to move it by, to the right and down. + +### Clip + +Syntax: *region* **=** *graphics*.**Clip** + +Returns the clipping area as a [**Region**](Region). + +> [!NOTE] 0.9.45.0 +> Reading **Clip** always fails: it returns **Nothing** and **LastResult** becomes **InvalidParameter**. To read the clipping area, read **ClipBounds**, or keep the [**Region**](Region) that the program passed to **SetClip**. + +### ClipBounds, ClipBoundsI +{: #clipbounds } + +Syntax: *rect* **=** *graphics*.**ClipBounds** + +Syntax: *rect* **=** *graphics*.**ClipBoundsI** + +Return the bounding rectangle of the clipping area, as a [**GpRectF**](Types/GpRectF) and as a [**GpRect**](Types/GpRect). With no clipping area set, the rectangle is the largest one that GDI+ uses: its X and Y are -4194304 and its Width and Height are 8388608. + +### IsClipEmpty + +Syntax: *flag* **=** *graphics*.**IsClipEmpty** + +Returns **True** when the clipping area is empty: nothing can be drawn. + +### VisibleClipBounds, VisibleClipBoundsI +{: #visibleclipbounds } + +Syntax: *rect* **=** *graphics*.**VisibleClipBounds** + +Syntax: *rect* **=** *graphics*.**VisibleClipBoundsI** + +Return the bounding rectangle of the part of the clipping area that is on the surface, as a [**GpRectF**](Types/GpRectF) and as a [**GpRect**](Types/GpRect). For a **Graphics** object that is open all over, this is the surface itself. + +### IsVisibleClipEmpty + +Syntax: *flag* **=** *graphics*.**IsVisibleClipEmpty** + +Returns **True** when no part of the clipping area is on the surface. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim bmp As Bitmap = Bitmap(20, 12, PixelFormat32bppARGB) +Dim g As Graphics = Graphics(bmp) +g.SmoothingMode = SmoothingModeNone + +Dim green As Color = Color(0, 255, 0) +Dim br As SolidBrush = SolidBrush(green) + +g.SetClip(GpRect(2, 2, 6, 4)) +g.FillRectangle(br, 0, 0, 20, 12) ' only the clipping area is filled +Debug.Print bmp.Pixel(2, 2).Value = green.Value ' True +Debug.Print bmp.Pixel(7, 5).Value = green.Value ' True +Debug.Print bmp.Pixel(8, 5).Value = green.Value ' False +Debug.Print bmp.Pixel(1, 2).Value = green.Value ' False + +Debug.Print g.ClipBoundsI.X & " " & g.ClipBoundsI.Y & " " & g.ClipBoundsI.Width & " " & g.ClipBoundsI.Height ' 2 2 6 4 + +' Intersect with a rectangle, then take another one out +g.IntersectClip(GpRect(4, 0, 10, 4)) +Debug.Print g.ClipBoundsI.X & " " & g.ClipBoundsI.Y & " " & g.ClipBoundsI.Width & " " & g.ClipBoundsI.Height ' 4 2 4 2 +g.ExcludeClip(GpRect(4, 0, 10, 4)) +Debug.Print g.IsClipEmpty ' True + +g.ResetClip +Debug.Print g.IsClipEmpty ' False +Debug.Print g.VisibleClipBoundsI.Width ' 20 + +' A clipping area that is beyond the surface +g.SetClip(GpRect(100, 100, 5, 5)) +Debug.Print g.IsClipEmpty ' False +Debug.Print g.IsVisibleClipEmpty ' True + +' Moving the clipping area +g.SetClip(GpRect(2, 2, 6, 4)) +g.TranslateClip(3, 4) +Debug.Print g.ClipBoundsI.X & " " & g.ClipBoundsI.Y ' 5 6 +``` + +## Clipping visibility checks + +### IsVisible, IsVisibleI +{: #isvisible } + +Syntax: *flag* **=** *graphics*.**IsVisible**( *x*, *y* ) + +Syntax: *flag* **=** *graphics*.**IsVisible**( *x*, *y*, *width*, *height* ) + +Syntax: *flag* **=** *graphics*.**IsVisible**( *point* ) + +Syntax: *flag* **=** *graphics*.**IsVisible**( *rect* ) + +Syntax: *flag* **=** *graphics*.**IsVisibleI**( *x*, *y* ) + +Syntax: *flag* **=** *graphics*.**IsVisibleI**( *x*, *y*, *width*, *height* ) + +Returns **True** when a point, or any part of a rectangle, is inside the visible clipping area. + +*x*, *y*, *width*, *height* +: *required* **Single** (**Long** for **IsVisibleI**): the point, or the rectangle. + +*point* +: *required* A [**GpPointF**](Types/GpPointF) or a [**GpPoint**](Types/GpPoint). + +*rect* +: *required* A [**GpRectF**](Types/GpRectF) or a [**GpRect**](Types/GpRect). + +> [!WARNING] 0.9.45.0 +> The call with a **GpPointF**, `IsVisible(point)`, does not return. Use the call with *x* and *y*, or the **GpPoint** form. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim bmp As Bitmap = Bitmap(40, 40, PixelFormat32bppARGB) +Dim g As Graphics = Graphics(bmp) + +g.SetClip(GpRect(5, 5, 12, 8)) + +Debug.Print g.IsVisible(6, 6) ' True +Debug.Print g.IsVisible(GpPoint(6, 6)) ' True +Debug.Print g.IsVisibleI(2, 2) ' False +Debug.Print g.IsVisible(16, 12) ' True +Debug.Print g.IsVisible(17, 13) ' False +Debug.Print g.IsVisible(GpRect(6, 6, 2, 2)) ' True +Debug.Print g.IsVisible(20, 20, 2, 2) ' False +Debug.Print g.IsVisible(4, 5, 2, 2) ' True -- a part of the rectangle is inside +``` + +## State and container stack + +A **Graphics** object can save its state and restore it later. The state is the clipping area, the world transformation and the rendering settings. States are saved on a stack. **Save** and **Restore** work on a state as a whole. A container is a state that also has its own coordinate system, so a drawing procedure can draw in coordinates of its own. + +### Save + +Syntax: *state* **=** *graphics*.**Save**( ) + +Saves the state of the **Graphics** object and returns a **Long** cookie that stands for it. Pass the cookie to [**Restore**](#restore). + +### Restore + +Syntax: *status* **=** *graphics*.**Restore**( *state* ) + +Takes a saved state back: the object returns to the state it had when the cookie was made, and the states that were saved after it are discarded. + +*state* +: *required* The cookie that [**Save**](#save) returned. + +### BeginContainer + +Syntax: *container* **=** *graphics*.**BeginContainer**( ) + +Syntax: *container* **=** *graphics*.**BeginContainer**( *dstRect*, *srcRect*, *unit* ) + +Starts a container and returns a **Long** cookie for it. The state of the **Graphics** object is saved, and inside the container the world transformation is the identity, the clipping area is open and the smoothing mode is back at its default. With *dstRect* and *srcRect*, the container's coordinates are set so that *srcRect* is mapped onto *dstRect* of the surface. + +*dstRect*, *srcRect* +: *required* [**GpRectF**](Types/GpRectF) or [**GpRect**](Types/GpRect), both of the same type: the destination rectangle on the surface, and the rectangle of the drawing in the container's own coordinates. + +*unit* +: *required* A [**GpUnit**](Enumerations/GpUnit): the unit of the container's coordinates. + +### EndContainer + +Syntax: *status* **=** *graphics*.**EndContainer**( *container* ) + +Closes a container and restores the state that was saved when it began. + +*container* +: *required* The cookie that [**BeginContainer**](#begincontainer) returned. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim bmp As Bitmap = Bitmap(20, 10, PixelFormat32bppARGB) +Dim g As Graphics = Graphics(bmp) +g.SmoothingMode = SmoothingModeNone + +Dim green As Color = Color(0, 255, 0) +Dim br As SolidBrush = SolidBrush(green) + +' Restore takes back the transformation and the clipping area +Dim state As GraphicsState = g.Save() +g.TranslateTransform(10, 5) +g.SetClip(GpRect(0, 0, 3, 3)) +g.Restore(state) +g.FillRectangle(br, 0, 0, 2, 2) +Debug.Print bmp.Pixel(1, 1).Value = green.Value ' True + +' A container maps a drawing of 4 x 2 units onto a rectangle of 8 x 4 pixels at (10, 5) +Dim c As GraphicsContainer = g.BeginContainer(GpRectF(10, 5, 8, 4), GpRectF(0, 0, 4, 2), UnitPixel) +g.FillRectangle(br, 0, 0, 4, 2) +g.EndContainer(c) +Debug.Print bmp.Pixel(17, 8).Value = green.Value ' True -- the far corner of the destination +Debug.Print bmp.Pixel(18, 8).Value = green.Value ' False +Debug.Print bmp.Pixel(10, 4).Value = green.Value ' False + +' Inside a container the transformation is the identity again +g.TranslateTransform(5, 5) +Dim c2 As GraphicsContainer = g.BeginContainer() +Dim m As Matrix = Matrix() +g.GetTransform(m) +Debug.Print m.IsIdentity ' True +g.EndContainer(c2) +g.GetTransform(m) +Debug.Print m.OffsetX ' 5 +``` + +## Rendering state + +These properties set how the drawing is rendered. Each one is read and set. A **Graphics** object is created with the defaults of GDI+. + +### RenderingOrigin, SetRenderingOrigin, GetRenderingOrigin +{: #renderingorigin } + +Syntax: *point* **=** *graphics*.**RenderingOrigin** + +Syntax: *graphics*.**RenderingOrigin** **=** *point* + +Syntax: *status* **=** *graphics*.**SetRenderingOrigin**( *x*, *y* ) + +Syntax: *status* **=** *graphics*.**GetRenderingOrigin**( *x*, *y* ) + +The point that the pattern of a hatch brush or a dithered fill starts from. The default is (0, 0). The property uses a [**GpPoint**](Types/GpPoint). **GetRenderingOrigin** returns the values in its two **Long** arguments. + +### CompositingMode + +Syntax: *mode* **=** *graphics*.**CompositingMode** + +Syntax: *graphics*.**CompositingMode** **=** *mode* + +A [**GpCompositingMode**](Enumerations/GpCompositingMode) that says how the drawn colour is combined with the colour that is already there. **CompositingModeSourceOver** (the default) blends by the alpha value. **CompositingModeSourceCopy** replaces the colour. + +### CompositingQuality + +Syntax: *quality* **=** *graphics*.**CompositingQuality** + +Syntax: *graphics*.**CompositingQuality** **=** *quality* + +A [**GpCompositingQuality**](Enumerations/GpCompositingQuality): the quality of the blending of the colours, from fast to precise. + +### TextRenderingHint + +Syntax: *hint* **=** *graphics*.**TextRenderingHint** + +Syntax: *graphics*.**TextRenderingHint** **=** *hint* + +A [**GpTextRenderingHint**](Enumerations/GpTextRenderingHint): how the text is rendered, with or without anti-aliasing and grid fitting. + +### TextContrast + +Syntax: *contrast* **=** *graphics*.**TextContrast** + +Syntax: *graphics*.**TextContrast** **=** *contrast* + +A **Long** from 0 to 12: the gamma correction of anti-aliased text. The default is 4. + +### InterpolationMode + +Syntax: *mode* **=** *graphics*.**InterpolationMode** + +Syntax: *graphics*.**InterpolationMode** **=** *mode* + +A [**GpInterpolationMode**](Enumerations/GpInterpolationMode): how an image is resampled when it is scaled or rotated. The default is **InterpolationModeBilinear**. + +### SmoothingMode + +Syntax: *mode* **=** *graphics*.**SmoothingMode** + +Syntax: *graphics*.**SmoothingMode** **=** *mode* + +A [**GpSmoothingMode**](Enumerations/GpSmoothingMode): whether the edges of lines and shapes are anti-aliased. The default is **SmoothingModeNone**: the edges are not smoothed. + +### PixelOffsetMode + +Syntax: *mode* **=** *graphics*.**PixelOffsetMode** + +Syntax: *graphics*.**PixelOffsetMode** **=** *mode* + +A [**GpPixelOffsetMode**](Enumerations/GpPixelOffsetMode): whether the coordinates refer to the corners of the pixels (**PixelOffsetModeNone**, and the default **PixelOffsetModeDefault**) or to their centres (**PixelOffsetModeHalf**, an offset of half a pixel). + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim bmp As Bitmap = Bitmap(8, 8, PixelFormat32bppARGB) +Dim g As Graphics = Graphics(bmp) + +' The defaults +Debug.Print g.CompositingMode = CompositingModeSourceOver ' True +Debug.Print g.InterpolationMode = InterpolationModeBilinear ' True +Debug.Print g.SmoothingMode = SmoothingModeNone ' True +Debug.Print g.PixelOffsetMode = PixelOffsetModeDefault ' True +Debug.Print g.TextContrast ' 4 + +g.SmoothingMode = SmoothingModeAntiAlias +g.TextContrast = 7 +g.CompositingMode = CompositingModeSourceCopy +Debug.Print g.SmoothingMode = SmoothingModeAntiAlias ' True +Debug.Print g.TextContrast ' 7 +Debug.Print g.CompositingMode = CompositingModeSourceCopy ' True + +g.SetRenderingOrigin(3, 4) +Debug.Print g.RenderingOrigin.X & " " & g.RenderingOrigin.Y ' 3 4 +``` + +## World transform + +The world transformation changes every coordinate before it is drawn. It is a [**Matrix**](Matrix) of the object, which starts as the identity. The methods below are the ones of the [**ITransformable**](ITransformable) interface, which the **Graphics** class implements. The *order* parameter of the methods that change the transformation decides which side the new transformation is multiplied on. **MatrixOrderPrepend** (the default) applies the new transformation to the coordinates first, before the ones that are already there. **MatrixOrderAppend** applies it last. Page transformation, set by **PageUnit** and **PageScale**, follows the world transformation. + +### Transform, GetTransform +{: #transform } + +Syntax: *matrix* **=** *graphics*.**Transform** + +Syntax: *graphics*.**Transform** **=** *matrix* + +Syntax: *status* **=** *graphics*.**GetTransform**( *matrix* ) + +**Transform** gets or sets the world transformation as a [**Matrix**](Matrix). **GetTransform** copies it into a matrix that the program has created. + +*matrix* +: *required* A [**Matrix**](Matrix). + +> [!NOTE] 0.9.45.0 +> Reading **Transform** always fails: it returns **Nothing** and **LastResult** becomes **InvalidParameter**. Create a **Matrix** with `Matrix()` and read the transformation with **GetTransform**. + +### ResetTransform + +Syntax: *status* **=** *graphics*.**ResetTransform**( ) + +Sets the world transformation to the identity matrix. + +### MultiplyTransform + +Syntax: *status* **=** *graphics*.**MultiplyTransform**( *matrix* [, *order* ] ) + +Multiplies the world transformation by a matrix. + +*matrix* +: *required* The [**Matrix**](Matrix). + +*order* +: *optional* A [**GpMatrixOrder**](Enumerations/GpMatrixOrder). The default is **MatrixOrderPrepend**. + +### TranslateTransform + +Syntax: *status* **=** *graphics*.**TranslateTransform**( *dx*, *dy* [, *order* ] ) + +Syntax: *status* **=** *graphics*.**TranslateTransform**( *offset* [, *order* ] ) + +Moves the origin. + +*dx*, *dy* +: *required* **Single**: the distance to move by, to the right and down. + +*offset* +: *required* A [**GpPointF**](Types/GpPointF). + +*order* +: *optional* A [**GpMatrixOrder**](Enumerations/GpMatrixOrder). The default is **MatrixOrderPrepend**. + +### ScaleTransform + +Syntax: *status* **=** *graphics*.**ScaleTransform**( *sx*, *sy* [, *order* ] ) + +Scales the coordinates by factors, along the x axis and the y axis. + +*sx*, *sy* +: *required* **Single**: the scale factors. + +*order* +: *optional* A [**GpMatrixOrder**](Enumerations/GpMatrixOrder). The default is **MatrixOrderPrepend**. + +### RotateTransform + +Syntax: *status* **=** *graphics*.**RotateTransform**( *angle* [, *order* ] ) + +Rotates the coordinates around the origin. A positive angle turns clockwise on the screen, from the x axis towards the y axis. + +*angle* +: *required* A **Single**: the angle in degrees. + +*order* +: *optional* A [**GpMatrixOrder**](Enumerations/GpMatrixOrder). The default is **MatrixOrderPrepend**. + +### RotateTransformAt + +Syntax: *status* **=** *graphics*.**RotateTransformAt**( *angle*, *center* [, *order* ] ) + +Rotates the coordinates around a point. + +*angle* +: *required* A **Single**: the angle in degrees. + +*center* +: *required* A [**GpPointF**](Types/GpPointF): the point that stays where it is. + +*order* +: *optional* A [**GpMatrixOrder**](Enumerations/GpMatrixOrder). The default is **MatrixOrderPrepend**. + +### ShearTransform + +Syntax: *status* **=** *graphics*.**ShearTransform**( *shearX*, *shearY* [, *order* ] ) + +Shears the coordinates: each x moves by *shearX* times y, and each y by *shearY* times x. + +*shearX*, *shearY* +: *required* **Single**: the shear factors. + +*order* +: *optional* A [**GpMatrixOrder**](Enumerations/GpMatrixOrder). The default is **MatrixOrderPrepend**. + +> [!WARNING] 0.9.45.0 +> The method always returns **InvalidParameter** and leaves the transformation as it was. To shear, pass a [**Matrix**](Matrix) with the factors in its off-diagonal elements, `Matrix(1, shearY, shearX, 1, 0, 0)`, to **MultiplyTransform**. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim bmp As Bitmap = Bitmap(8, 8, PixelFormat32bppARGB) +Dim g As Graphics = Graphics(bmp) + +Debug.Print g.ShearTransform(0.5, 0) ' 2 + +Dim pts(1 To 1) As GpPointF +pts(1) = GpPointF(1, 2) +g.MultiplyTransform(Matrix(1, 0, 0.5, 1, 0, 0)) ' x moves by half of y +g.TransformPoints(CoordinateSpaceDevice, CoordinateSpaceWorld, pts) +Debug.Print pts(1).X & " " & pts(1).Y ' 2 2 +``` + +### PageUnit + +Syntax: *unit* **=** *graphics*.**PageUnit** + +Syntax: *graphics*.**PageUnit** **=** *unit* + +The [**GpUnit**](Enumerations/GpUnit) of the coordinates after the world transformation. The default is **UnitDisplay** (1). **UnitWorld** is not valid as a page unit. + +### PageScale + +Syntax: *scale* **=** *graphics*.**PageScale** + +Syntax: *graphics*.**PageScale** **=** *scale* + +A **Single** factor that is applied to the coordinates after the world transformation. The default is 1. + +### DpiX, DpiY +{: #dpix } + +Syntax: *dpi* **=** *graphics*.**DpiX** + +Syntax: *dpi* **=** *graphics*.**DpiY** + +Return the horizontal and vertical resolution of the surface, in dots per inch, as a **Single**. They can be read, not set. The resolution of a bitmap is set with the **SetResolution** method of the [**Bitmap**](Bitmap). + +### TransformPoints + +Syntax: *status* **=** *graphics*.**TransformPoints**( *destSpace*, *srcSpace*, *pts* ) + +Converts points from one coordinate space to another, in place. + +*destSpace*, *srcSpace* +: *required* A [**GpCoordinateSpace**](Enumerations/GpCoordinateSpace): **CoordinateSpaceWorld**, **CoordinateSpacePage** (after the world transformation) or **CoordinateSpaceDevice** (in pixels, after the page transformation). + +*pts* +: *required* An array of [**GpPointF**](Types/GpPointF) or [**GpPoint**](Types/GpPoint). It receives the converted points. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim bmp As Bitmap = Bitmap(20, 10, PixelFormat32bppARGB) +bmp.SetResolution(96, 96) +Dim g As Graphics = Graphics(bmp) +g.SmoothingMode = SmoothingModeNone + +Dim green As Color = Color(0, 255, 0) +Dim br As SolidBrush = SolidBrush(green) + +' The order of the transformations: a scale before a translation moves the shape by the scaled distance +g.TranslateTransform(5, 2) +g.ScaleTransform(2, 3) +g.FillRectangle(br, 0, 1, 3, 1) ' from (5, 5) to (11, 8) +Debug.Print bmp.Pixel(5, 5).Value = green.Value ' True +Debug.Print bmp.Pixel(10, 7).Value = green.Value ' True +Debug.Print bmp.Pixel(11, 7).Value = green.Value ' False +Debug.Print bmp.Pixel(5, 4).Value = green.Value ' False + +' Read the transformation back +Dim m As Matrix = Matrix() +g.GetTransform(m) +Debug.Print m.OffsetX & " " & m.OffsetY ' 5 2 + +g.ResetTransform +g.GetTransform(m) +Debug.Print m.IsIdentity ' True + +' A rotation by 90 degrees turns (1, 2) into (-2, 1) +Dim pts(1 To 1) As GpPointF +pts(1) = GpPointF(1, 2) +g.RotateTransform(90) +g.TransformPoints(CoordinateSpaceDevice, CoordinateSpaceWorld, pts) +Debug.Print pts(1).X & " " & pts(1).Y ' -2 1 + +' A rotation around (2, 2) +g.ResetTransform +pts(1) = GpPointF(3, 2) +g.RotateTransformAt(90, GpPointF(2, 2)) +g.TransformPoints(CoordinateSpaceDevice, CoordinateSpaceWorld, pts) +Debug.Print pts(1).X & " " & pts(1).Y ' 2 3 + +' A page unit of one inch is 96 pixels on this bitmap +g.ResetTransform +g.PageUnit = UnitInch +pts(1) = GpPointF(1, 1) +g.TransformPoints(CoordinateSpaceDevice, CoordinateSpaceWorld, pts) +Debug.Print pts(1).X & " " & pts(1).Y ' 96 96 +Debug.Print g.DpiX & " " & g.DpiY ' 96 96 +``` + +## Color approximation + +### GetNearestColor, GetNearestColorTo +{: #getnearestcolor } + +Syntax: *status* **=** *graphics*.**GetNearestColor**( *color* ) + +Syntax: *nearest* **=** *graphics*.**GetNearestColorTo**( *color* ) + +For a surface of 8 bits per pixel or fewer, which has a palette, replaces a colour by the nearest colour that the surface can show. The alpha value is ignored. **GetNearestColor** changes its argument, and **GetNearestColorTo** returns the colour and leaves its argument alone. A surface with more bits per pixel can show every colour, so the colour does not change. + +*color* +: *required* A [**Color**](Types/Color). + +### GetHalftonePalette + +Syntax: *hPalette* **=** *graphics*.**GetHalftonePalette**( ) + +Returns a **LongPtr**: the handle of a GDI halftone palette, which the program can select into a device context. The palette is a GDI object that the program owns, and it is not released by the package. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim bmp As Bitmap = Bitmap(4, 4, PixelFormat32bppARGB) +Dim g As Graphics = Graphics(bmp) + +Dim c As Color = Color(10, 20, 30) +Debug.Print g.GetNearestColorTo(c).Value = c.Value ' True -- a 32-bit surface keeps every colour +``` + +## GDI interoperability + +### GetHDC, ReleaseHDC +{: #gethdc } + +Syntax: *hdc* **=** *graphics*.**GetHDC**( ) + +Syntax: *graphics*.**ReleaseHDC**( ) + +Syntax: *graphics*.**ReleaseHDC**( *hdc* ) + +**GetHDC** returns a **LongPtr**: the handle of a GDI device context for the surface, so that GDI functions can draw on it. **ReleaseHDC** gives it back. The **Graphics** object is locked in between: any other call on it fails with **ObjectBusy** until the device context is released. The form without an argument releases the device context that **GetHDC** returned last. + +*hdc* +: *required* The handle that **GetHDC** returned. + +Get the device context, use it, and release it before the next call on the object. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim bmp As Bitmap = Bitmap(10, 10, PixelFormat32bppARGB) +Dim g As Graphics = Graphics(bmp) + +Dim green As Color = Color(0, 255, 0) +Dim br As SolidBrush = SolidBrush(green) + +Dim hdc As LongPtr = g.GetHDC() +Debug.Print hdc <> 0 ' True + +g.FillRectangle(br, 0, 0, 2, 2) ' the object is busy +Debug.Print g.LastResult ' 4 +g.ClearResult + +' A second Graphics object draws on the same device context +Dim g2 As Graphics = GraphicsFromHDC(hdc) +g2.FillRectangle(br, 4, 4, 2, 2) +Set g2 = Nothing + +g.ReleaseHDC +g.FillRectangle(br, 0, 0, 2, 2) ' the object is free again +Debug.Print g.LastResult ' 0 +Debug.Print bmp.Pixel(4, 4).Value = green.Value ' True +Debug.Print bmp.Pixel(0, 0).Value = green.Value ' True +``` + +## Example + +This example draws a small picture on a bitmap, with a transformation, a clipping area and a saved state, and reads back pixels from it. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim bmp As Bitmap = Bitmap(40, 20, PixelFormat32bppARGB) +Dim g As Graphics = Graphics(bmp) +g.SmoothingMode = SmoothingModeNone + +Dim white As Color = Color(255, 255, 255) +Dim red As Color = Color(255, 0, 0) +Dim blue As Color = Color(0, 0, 255) + +g.Clear(white) + +' A red frame +g.DrawRectangle(Pen(red, 1), 0, 0, 39, 19) + +' Inside a saved state: shift the origin, clip, and fill with blue +Dim state As GraphicsState = g.Save() +g.TranslateTransform(10, 5) +g.SetClip(GpRect(0, 0, 10, 6)) +g.FillRectangle(SolidBrush(blue), -5, -5, 40, 40) +g.Restore(state) + +Debug.Print bmp.Pixel(0, 0).Value = red.Value ' True -- the frame +Debug.Print bmp.Pixel(15, 8).Value = blue.Value ' True -- inside the clipped fill +Debug.Print bmp.Pixel(20, 8).Value = white.Value ' True -- outside it +Debug.Print bmp.Pixel(9, 8).Value = white.Value ' True -- left of it +``` + +## See Also + +- [Graphics](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusgraphics/nl-gdiplusgraphics-graphics) -- the GDI+ class that this one mirrors +- [Pen](Pen) class -- outlines +- [SolidBrush](SolidBrush) class -- fills +- [Font](Font) class -- text +- [StringFormat](StringFormat) class -- text layout +- [Bitmap](Bitmap) class -- drawing on pixels +- [Image](Image) class -- images +- [Metafile](Metafile) class -- recording drawing +- [GraphicsPath](GraphicsPath) class -- paths +- [Region](Region) class -- regions and clipping +- [Matrix](Matrix) class -- transformations +- [ImageAttributes](ImageAttributes) class -- colour adjustments of an image +- [CachedBitmap](CachedBitmap) class -- a bitmap that is drawn fast +- [VBGraphics](VBGraphics) class -- Visual Basic style drawing methods on a **Graphics** object +- [GdiPlusUser](GdiPlusUser) class -- keeps GDI+ active +- [IDeviceContext](IDeviceContext) interface -- the device context of a graphics object +- [ITransformable](ITransformable) interface -- the transformation methods diff --git a/docs/Reference/Contributed/GdiPlus/GraphicsPath.md b/docs/Reference/Contributed/GdiPlus/GraphicsPath.md new file mode 100644 index 00000000..759069e1 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/GraphicsPath.md @@ -0,0 +1,744 @@ +--- +title: GraphicsPath +parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/GraphicsPath +--- + +# GraphicsPath class +{: .no_toc } + +A **GraphicsPath** stores a sequence of connected lines, curves and shapes that can be drawn, filled, used as a clip or turned into a [**Region**](Region). + +A path is made of one or more *figures*. The lines and curves added one after another belong to the same figure and are connected: the end of one is the start of the next, and the figure stays open until it is closed. A shape that is closed by nature, such as a rectangle, an ellipse, a pie, a polygon or a string, is a figure of its own. [**StartFigure**](#startfigure) begins a new figure without closing the old one, and [**CloseFigure**](#closefigure) closes the current figure and begins a new one. + +The path stores its outline as an array of points and an array of *point types*. The type of a point says whether it begins a figure, ends a line, or is one of the three points that define a cubic Bézier curve after the previous point. The type also records whether the figure is closed, and whether the point has a marker or is in a dash. A point type is a [**PathPointType**](Types/PathPointType). [**PathIterator**](PathIterator) reads the figures and markers one after another. + +A path is drawn with the **DrawPath** method of [**Graphics**](Graphics) and filled with **FillPath**; how a filled area is found depends on the [fill mode](#fillmode). + +Most members return a [**GpStatus**](Enumerations/GpStatus), which is **Ok** when the call worked. A property that fails records its status in **LastResult**, as every object of the package does. See [**GdiPlusBase**](GdiPlusBase). Members that take coordinates exist in a floating-point and an integer form. The floating-point form takes **Single** values, a [**GpPointF**](Types/GpPointF) or a [**GpRectF**](Types/GpRectF). The integer form takes [**GpPoint**](Types/GpPoint) or [**GpRect**](Types/GpRect), or, where the member has four loose coordinates, is the method with the extra letter **I** in its name, such as **AddLineI**, which takes **Long** values. + +## Creating + +Syntax: *path* **= GraphicsPath(** [ *fillMode* ] **)** + +Syntax: *path* **= New GraphicsPath(** [ *fillMode* ] **)** + +The function **GraphicsPath** and **New GraphicsPath** are the same thing, and take the same arguments. + +*fillMode* +: *optional* A [**GpFillmode**](Enumerations/GpFillmode): **FillModeAlternate**, the default, or **FillModeWinding**. + +Creates an empty path. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim p As GraphicsPath = GraphicsPath() +Dim w As GraphicsPath = GraphicsPath(FillModeWinding) +Debug.Print p.FillMode & " " & w.FillMode & " " & p.PointCount ' 0 1 0 +``` + +Syntax: *path* **= GraphicsPath(** *pathData* [, *fillMode* ] **)** + +Syntax: *path* **= GraphicsPath(** *typedPoints*() [, *fillMode* ] **)** + +Syntax: *path* **= GraphicsPath(** *points*(), *types*() [, *fillMode* ] **)** + +These forms create a path from existing point data: a [**PathData**](PathData), an array of [**TypedPoint**](Types/TypedPoint), or an array of **GpPointF** or **GpPoint** together with an array of [**PathPointType**](Types/PathPointType) of the same length. + +> [!WARNING] 0.9.45.0 +> The forms that take point data do not create the path they are given. The call reports no error, and the path is empty: **PointCount** is 0, and a call of **GetPoints** on it raises an error. With an array of **GpPoint** the call records **OutOfMemory** in a 64-bit program and stops a 32-bit program with an access violation. Build the path with the **Add** methods instead. + +### Clone +{: .no_toc } + +Syntax: *path*.**Clone** **As GraphicsPath** + +Returns a new path with the same points, point types and fill mode. A change to one path does not change the other. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim p As GraphicsPath = GraphicsPath() +p.AddRectangle 1, 2, 10, 20 +Dim c As GraphicsPath = p.Clone +p.AddRectangle 0, 0, 5, 5 +Debug.Print p.PointCount & " " & c.PointCount ' 8 4 +``` + +## Properties + +### FillMode +{: .no_toc } + +Syntax: *path*.**FillMode** [ **=** *fillMode* ] + +A [**GpFillmode**](Enumerations/GpFillmode) that decides which areas of a path that crosses itself, or has figures inside each other, count as inside when the path is filled or tested. It is also used when a path becomes a [**Region**](Region). **Reset** sets it back to **FillModeAlternate**. + +With **FillModeAlternate**, a point is inside if a ray from it to infinity crosses an odd number of the path's lines. With **FillModeWinding**, a point is inside if the lines crossed do not cancel out, counting a line one way as +1 and the other way as -1. Two rectangles added to a path run in the same direction. The inner one is a hole with the alternate mode and is filled with the winding mode: + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim p As GraphicsPath = GraphicsPath() +p.AddRectangle 0, 0, 10, 10 +p.AddRectangle 2, 2, 6, 6 +Debug.Print p.IsVisible(5, 5) ' False +p.FillMode = FillModeWinding +Debug.Print p.IsVisible(5, 5) ' True +``` + +### PointCount +{: .no_toc } + +Syntax: *path*.**PointCount** **As Long** + +The number of points in the path. The same number of point types exists. + +### LastPoint +{: .no_toc } + +Syntax: *path*.**LastPoint** **As GpPointF** + +The last point of the path: the end of the last figure. An empty path has no last point and the property records an error in **LastResult**. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim p As GraphicsPath = GraphicsPath() +p.AddLine 0, 0, 10, 20 +Dim pt As GpPointF = p.LastPoint +Debug.Print pt.X & " " & pt.Y ' 10 20 +``` + +### PathData +{: .no_toc } + +Syntax: *path*.**PathData** **As PathData** + +Returns the points and point types of the path as a [**PathData**](PathData). + +> [!NOTE] 0.9.45.0 +> The property returns **Nothing** and records **InvalidParameter** in **LastResult**, whatever the path holds. Read the points with [**GetPoints**](#getpoints) and the point types with [**GetTypes**](#gettypes). + +## Figures and markers + +This example makes a path of two figures, closes the second, and lists the types the points get. A type is a number: 0 begins a figure, 1 is a line, 3 is part of a Bézier curve, and the letters show the close flag **c** and the marker flag **m**. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim p As GraphicsPath = GraphicsPath() +p.AddLine 0, 0, 5, 5 +p.StartFigure +p.AddLine 10, 10, 15, 15 +p.AddLine 15, 15, 20, 10 +p.CloseFigure +p.SetMarker + +Dim ty() As PathPointType +p.GetTypes ty +Dim t As PathPointType +Dim i As Long, s As String +For i = 1 To UBound(ty) + t = ty(i) + s &= CLng(t.PointType) & IIf(t.CloseSubpath, "c", "") & IIf(t.PathMarker, "m", "") & " " +Next +Debug.Print s ' 0 1 0 1 1cm +``` + +### Reset +{: .no_toc } + +Syntax: *path*.**Reset** **As GpStatus** + +Empties the path and sets its fill mode to **FillModeAlternate**. + +### StartFigure +{: .no_toc } + +Syntax: *path*.**StartFigure** **As GpStatus** + +Begins a new figure without closing the current one. The next line or curve is not connected to the end of the previous one. + +### CloseFigure +{: .no_toc } + +Syntax: *path*.**CloseFigure** **As GpStatus** + +Closes the current figure by marking its last point with the close flag, and begins a new figure. When the path is drawn, the last point is connected to the first point of the figure. A figure that is closed by nature, such as a rectangle, needs no call. + +### CloseAllFigures +{: .no_toc } + +Syntax: *path*.**CloseAllFigures** **As GpStatus** + +Closes every open figure of the path, as **CloseFigure** closes the current one. + +### SetMarker +{: .no_toc } + +Syntax: *path*.**SetMarker** **As GpStatus** + +Marks the last point of the path as a marker. Markers divide the path into sections that [**PathIterator**](PathIterator#nextmarker) reads one after another. + +### ClearMarkers +{: .no_toc } + +Syntax: *path*.**ClearMarkers** **As GpStatus** + +Removes all markers from the path. + +### Reverse +{: .no_toc } + +Syntax: *path*.**Reverse** **As GpStatus** + +Reverses the order of the points, so that the path runs from its last point to its first. The figures are reversed too: the first figure of the result ends where the last figure of the path began. + +## Adding lines and curves + +An *Add* method appends to the current figure. If the figure has points, the first new point is connected to the last point of the figure by a line. To avoid the connecting line, call [**StartFigure**](#startfigure) first. + +### AddLine +{: .no_toc } + +Syntax: *path*.**AddLine(** *x1*, *y1*, *x2*, *y2* **)** **As GpStatus** + +Syntax: *path*.**AddLine(** *pt1*, *pt2* **)** **As GpStatus** + +Syntax: *path*.**AddLineI(** *x1*, *y1*, *x2*, *y2* **)** **As GpStatus** + +*x1*, *y1*, *x2*, *y2* +: *required* Coordinates of the two ends, **Single** for **AddLine** and **Long** for **AddLineI**. + +*pt1*, *pt2* +: *required* The two ends, as [**GpPointF**](Types/GpPointF) or as [**GpPoint**](Types/GpPoint). + +Adds a line from *pt1* to *pt2*. When the figure already has points, a line from its last point to *pt1* is added first. + +### AddLines +{: .no_toc } + +Syntax: *path*.**AddLines(** *points*() **)** **As GpStatus** + +*points* +: *required* An array of **GpPointF** or **GpPoint**. + +Adds a series of connected lines through the points. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim p As GraphicsPath = GraphicsPath() +p.AddLine 0, 0, 10, 10 +Debug.Print p.PointCount ' 2 +Dim pts(1 To 3) As GpPointF +pts(1) = GpPointF(20, 0): pts(2) = GpPointF(30, 10): pts(3) = GpPointF(20, 20) +p.AddLines pts +Debug.Print p.PointCount ' 5 +``` + +### AddArc +{: .no_toc } + +Syntax: *path*.**AddArc(** *rect*, *startAngle*, *sweepAngle* **)** **As GpStatus** + +Syntax: *path*.**AddArc(** *x*, *y*, *width*, *height*, *startAngle*, *sweepAngle* **)** **As GpStatus** + +Syntax: *path*.**AddArcI(** *x*, *y*, *width*, *height*, *startAngle*, *sweepAngle* **)** **As GpStatus** + +*rect* +: *required* A [**GpRectF**](Types/GpRectF) or [**GpRect**](Types/GpRect) that bounds the ellipse the arc is part of. + +*x*, *y*, *width*, *height* +: *required* The same rectangle as four numbers, **Single** for **AddArc** and **Long** for **AddArcI**. + +*startAngle* +: *required* A **Single** angle in degrees, measured clockwise from the x axis, where the arc begins. + +*sweepAngle* +: *required* A **Single** angle in degrees, where the arc ends, relative to *startAngle*. A positive angle turns clockwise. + +Adds an elliptical arc as one or more Bézier curves. Where the figure already has points, a line to the start of the arc is added first. + +### AddBezier +{: .no_toc } + +Syntax: *path*.**AddBezier(** *x1*, *y1*, *x2*, *y2*, *x3*, *y3*, *x4*, *y4* **)** **As GpStatus** + +Syntax: *path*.**AddBezier(** *pt1*, *pt2*, *pt3*, *pt4* **)** **As GpStatus** + +Syntax: *path*.**AddBezierI(** *x1*, *y1*, ..., *x4*, *y4* **)** **As GpStatus** + +Adds a cubic Bézier curve. The points are the start, the first control point, the second control point and the end. The curve is the three point types 3 after a start or line point. + +### AddBeziers +{: .no_toc } + +Syntax: *path*.**AddBeziers(** *points*() **)** **As GpStatus** + +*points* +: *required* An array of **GpPointF** or **GpPoint**. It holds the start point, then three points for each curve, so its length is 3n + 1 for n curves. An array of any other length is refused with **InvalidParameter**. + +Adds a series of connected Bézier curves. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim p As GraphicsPath = GraphicsPath() +p.AddBezier 0, 0, 5, 10, 15, 10, 20, 0 +Debug.Print p.PointCount ' 4 +Dim pts(1 To 7) As GpPointF +pts(1) = GpPointF(0, 0): pts(2) = GpPointF(5, 10): pts(3) = GpPointF(15, 10): pts(4) = GpPointF(20, 0) +pts(5) = GpPointF(25, -10): pts(6) = GpPointF(35, -10): pts(7) = GpPointF(40, 0) +Dim q As GraphicsPath = GraphicsPath() +Debug.Print q.AddBeziers(pts) & " " & q.PointCount ' 0 7 +Dim r(1 To 3) As GpPointF +Debug.Print q.AddBeziers(r) ' 2 +``` + +### AddCurve +{: .no_toc } + +Syntax: *path*.**AddCurve(** *points*() [, *tension* ] **)** **As GpStatus** + +Syntax: *path*.**AddCurve(** *points*(), *offset*, *numberOfSegments*, *tension* **)** **As GpStatus** + +*points* +: *required* An array of **GpPointF** or **GpPoint** that the curve passes through. + +*tension* +: *optional* A **Single** that sets how sharply the curve bends at the points. 0 gives straight lines, and the default, 0.5, a smooth curve. Larger values make the curve overshoot. + +*offset* +: *required* The index of the array element at which the curve starts, counted from 0. + +*numberOfSegments* +: *required* The number of segments, each between two points, to draw. + +Adds a cardinal spline, drawn as Bézier curves. + +### AddClosedCurve +{: .no_toc } + +Syntax: *path*.**AddClosedCurve(** *points*() [, *tension* ] **)** **As GpStatus** + +Adds a closed cardinal spline through the points. It is a figure of its own. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim pts(1 To 3) As GpPointF +pts(1) = GpPointF(0, 0): pts(2) = GpPointF(5, 10): pts(3) = GpPointF(10, 0) +Dim p As GraphicsPath = GraphicsPath() +p.AddCurve pts +Debug.Print p.PointCount ' 7 +Dim c As GraphicsPath = GraphicsPath() +c.AddClosedCurve pts +Debug.Print c.PointCount ' 10 +``` + +## Adding shapes + +### AddRectangle +{: .no_toc } + +Syntax: *path*.**AddRectangle(** *rect* **)** **As GpStatus** + +Syntax: *path*.**AddRectangle(** *x*, *y*, *width*, *height* **)** **As GpStatus** + +Syntax: *path*.**AddRectangleI(** *x*, *y*, *width*, *height* **)** **As GpStatus** + +Adds a closed figure of four points. The rectangle is a figure of its own. + +### AddRectangles +{: .no_toc } + +Syntax: *path*.**AddRectangles(** *rects*() **)** **As GpStatus** + +*rects* +: *required* An array of [**GpRectF**](Types/GpRectF) or [**GpRect**](Types/GpRect). + +Adds each rectangle as a figure of its own. + +### AddEllipse +{: .no_toc } + +Syntax: *path*.**AddEllipse(** *rect* **)** **As GpStatus** + +Syntax: *path*.**AddEllipse(** *x*, *y*, *width*, *height* **)** **As GpStatus** + +Syntax: *path*.**AddEllipseI(** *x*, *y*, *width*, *height* **)** **As GpStatus** + +Adds a closed ellipse that fits in the rectangle, as a figure of its own. It consists of 13 points: the start point and four Bézier curves. + +### AddPie +{: .no_toc } + +Syntax: *path*.**AddPie(** *rect*, *startAngle*, *sweepAngle* **)** **As GpStatus** + +Syntax: *path*.**AddPie(** *x*, *y*, *width*, *height*, *startAngle*, *sweepAngle* **)** **As GpStatus** + +Syntax: *path*.**AddPieI(** *x*, *y*, *width*, *height*, *startAngle*, *sweepAngle* **)** **As GpStatus** + +Adds a closed pie slice: an arc, as for [**AddArc**](#addarc), with a line from each end to the centre of the ellipse. It is a figure of its own. + +### AddPolygon +{: .no_toc } + +Syntax: *path*.**AddPolygon(** *points*() **)** **As GpStatus** + +*points* +: *required* An array of **GpPointF** or **GpPoint**, with at least three points. + +Adds a closed polygon, as a figure of its own. The last point need not repeat the first. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim p As GraphicsPath = GraphicsPath() +p.AddRectangle 0, 0, 10, 10 +p.AddEllipse 20, 0, 10, 10 +Dim tri(1 To 3) As GpPointF +tri(1) = GpPointF(40, 0): tri(2) = GpPointF(50, 0): tri(3) = GpPointF(45, 8) +p.AddPolygon tri +Debug.Print p.PointCount ' 20 +``` + +### AddPath +{: .no_toc } + +Syntax: *path*.**AddPath(** *addingPath*, *connect* **)** **As GpStatus** + +*addingPath* +: *required* The **GraphicsPath** whose figures are copied. It is not changed. + +*connect* +: *required* A **Boolean**. When it is **True**, the first figure of *addingPath* continues the current figure of this path instead of starting a new one. + +Adds the points of *addingPath* to the end of this path. + +### AddString +{: .no_toc } + +Syntax: *path*.**AddString(** *string*, *family*, *style*, *emSize*, *origin*, *format* **)** **As GpStatus** + +Syntax: *path*.**AddString(** *string*, *family*, *style*, *emSize*, *layoutRect*, *format* **)** **As GpStatus** + +*string* +: *required* The **String** whose outline is added. + +*family* +: *required* The [**FontFamily**](FontFamily) of the text. + +*style* +: *required* A **Long** made of [**GpFontStyle**](Enumerations/GpFontStyle) flags, such as **FontStyleRegular**. + +*emSize* +: *required* A **Single** height of the em square, in the units of the path's coordinates. + +*origin* +: *required* A [**GpPointF**](Types/GpPointF) or [**GpPoint**](Types/GpPoint), the top-left corner of the text. + +*layoutRect* +: *required* A [**GpRectF**](Types/GpRectF) or [**GpRect**](Types/GpRect) in which the text is laid out and wrapped. + +*format* +: *required* The [**StringFormat**](StringFormat) that sets the alignment and the wrapping. It can be **Nothing**. + +Adds the outlines of the characters of *string*, so that text can be filled, used as a clip, or reshaped like any other path. The shape of the characters depends on the fonts installed. + +```tb check_build +Dim user As GdiPlusUser = GdiPlusUser() +Dim p As GraphicsPath = GraphicsPath() +Dim family As FontFamily = FontFamily("Arial") +p.AddString "Hello", family, FontStyleRegular, 24, GpPointF(0, 0), StringFormat() +``` + +## Changing a path + +### Transform +{: .no_toc } + +Syntax: *path*.**Transform(** *matrix* **)** **As GpStatus** + +*matrix* +: *required* A [**Matrix**](Matrix) to apply to every point. **Nothing** leaves the path as it is and returns **Ok**. + +Multiplies each point by the matrix. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim p As GraphicsPath = GraphicsPath() +p.AddLine 1, 1, 2, 2 +Dim m As Matrix = Matrix(2, 0, 0, 3, 10, 20) +p.Transform m +Dim pt As GpPointF = p.LastPoint +Debug.Print pt.X & " " & pt.Y ' 14 26 +``` + +### Flatten +{: .no_toc } + +Syntax: *path*.**Flatten(** [ *matrix* ], [ *flatness* ] **)** **As GpStatus** + +*matrix* +: *optional* A [**Matrix**](Matrix) applied before flattening. The default is no transformation. + +*flatness* +: *optional* A **Single**, the largest distance, in the units of the path, between a curve and the lines that replace it. The default is 0.25, which the constant **FlatnessDefault** holds. A smaller value gives more lines. + +Replaces every curve with a series of straight lines. The curve information is lost. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim p As GraphicsPath = GraphicsPath() +p.AddEllipse 0, 0, 100, 100 +Dim ty() As PathPointType +Dim t As PathPointType +Dim i As Long, n As Long +p.GetTypes ty +For i = 1 To UBound(ty) + t = ty(i) + If t.PointType = PathPointTypeBezier Then n += 1 +Next +Debug.Print p.PointCount & " " & n ' 13 12 +p.Flatten +p.GetTypes ty +n = 0 +For i = 1 To UBound(ty) + t = ty(i) + If t.PointType = PathPointTypeBezier Then n += 1 +Next +Debug.Print (p.PointCount > 13) & " " & n ' True 0 +``` + +### Widen +{: .no_toc } + +Syntax: *path*.**Widen(** *pen*, [ *matrix* ], [ *flatness* ] **)** **As GpStatus** + +*pen* +: *required* The [**Pen**](Pen) whose width, dashes, caps and joins decide the outline. + +*matrix*, *flatness* +: *optional* As for **Flatten**. + +Replaces the path with the outline of the area that the pen paints when it draws the path. The outline is flattened and its fill mode is **FillModeWinding**. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim p As GraphicsPath = GraphicsPath() +p.AddLine 0, 0, 10, 0 +Dim pn As Pen = Pen(Color(255, 255, 0, 0), 2) +p.Widen pn +Debug.Print p.PointCount & " " & p.FillMode ' 4 1 +Dim b As GpRectF +p.GetWorldBounds b, Nothing, Nothing +Debug.Print b.Y & " " & b.Height ' -1 2 +``` + +### Outline +{: .no_toc } + +Syntax: *path*.**Outline(** [ *matrix* ], [ *flatness* ] **)** **As GpStatus** + +*matrix*, *flatness* +: *optional* As for **Flatten**. + +Flattens the path and replaces it with the outline of the area that **FillModeWinding** fills. Where figures overlap, only the outer boundary remains. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim p As GraphicsPath = GraphicsPath() +p.AddRectangle 0, 0, 10, 10 +p.AddRectangle 5, 5, 10, 10 +p.FillMode = FillModeWinding +Dim ty() As PathPointType +Dim t As PathPointType +Dim i As Long, n As Long +p.GetTypes ty +For i = 1 To UBound(ty) + t = ty(i) + If t.PointType = PathPointTypeStart Then n += 1 +Next +Debug.Print n ' 2 +p.Outline +p.GetTypes ty +n = 0 +For i = 1 To UBound(ty) + t = ty(i) + If t.PointType = PathPointTypeStart Then n += 1 +Next +Debug.Print n ' 1 +``` + +### Warp +{: .no_toc } + +Syntax: *path*.**Warp(** *destPoints*(), *srcRect*, [ *matrix* ], [ *warpMode* ], [ *flatness* ] **)** **As GpStatus** + +Syntax: *path*.**Warp(** *destPoints*(), *srcX*, *srcY*, *srcWidth*, *srcHeight*, [ *matrix* ], [ *warpMode* ], [ *flatness* ] **)** **As GpStatus** + +*destPoints* +: *required* An array of **GpPointF** with three or four points: the images of the top-left, top-right and bottom-left corners of the source rectangle, and, with four points, of the bottom-right corner. With three points the warp is a parallelogram transformation. + +*srcRect*, *srcX*, *srcY*, *srcWidth*, *srcHeight* +: *required* The rectangle that is mapped to the destination, as a [**GpRectF**](Types/GpRectF) or as four **Single** values. There is no integer overload. + +*matrix* +: *optional* A [**Matrix**](Matrix) applied after the warp. + +*warpMode* +: *optional* A [**GpWarpMode**](Enumerations/GpWarpMode): **WarpModePerspective**, the default, or **WarpModeBilinear**. + +*flatness* +: *optional* As for [**Flatten**](#flatten). + +Warps the path so that the source rectangle fills the quadrilateral given by the destination points, and flattens it. The curve information is lost. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim p As GraphicsPath = GraphicsPath() +p.AddRectangle 0, 0, 10, 10 +Dim dst(1 To 4) As GpPointF +dst(1) = GpPointF(0, 0): dst(2) = GpPointF(20, 0) +dst(3) = GpPointF(0, 10): dst(4) = GpPointF(20, 10) +Debug.Print p.Warp(dst, GpRectF(0, 0, 10, 10)) ' 0 +Dim b As GpRectF +p.GetWorldBounds b, Nothing, Nothing +Debug.Print Round(b.Width, 2) & " " & Round(b.Height, 2) ' 20 10 +``` + +## Reading a path + +### GetPoints +{: .no_toc } + +Syntax: *path*.**GetPoints(** *points*() **)** **As GpStatus** + +*points* +: *required* A dynamic array of **GpPointF** or **GpPoint**. The call sizes it to the number of points, with indexes 1 to **PointCount**, and fills it. + +> [!NOTE] 0.9.45.0 +> On an empty path the call raises run-time error -2147467259, *Unspecified error*. Check **PointCount** first. + +### GetTypes +{: .no_toc } + +Syntax: *path*.**GetTypes(** *types*() **)** **As GpStatus** + +*types* +: *required* A dynamic array of [**PathPointType**](Types/PathPointType). The call sizes it to the number of points, with indexes 1 to **PointCount**, and fills it. + +> [!NOTE] 0.9.45.0 +> On an empty path the call raises run-time error -2147467259, *Unspecified error*. Check **PointCount** first. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim p As GraphicsPath = GraphicsPath() +p.AddRectangle 1, 2, 10, 20 +Dim pts() As GpPointF +p.GetPoints pts +Dim i As Long, s As String +For i = 1 To UBound(pts) + s &= "(" & pts(i).X & "," & pts(i).Y & ") " +Next +Debug.Print s ' (1,2) (11,2) (11,22) (1,22) +``` + +### GetWorldBounds +{: .no_toc } + +Syntax: *path*.**GetWorldBounds(** *bounds*, *matrix*, *pen* **)** **As GpStatus** + +*bounds* +: *required* A [**GpRectF**](Types/GpRectF) or a [**GpRect**](Types/GpRect) variable that receives the rectangle. The integer form rounds outward. + +*matrix* +: *required* A [**Matrix**](Matrix) applied to the path before its bounds are found, or **Nothing**. + +*pen* +: *required* A [**Pen**](Pen). When given, the bounds also hold the area the pen paints when it draws the path, wide corners and caps included. **Nothing** gives the bounds of the path itself. + +Finds a rectangle that holds the path. The rectangle need not be the smallest one: for a curve it can be larger than the curve, and with a pen it can be much larger than the line. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim p As GraphicsPath = GraphicsPath() +p.AddRectangle 1, 2, 10, 20 +Dim b As GpRectF +p.GetWorldBounds b, Nothing, Nothing +Debug.Print b.X & " " & b.Y & " " & b.Width & " " & b.Height ' 1 2 10 20 +``` + +## Hit testing + +### IsVisible +{: .no_toc } + +Syntax: *path*.**IsVisible(** *point*, [ *g* ] **)** **As Boolean** + +Syntax: *path*.**IsVisible(** *x*, *y*, [ *g* ] **)** **As Boolean** + +Syntax: *path*.**IsVisibleI(** *x*, *y*, [ *g* ] **)** **As Boolean** + +*point* +: *required* A [**GpPointF**](Types/GpPointF) or [**GpPoint**](Types/GpPoint). + +*x*, *y* +: *required* The coordinates, **Single** for **IsVisible** and **Long** for **IsVisibleI**. + +*g* +: *optional* A [**Graphics**](Graphics). When given, the point is taken in the coordinates of that object, after its transformation. + +Returns **True** when the point is inside the area that is filled when the path is filled, as the [fill mode](#fillmode) decides. + +### IsOutlineVisible +{: .no_toc } + +Syntax: *path*.**IsOutlineVisible(** *point*, *pen*, [ *g* ] **)** **As Boolean** + +Syntax: *path*.**IsOutlineVisible(** *x*, *y*, *pen*, [ *g* ] **)** **As Boolean** + +Syntax: *path*.**IsOutlineVisibleI(** *x*, *y*, *pen*, [ *g* ] **)** **As Boolean** + +*pen* +: *required* The [**Pen**](Pen) whose width, caps and joins decide how much the outline covers. + +The other arguments are as for **IsVisible**. Returns **True** when the point touches the outline of the path, drawn with the pen. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim p As GraphicsPath = GraphicsPath() +p.AddRectangle 0, 0, 10, 10 +Dim pn As Pen = Pen(Color(255, 255, 0, 0), 2) +Debug.Print p.IsVisible(5, 5) & " " & p.IsVisible(15, 15) ' True False +Debug.Print p.IsOutlineVisible(0, 5, pn) & " " & p.IsOutlineVisible(5, 5, pn) ' True False +``` + +## Example + +This example fills a heart-shaped path made of two arcs and a polygon, then reads two pixels back to show which areas are filled and which are not. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim bmp As Bitmap = Bitmap(40!, 40!) +Dim g As Graphics = Graphics(bmp) +g.Clear Color(255, 255, 255, 255) + +Dim p As GraphicsPath = GraphicsPath() +p.AddArc 4, 6, 16, 16, 180, 180 ' the left lobe +p.AddArc 20, 6, 16, 16, 180, 180 ' the right lobe +Dim tip(1 To 3) As GpPointF +tip(1) = GpPointF(36, 14): tip(2) = GpPointF(20, 36): tip(3) = GpPointF(4, 14) +p.AddLines tip +p.CloseFigure + +Dim sb As SolidBrush = New SolidBrush(Color(255, 255, 0, 0)) +g.FillPath sb, p +Debug.Print Hex$(bmp.Pixel(20, 20).G) ' 0 +Debug.Print Hex$(bmp.Pixel(2, 2).G) ' FF +``` + +## See Also + +- [PathIterator](PathIterator) class -- reads the figures and markers of a path +- [PathData](PathData) class -- the points and point types of a path +- [Region](Region) class -- an area made from paths and rectangles +- [Matrix](Matrix) class -- the transformation applied by **Transform** +- [Graphics](Graphics) class -- **DrawPath**, **FillPath** and **SetClip** use a path +- [GpFillmode](Enumerations/GpFillmode) enumeration +- [GraphicsPath class](https://learn.microsoft.com/en-us/windows/win32/api/gdipluspath/nl-gdipluspath-graphicspath) -- Microsoft's documentation of the GDI+ class diff --git a/docs/Reference/Contributed/GdiPlus/HatchBrush.md b/docs/Reference/Contributed/GdiPlus/HatchBrush.md new file mode 100644 index 00000000..1b887aee --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/HatchBrush.md @@ -0,0 +1,132 @@ +--- +title: HatchBrush +parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/HatchBrush +--- + +# HatchBrush class +{: .no_toc } + +A brush that fills a shape with a pattern of lines or dots in a foreground colour over a background colour. + +A **HatchBrush** implements [**IBrush**](IBrush). The pattern is one of the 53 styles of [**GpHatchStyle**](Enumerations/GpHatchStyle), a small tile that repeats across the shape. The foreground colour draws the lines or dots of the tile, and the background colour fills the rest. The class mirrors the GDI+ [HatchBrush](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusbrush/nl-gdiplusbrush-hatchbrush) class. + +* TOC +{:toc} + +## Creating + +Syntax: *brush* **= New HatchBrush**( *hatchStyle*, *foreColor*, *backColor* ) + +Syntax: *brush* **= New HatchBrush**( *hatchStyle*, *foreRgb*, *backRgb* ) + +*hatchStyle* +: *required* A [**GpHatchStyle**](Enumerations/GpHatchStyle) value for the pattern. + +*foreColor*, *backColor* +: *required* **Color** values for the lines or dots and for the background. The alpha values are kept. + +*foreRgb*, *backRgb* +: *required* **Long** values for the same colours, as `&H00RRGGBB`. The alpha values are always 255. + +> [!WARNING] 0.9.45.0 +> The function **HatchBrush**( ), the form without **New**, calls itself and never returns. Use **New HatchBrush**. + +> [!WARNING] 0.9.45.0 +> The *foreRgb* and *backRgb* form reads each **Long** as `&H00RRGGBB`, not as a VB colour, and drops the alpha: `vbRed` is blue. [**IBrush**](IBrush#colours) lists what else is not translated. Use the **Color** form. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim red As Color = Color(255, 255, 0, 0) +Dim blue As Color = Color(255, 0, 0, 255) +Dim brush As HatchBrush = New HatchBrush(HatchStyleHorizontal, red, blue) + +Dim bmp As Bitmap = Bitmap(8!, 8!) +Dim g As Graphics = Graphics(bmp) +g.FillRectangle(brush, 0, 0, 8, 8) + +Dim y As Long, row As String +For y = 0 To 3 + row = row & IIf(bmp.Pixel(3, y).argb = red.argb, "F", "B") +Next +Debug.Print row +' Output: +' FBBB +``` + +### Clone + +Syntax: *copy* **=** *brush*.**Clone**( ) + +Returns a new **HatchBrush** with the same style and colours. + +## Properties + +The properties are read-only: a hatch brush is created with its style and colours, and they do not change. + +### HatchStyle + +Syntax: *style* **=** *brush*.**HatchStyle** + +Returns the [**GpHatchStyle**](Enumerations/GpHatchStyle) of the brush. + +### ForegroundColor + +Syntax: *color* **=** *brush*.**ForegroundColor** + +Returns the colour of the lines or dots, as a **Color**. + +### BackgroundColor + +Syntax: *color* **=** *brush*.**BackgroundColor** + +Returns the background colour, as a **Color**. + +### Type + +Syntax: *type* **=** *brush*.**Type** + +Returns **BrushTypeHatchFill** ([**GpBrushType**](Enumerations/GpBrushType)). The property is read-only. + +## Example + +The example fills two 8-by-8 bitmaps with the cross and the vertical styles and prints the top row of each. **F** is a pixel of the foreground colour and **B** one of the background colour. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim red As Color = Color(255, 255, 0, 0) +Dim blue As Color = Color(255, 0, 0, 255) +Dim styles(1) As GpHatchStyle +styles(0) = HatchStyleCross +styles(1) = HatchStyleVertical + +Dim bmp As Bitmap = Bitmap(8!, 8!) +Dim g As Graphics = Graphics(bmp) +Dim i As Long, x As Long, row As String +For i = 0 To 1 + Dim brush As HatchBrush = New HatchBrush(styles(i), red, blue) + g.FillRectangle(brush, 0, 0, 8, 8) + row = "" + For x = 0 To 7 + row = row & IIf(bmp.Pixel(x, 0).argb = red.argb, "F", "B") + Next + Debug.Print row +Next + +Dim hatch As HatchBrush = New HatchBrush(HatchStyle50Percent, red, blue) +Debug.Print hatch.HatchStyle & " " & Hex$(hatch.ForegroundColor.argb) & " " & Hex$(hatch.BackgroundColor.argb) +' Output: +' FFFFFFFF +' FBBBBBBB +' 12 FFFF0000 FF0000FF +``` + +## See Also + +- [HatchBrush](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusbrush/nl-gdiplusbrush-hatchbrush) -- Microsoft's documentation of the GDI+ class +- [IBrush](IBrush) interface +- [SolidBrush](SolidBrush) class +- [TextureBrush](TextureBrush) class +- [GpHatchStyle](Enumerations/GpHatchStyle) enumeration diff --git a/docs/Reference/Contributed/GdiPlus/Helpers.md b/docs/Reference/Contributed/GdiPlus/Helpers.md new file mode 100644 index 00000000..2adfb962 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Helpers.md @@ -0,0 +1,729 @@ +--- +title: Helpers +parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Helpers +has_toc: false +--- + +# Helpers +{: .no_toc } + +The functions and constants of the package that belong to no class: module-level members that are called by their name alone. + +The constructors of the classes and types are documented on the page of each class or type, and so are the functions that only that page uses: **Color**, **FromCOLORREF**, **MakeARGB** and **HueToValue** on [Color](Types/Color), **Intersection** and **Union** on [GpRect](Types/GpRect) and [GpRectF](Types/GpRectF), **NotificationHook** and **NotificationUnhook** on [GdiplusStartupOutput](Types/GdiplusStartupOutput). This page has the rest. + +## Status + +### AsText + +Syntax: **AsText**( *status* As [**GpStatus**](Enumerations/GpStatus) ) As **String** + +Returns the text of a status code: `Ok`, `Invalid Parameter`, `Out of Memory`, `Win32 Error` and so on, as [**Status**](GdiPlusBase#status-statusnl) of a **GdiPlusBase** object returns it. A value outside the codes gives an empty string. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Debug.Print AsText(Ok) ' Ok +Debug.Print AsText(InvalidParameter) ' Invalid Parameter +Debug.Print AsText(ProfileNotFound) ' Profile Not Found +Debug.Print Len(AsText(99)) ' 0 +``` + +## GDI+ itself + +### GetBuildNumber + +Syntax: **GetBuildNumber**( *buildNumber* As **Long** ) As **GpStatus** + +Stores the build number of the GDI+ library in *buildNumber* and returns the status. The first call asks GDI+ and the number is then kept. GDI+ must be started. The method of the same name on [**GdiPlusUser**](GdiPlusUser) returns the number as its value. + +### TestControl + +Syntax: **TestControl**( *control* As [**GpTestControlEnum**](Enumerations/GpTestControlEnum), *param* As **Any** ) As **GpStatus** + +The call that GDI+ provides for its own tests, with an untyped parameter that depends on *control*. Prefer the three functions that follow and **GetBuildNumber**, which wrap it. + +### TestControlForceBilinear + +Syntax: **TestControlForceBilinear**( *force* As **Boolean** ) As **GpStatus** + +**True** makes GDI+ use bilinear interpolation for every scaled image; **False** returns to the setting of the graphics object. A switch for testing. + +### TestControlNoICM + +Syntax: **TestControlNoICM**( *noICM* As **Boolean** ) As **GpStatus** + +**True** turns the colour management of GDI+ off; **False** turns it on again. A switch for testing. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim build As Long +Debug.Print GetBuildNumber(build) ' 0 +Debug.Print build > 0 ' True +Debug.Print TestControlForceBilinear(False) ' 0 +Debug.Print TestControlNoICM(False) ' 0 +``` + +## Pixel formats + +These take a [**PixelFormat**](Enumerations/PixelFormat) and test or read the flags that are part of its value. + +### GetPixelFormatSize + +Syntax: **GetPixelFormatSize**( *format* As **PixelFormat** ) As **Long** + +Returns the number of bits of one pixel: 32 for **PixelFormat32bppARGB**. + +### IsAlphaPixelFormat + +Syntax: **IsAlphaPixelFormat**( *format* As **PixelFormat** ) As **Boolean** + +**True** when the format has an alpha channel. + +### IsIndexedPixelFormat + +Syntax: **IsIndexedPixelFormat**( *format* As **PixelFormat** ) As **Boolean** + +**True** when the pixels are indexes into a palette. + +### IsExtendedPixelFormat + +Syntax: **IsExtendedPixelFormat**( *format* As **PixelFormat** ) As **Boolean** + +**True** when the format has 16 bits for each channel. + +### IsCanonicalPixelFormat + +Syntax: **IsCanonicalPixelFormat**( *format* As **PixelFormat** ) As **Boolean** + +**True** when the format is one of the canonical formats of GDI+: 32 or 64 bits with an alpha channel. + +> [!WARNING] 0.9.45.0 +> The result is **False** for **PixelFormat32bppPARGB** and **PixelFormat64bppPARGB**, which are canonical in GDI+, because the values of those two members of the enumeration lack the canonical flag. It is **True** for **PixelFormat32bppARGB** and **PixelFormat64bppARGB**. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Debug.Print GetPixelFormatSize(PixelFormat32bppARGB) ' 32 +Debug.Print GetPixelFormatSize(PixelFormat24bppRGB) ' 24 +Debug.Print IsAlphaPixelFormat(PixelFormat32bppARGB) ' True +Debug.Print IsAlphaPixelFormat(PixelFormat24bppRGB) ' False +Debug.Print IsIndexedPixelFormat(PixelFormat8bppIndexed) ' True +Debug.Print IsExtendedPixelFormat(PixelFormat48bppRGB) ' True +Debug.Print IsCanonicalPixelFormat(PixelFormat32bppARGB) ' True +``` + +## Object types + +### ObjectTypeIsValid + +Syntax: **ObjectTypeIsValid**( *type* As [**GpObjectType**](Enumerations/GpObjectType) ) As **Boolean** + +**True** when *type* is one of the kinds of GDI+ object, from **ObjectTypeBrush** to **ObjectTypeGraphics**; **False** for **ObjectTypeInvalid** and values outside the range. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Debug.Print ObjectTypeIsValid(ObjectTypeBrush) ' True +Debug.Print ObjectTypeIsValid(ObjectTypeInvalid) ' False +``` + +## Palettes and metafiles + +### InitializePalette + +Syntax: **InitializePalette**( *palette* As **ColorPalette**, *paletteType*, *optimalColors* As **Long**, *useTransparentColor* As **Boolean** [, *bitmap* As [**Bitmap**](Bitmap) ] ) As **GpStatus** + +Fills *palette* with colours of the kind *paletteType* ([**PaletteType**](Enumerations/PaletteType)). *optimalColors* is the number of colours to find. For the optimal types, the colours are chosen by median cut from *bitmap*. The palette must have its **count** set to the number of entries it can hold; if it has too few, the call fails. + +### EmfToWmfBits + +Syntax: **EmfToWmfBits**( *hEmf* As **LongPtr**, *cbData16* As **Long**, *pData16* As **Byte** [, *mapMode* [, *flags* ]] ) As **Long** + +Converts an enhanced metafile to the bits of a Windows metafile. *hEmf* is the handle of the enhanced metafile, *pData16* the first byte of a buffer of *cbData16* bytes that receives the result, and *flags* a combination of [**GpEmfToWmfBitsFlags**](Enumerations/GpEmfToWmfBitsFlags). Returns the number of bytes, or 0 on failure. + +### GetMetafileHeader + +Syntax: **GetMetafileHeader**( *filename* As **String**, *header* As [**MetafileHeader**](Types/MetafileHeader) ) As **GpStatus** + +Syntax: **GetMetafileHeader**( *stream*, *header* As **MetafileHeader** ) As **GpStatus** + +Reads the header of a metafile without making a [**Metafile**](Metafile) of it, and stores it in *header*. The first form reads a file, the second a stream, an object that implements the COM interface **IStream**, such as the one that the Windows function `SHCreateStreamOnFileEx` makes. The status is **Ok** when the header is read. + +### GetMetafileHeaderFromEmf + +Syntax: **GetMetafileHeaderFromEmf**( *hEmf* As **LongPtr**, *header* As **MetafileHeader** ) As **GpStatus** + +Reads the header of the enhanced metafile that the handle *hEmf* names. The handle stays with the caller. + +### GetMetafileHeaderFromWmf + +Syntax: **GetMetafileHeaderFromWmf**( *hWmf* As **LongPtr**, *placeableHeader* As [**WmfPlaceableFileHeader**](Types/WmfPlaceableFileHeader), *header* As **MetafileHeader** ) As **GpStatus** + +Reads the header of the Windows metafile that the handle *hWmf* names. *placeableHeader* is the [placeable header](Types/WmfPlaceableFileHeader) that goes with the metafile, which gives its bounds and resolution, since a Windows metafile has none of its own. GDI+ checks the header: when **Checksum** is not the exclusive OR of the ten 16-bit words before it, the call returns 2 (**InvalidParameter**). The handle stays with the caller. + +```tb check_build slot=file projname=gdiplus-helpers +Module HelpersEmf + Private Declare PtrSafe Function CreateEnhMetaFileW Lib "gdi32" (ByVal hdcRef As LongPtr, ByVal fileName As LongPtr, ByVal rc As LongPtr, ByVal desc As LongPtr) As LongPtr + Private Declare PtrSafe Function CloseEnhMetaFile Lib "gdi32" (ByVal hdc As LongPtr) As LongPtr + Private Declare PtrSafe Function DeleteEnhMetaFile Lib "gdi32" (ByVal h As LongPtr) As Long + Private Declare PtrSafe Function CreateMetaFileW Lib "gdi32" (ByVal fileName As LongPtr) As LongPtr + Private Declare PtrSafe Function CloseMetaFile Lib "gdi32" (ByVal hdc As LongPtr) As LongPtr + Private Declare PtrSafe Function Rectangle Lib "gdi32" (ByVal hdc As LongPtr, ByVal l As Long, ByVal t As Long, ByVal r As Long, ByVal b As Long) As Long + Private Declare PtrSafe Function SHCreateStreamOnFileEx Lib "shlwapi" (ByVal fileName As LongPtr, ByVal mode As Long, ByVal attributes As Long, ByVal create As Long, ByVal template As LongPtr, ByRef stream As GDIP_IStream) As Long + + ' Opens a file for reading as a COM stream. + Public Function OpenStream(ByVal path As String) As GDIP_IStream + SHCreateStreamOnFileEx StrPtr(path), 0, &H80, 0, 0, OpenStream + End Function + + ' Makes an enhanced metafile with one rectangle, in memory (path = "") or in a file. + ' The handle is the caller's to delete with DeleteEmf. + Public Function MakeEmf(ByVal width As Long, ByVal height As Long, Optional ByVal path As String) As LongPtr + Dim dc As LongPtr + If Len(path) = 0 Then dc = CreateEnhMetaFileW(0, 0, 0, 0) Else dc = CreateEnhMetaFileW(0, StrPtr(path), 0, 0) + Rectangle dc, 0, 0, width, height + Return CloseEnhMetaFile(dc) + End Function + + Public Sub DeleteEmf(ByVal hEmf As LongPtr) + DeleteEnhMetaFile hEmf + End Sub + + ' Makes a Windows metafile with one rectangle, in memory. + Public Function MakeWmf() As LongPtr + Dim dc As LongPtr = CreateMetaFileW(0) + Rectangle dc, 0, 0, 100, 50 + Return CloseMetaFile(dc) + End Function +End Module +``` + +```tb check_build check_run projname=gdiplus-helpers +Dim user As GdiPlusUser = GdiPlusUser() +Dim header As MetafileHeader + +Dim hemf As LongPtr = HelpersEmf.MakeEmf(40, 30) +Debug.Print GetMetafileHeaderFromEmf(hemf, header) +Debug.Print header.IsEmf & " " & header.Width & " " & header.Height +HelpersEmf.DeleteEmf hemf + +Dim path As String = Environ$("TEMP") & "\tbdocs-gdiplus-header.emf" +HelpersEmf.DeleteEmf HelpersEmf.MakeEmf(50, 20, path) +Debug.Print GetMetafileHeader(path, header) +Debug.Print header.IsEmf & " " & header.Width & " " & header.Height + +Dim header2 As MetafileHeader +Dim stream As GDIP_IStream = HelpersEmf.OpenStream(path) +Debug.Print GetMetafileHeader(stream, header2) +Debug.Print header2.IsEmf & " " & header2.Width & " " & header2.Height +Set stream = Nothing +Kill path + +Dim placeable As WmfPlaceableFileHeader +placeable.Key = &H9AC6CDD7 +placeable.BoundingBox.Right = 2880 +placeable.BoundingBox.Bottom = 1440 +placeable.Inch = 1440 +placeable.Checksum = &H5C51 ' the exclusive OR of the ten words before it +Dim header3 As MetafileHeader +Debug.Print GetMetafileHeaderFromWmf(HelpersEmf.MakeWmf(), placeable, header3) +Debug.Print header3.Type & " " & header3.IsWmf & " " & header3.DpiX & " " & header3.Width & " " & header3.Height +' Output: +' 0 +' True 40 30 +' 0 +' True 50 20 +' 0 +' True 50 20 +' 0 +' 2 True 1440 2880 1440 +``` + +### GdipCreateStreamOnFile + +Syntax: **GdipCreateStreamOnFile**( *filename* As **LongPtr**, *access* As **Long**, *stream* ) As **GpStatus** + +The function of the GDI+ flat API of that name, declared by the package. It is meant to open the file whose name *filename* points to (the address of a string, as `StrPtr(name)` returns it) as a COM **IStream** and to store it in *stream*, for the stream form of [**GetMetafileHeader**](#getmetafileheader). + +> [!WARNING] 0.9.45.0 +> The function returns 6 (**NotImplemented**) and stores no stream, whatever the value of *access*. Make the stream with the Windows function `SHCreateStreamOnFileEx` instead, as the sample above does. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim stream As GDIP_IStream +Dim path As String = Environ$("TEMP") & "\tbdocs-gdiplus-stream.tmp" +Debug.Print GdipCreateStreamOnFile(StrPtr(path), &H80000000, stream) +Debug.Print stream Is Nothing +' Output: +' 6 +' True +``` + +## Effects + +The effect classes ([**Effect**](Effect)) are applied to a bitmap in place by [**Bitmap.ApplyEffect**](Bitmap#applyeffect). The functions below apply one to several bitmaps at once, name the effects to the flat GDI+ API, and read and write the parameters of a native effect. + +### ApplyEffect + +Syntax: *status* **= ApplyEffect**( *inputs*( ) As [**Bitmap**](Bitmap), *effect* As [**Effect**](Effect), *output* As **Bitmap** ) + +Syntax: *status* **= ApplyEffect**( *inputs*( ) As **Bitmap**, *effect* As **Effect**, *roi* As [**GpRect**](Types/GpRect), *outputRect* As **GpRect**, *output* As **Bitmap** ) + +*inputs* +: *required* An array of the bitmaps that the effect reads. Most effects read one. + +*effect* +: *required* The effect to apply. + +*roi* +: *required* The part of the input that the effect reads. The first form passes none, and the effect reads all of it. + +*outputRect* +: *required* The rectangle of the output that receives the result. The first form passes none, and the output is as large as the part that is read. + +*output* +: *required* Receives a new **Bitmap** that holds the result; the inputs are not changed. It is **Nothing** when the call fails. + +Applies the effect to the input bitmaps and returns the result in a new bitmap, where [**Bitmap.ApplyEffect**](Bitmap#applyeffect) changes the pixels of one bitmap. It needs GDI+ 1.1 (Windows 7 or later). Any auxiliary data of the effect from an earlier call is freed first, and the data of this call is stored in the effect ([**Effect.AuxData**](Effect#auxdata)). + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim src As Bitmap = Bitmap(8!, 8!) +Graphics(src).Clear(Color(255, 200, 100, 50)) +Dim inputs(0 To 0) As Bitmap +Set inputs(0) = src + +Dim out As Bitmap +Debug.Print ApplyEffect(inputs, BrightnessContrast(50, 0), out) +Debug.Print out.Width & " " & out.Height +Debug.Print Hex$(out.Pixel(4, 4).argb) +Debug.Print Hex$(src.Pixel(4, 4).argb) +' Output: +' 0 +' 8 8 +' FFFA9664 +' FFC86432 +``` + +### Effect IDs + +Each effect class is created in GDI+ from a class ID. These functions take no arguments and return it as a **UUID**, for a program that calls the flat GDI+ function `GdipCreateEffect` itself. The effect classes use them, so a program that uses the classes has no need of them. + +| Function | Effect | +|:---------|:-------| +| **BlurEffectGuid** | [**Blur**](Blur) | +| **SharpenEffectGuid** | [**Sharpen**](Sharpen) | +| **ColorMatrixEffectGuid** | [**ColorMatrixEffect**](ColorMatrixEffect) | +| **ColorLUTEffectGuid** | [**ColorLUT**](ColorLUT) | +| **BrightnessContrastEffectGuid** | [**BrightnessContrast**](BrightnessContrast) | +| **HueSaturationLightnessEffectGuid** | [**HueSaturationLightness**](HueSaturationLightness) | +| **LevelsEffectGuid** | [**Levels**](Levels) | +| **TintEffectGuid** | [**Tint**](Tint) | +| **ColorBalanceEffectGuid** | [**ColorBalance**](ColorBalance) | +| **RedEyeCorrectionEffectGuid** | [**RedEyeCorrection**](RedEyeCorrection) | +| **ColorCurveEffectGuid** | [**ColorCurve**](ColorCurve) | + +### ColorLutParams + +Syntax: *params* **= ColorLutParams**( *lutB*( ) As **Byte**, *lutG*( ) As **Byte**, *lutR*( ) As **Byte**, *lutA*( ) As **Byte** ) + +The constructor of [**ColorLUTParams**](Types/ColorLUTParams), written with a different letter case. It is described, with its defect, on the page of that type. + +### SetParameters, GetParameters + +Syntax: *status* **= SetParameters**( *effect*, *params* ) + +Syntax: *status* **= GetParameters**( *effect*, *params* ) + +Set and read the parameters of the GDI+ effect object that *effect* names, for a program that calls the flat GDI+ API. *effect* is the native handle of the effect, which [**GetNative**](#getnative) returns for an **Effect** object; *params* is one of the parameter structures, such as [**BlurParams**](Types/BlurParams), and its size is passed to GDI+. **GetParameters** fills *params*. The classes use them for their **Parameters** properties, which are the usual way to the same data. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim fx As Effect = Blur(2!, False) +Debug.Print Hex$(BlurEffectGuid().Data1) +Dim params As BlurParams = BlurParams(7!, True) +Debug.Print SetParameters(GetNative(fx), params) + +Dim back As BlurParams +Debug.Print GetParameters(GetNative(fx), back) +Debug.Print back.radius & " " & (back.expandEdge <> 0) +' Output: +' 633C80A4 +' 0 +' 0 +' 7 True +``` + +## Brushes + +### BrushFrom + +Syntax: *brush* **= BrushFrom**( *native* ) + +Makes the brush object for a native GDI+ brush, for a program that calls the flat GDI+ API and wants a class in place of a bare handle. *native* is the handle of the native brush. The function reads its kind and returns an [**IBrush**](IBrush) that holds a [**SolidBrush**](SolidBrush), [**HatchBrush**](HatchBrush), [**TextureBrush**](TextureBrush), [**PathGradientBrush**](PathGradientBrush) or [**LinearGradientBrush**](LinearGradientBrush); the brush object owns the handle from then on and deletes it, so no other object may. For a handle of another kind it deletes the handle and returns **Nothing**. + +```tb check_build slot=file projname=gdiplus-helpers +Module HelpersBrush + Private Declare PtrSafe Function GdipCreateSolidFill Lib "gdiplus" (ByVal argb As Long, ByRef brush As LongPtr) As Long + + ' Makes a native solid brush the way a flat GDI+ program does. + Public Function MakeNativeSolid(ByVal argb As Long) As GpBrush + Dim h As LongPtr + If GdipCreateSolidFill(argb, h) = 0 Then MakeNativeSolid.Native = h + End Function +End Module +``` + +```tb check_build check_run projname=gdiplus-helpers +Dim user As GdiPlusUser = GdiPlusUser() + +Dim b As IBrush = BrushFrom(HelpersBrush.MakeNativeSolid(&HFF336699)) +Debug.Print b.Type +Dim bmp As Bitmap = Bitmap(4!, 4!) +Graphics(bmp).FillRectangle b, 0, 0, 4, 4 +Debug.Print Hex$(bmp.Pixel(1, 1).argb) +' Output: +' 0 +' FF336699 +``` + +## Native handles + +### GetNative + +Syntax: **GetNative**( *object* ) As *handle* + +Returns the native handle of a GDI+ object for the program that calls the flat GDI+ functions itself. There is one overload for each class that wraps a GDI+ object: **Graphics**, **Pen**, **Bitmap**, **Image**, **Metafile**, **Region**, **Matrix**, **GraphicsPath**, **Font**, **FontFamily**, **FontCollection** and its two derived classes, **StringFormat**, **ImageAttributes**, **CachedBitmap**, **PathIterator**, **Effect**, **CustomLineCap**, **ArrowCap**, and each brush class. It returns a small structure of the package whose **Native** field holds the handle as a **LongPtr**; for a **Nothing** argument the field is 0. The handle belongs to the object and is released with it: do not delete it. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim bmp As Bitmap = Bitmap(8!, 8!) +Debug.Print GetNative(bmp).Native <> 0 ' True +``` + +## Property tag IDs + +An image file can hold properties: the camera model of a photograph, the time it was taken, the delay of a GIF frame. Each has a numeric ID, and the constants below name the common ones. An ID is the *propId* argument of [**Image.PropertyItem**](Image#propertyitem) and the **Id** field of a [**GpPropertyItem**](Types/GpPropertyItem). The tables give each constant by its full name and its value. The names are those of the GDI+ C++ header, spelling included (`PropertyTagTransferFuncition`). The type of a property's value is the one that the TIFF, EXIF or GPS standard gives the tag; the constants do not say what it is. The thumbnail tags (`PropertyTagThumbnail...`) describe the small picture that a file may hold beside the main one. + +> [!WARNING] 0.9.45.0 +> Each constant is an **Integer**, so the 61 tags from `&H8000` up, such as `PropertyTagCopyright` (`&H8298`), are negative numbers. Passed where a **Long** is expected, as the *propId* of **PropertyItem** and **RemovePropertyItem** are, a negative **Integer** becomes `&HFFFF8298`, the ID of another property, and the call finds nothing. Convert the tag first with `tag And &HFFFF&`, which gives `&H8298`, as the example below does. The same holds for comparing a tag with the **Id** of a **GpPropertyItem**. + +### Exif properties + +| Constant | Value | +|:---------|:------| +| **PropertyTagExifIFD** | `&H8769` | +| **PropertyTagExifExposureTime** | `&H829A` | +| **PropertyTagExifFNumber** | `&H829D` | +| **PropertyTagExifExposureProg** | `&H8822` | +| **PropertyTagExifSpectralSense** | `&H8824` | +| **PropertyTagExifISOSpeed** | `&H8827` | +| **PropertyTagExifOECF** | `&H8828` | +| **PropertyTagExifVer** | `&H9000` | +| **PropertyTagExifDTOrig** | `&H9003` | +| **PropertyTagExifDTDigitized** | `&H9004` | +| **PropertyTagExifCompConfig** | `&H9101` | +| **PropertyTagExifCompBPP** | `&H9102` | +| **PropertyTagExifShutterSpeed** | `&H9201` | +| **PropertyTagExifAperture** | `&H9202` | +| **PropertyTagExifBrightness** | `&H9203` | +| **PropertyTagExifExposureBias** | `&H9204` | +| **PropertyTagExifMaxAperture** | `&H9205` | +| **PropertyTagExifSubjectDist** | `&H9206` | +| **PropertyTagExifMeteringMode** | `&H9207` | +| **PropertyTagExifLightSource** | `&H9208` | +| **PropertyTagExifFlash** | `&H9209` | +| **PropertyTagExifFocalLength** | `&H920A` | +| **PropertyTagExifSubjectArea** | `&H9214` | +| **PropertyTagExifMakerNote** | `&H927C` | +| **PropertyTagExifUserComment** | `&H9286` | +| **PropertyTagExifDTSubsec** | `&H9290` | +| **PropertyTagExifDTOrigSS** | `&H9291` | +| **PropertyTagExifDTDigSS** | `&H9292` | +| **PropertyTagExifFPXVer** | `&HA000` | +| **PropertyTagExifColorSpace** | `&HA001` | +| **PropertyTagExifPixXDim** | `&HA002` | +| **PropertyTagExifPixYDim** | `&HA003` | +| **PropertyTagExifRelatedWav** | `&HA004` | +| **PropertyTagExifInterop** | `&HA005` | +| **PropertyTagExifFlashEnergy** | `&HA20B` | +| **PropertyTagExifSpatialFR** | `&HA20C` | +| **PropertyTagExifFocalXRes** | `&HA20E` | +| **PropertyTagExifFocalYRes** | `&HA20F` | +| **PropertyTagExifFocalResUnit** | `&HA210` | +| **PropertyTagExifSubjectLoc** | `&HA214` | +| **PropertyTagExifExposureIndex** | `&HA215` | +| **PropertyTagExifSensingMethod** | `&HA217` | +| **PropertyTagExifFileSource** | `&HA300` | +| **PropertyTagExifSceneType** | `&HA301` | +| **PropertyTagExifCfaPattern** | `&HA302` | +| **PropertyTagExifCustomRendered** | `&HA401` | +| **PropertyTagExifExposureMode** | `&HA402` | +| **PropertyTagExifWhiteBalance** | `&HA403` | +| **PropertyTagExifDigitalZoomRatio** | `&HA404` | +| **PropertyTagExifFocalLengthIn35mmFilm** | `&HA405` | +| **PropertyTagExifSceneCaptureType** | `&HA406` | +| **PropertyTagExifGainControl** | `&HA407` | +| **PropertyTagExifContrast** | `&HA408` | +| **PropertyTagExifSaturation** | `&HA409` | +| **PropertyTagExifSharpness** | `&HA40A` | +| **PropertyTagExifDeviceSettingDesc** | `&HA40B` | +| **PropertyTagExifSubjectDistanceRange** | `&HA40C` | +| **PropertyTagExifUniqueImageID** | `&HA420` | + +### GPS properties + +| Constant | Value | +|:---------|:------| +| **PropertyTagGpsIFD** | `&H8825` | +| **PropertyTagGpsVer** | `&H0000` | +| **PropertyTagGpsLatitudeRef** | `&H0001` | +| **PropertyTagGpsLatitude** | `&H0002` | +| **PropertyTagGpsLongitudeRef** | `&H0003` | +| **PropertyTagGpsLongitude** | `&H0004` | +| **PropertyTagGpsAltitudeRef** | `&H0005` | +| **PropertyTagGpsAltitude** | `&H0006` | +| **PropertyTagGpsGpsTime** | `&H0007` | +| **PropertyTagGpsGpsSatellites** | `&H0008` | +| **PropertyTagGpsGpsStatus** | `&H0009` | +| **PropertyTagGpsGpsMeasureMode** | `&H000A` | +| **PropertyTagGpsGpsDop** | `&H000B` | +| **PropertyTagGpsSpeedRef** | `&H000C` | +| **PropertyTagGpsSpeed** | `&H000D` | +| **PropertyTagGpsTrackRef** | `&H000E` | +| **PropertyTagGpsTrack** | `&H000F` | +| **PropertyTagGpsImgDirRef** | `&H0010` | +| **PropertyTagGpsImgDir** | `&H0011` | +| **PropertyTagGpsMapDatum** | `&H0012` | +| **PropertyTagGpsDestLatRef** | `&H0013` | +| **PropertyTagGpsDestLat** | `&H0014` | +| **PropertyTagGpsDestLongRef** | `&H0015` | +| **PropertyTagGpsDestLong** | `&H0016` | +| **PropertyTagGpsDestBearRef** | `&H0017` | +| **PropertyTagGpsDestBear** | `&H0018` | +| **PropertyTagGpsDestDistRef** | `&H0019` | +| **PropertyTagGpsDestDist** | `&H001A` | +| **PropertyTagGpsProcessingMethod** | `&H001B` | +| **PropertyTagGpsAreaInformation** | `&H001C` | +| **PropertyTagGpsDate** | `&H001D` | +| **PropertyTagGpsDifferential** | `&H001E` | + +### Thumbnail properties + +| Constant | Value | +|:---------|:------| +| **PropertyTagThumbnailFormat** | `&H5012` | +| **PropertyTagThumbnailWidth** | `&H5013` | +| **PropertyTagThumbnailHeight** | `&H5014` | +| **PropertyTagThumbnailColorDepth** | `&H5015` | +| **PropertyTagThumbnailPlanes** | `&H5016` | +| **PropertyTagThumbnailRawBytes** | `&H5017` | +| **PropertyTagThumbnailSize** | `&H5018` | +| **PropertyTagThumbnailCompressedSize** | `&H5019` | +| **PropertyTagThumbnailData** | `&H501B` | +| **PropertyTagThumbnailImageWidth** | `&H5020` | +| **PropertyTagThumbnailImageHeight** | `&H5021` | +| **PropertyTagThumbnailBitsPerSample** | `&H5022` | +| **PropertyTagThumbnailCompression** | `&H5023` | +| **PropertyTagThumbnailPhotometricInterp** | `&H5024` | +| **PropertyTagThumbnailImageDescription** | `&H5025` | +| **PropertyTagThumbnailEquipMake** | `&H5026` | +| **PropertyTagThumbnailEquipModel** | `&H5027` | +| **PropertyTagThumbnailStripOffsets** | `&H5028` | +| **PropertyTagThumbnailOrientation** | `&H5029` | +| **PropertyTagThumbnailSamplesPerPixel** | `&H502A` | +| **PropertyTagThumbnailRowsPerStrip** | `&H502B` | +| **PropertyTagThumbnailStripBytesCount** | `&H502C` | +| **PropertyTagThumbnailResolutionX** | `&H502D` | +| **PropertyTagThumbnailResolutionY** | `&H502E` | +| **PropertyTagThumbnailPlanarConfig** | `&H502F` | +| **PropertyTagThumbnailResolutionUnit** | `&H5030` | +| **PropertyTagThumbnailTransferFunction** | `&H5031` | +| **PropertyTagThumbnailSoftwareUsed** | `&H5032` | +| **PropertyTagThumbnailDateTime** | `&H5033` | +| **PropertyTagThumbnailArtist** | `&H5034` | +| **PropertyTagThumbnailWhitePoint** | `&H5035` | +| **PropertyTagThumbnailPrimaryChromaticities** | `&H5036` | +| **PropertyTagThumbnailYCbCrCoefficients** | `&H5037` | +| **PropertyTagThumbnailYCbCrSubsampling** | `&H5038` | +| **PropertyTagThumbnailYCbCrPositioning** | `&H5039` | +| **PropertyTagThumbnailRefBlackWhite** | `&H503A` | +| **PropertyTagThumbnailCopyRight** | `&H503B` | + +### JPEG properties + +| Constant | Value | +|:---------|:------| +| **PropertyTagJPEGProc** | `&H0200` | +| **PropertyTagJPEGInterFormat** | `&H0201` | +| **PropertyTagJPEGInterLength** | `&H0202` | +| **PropertyTagJPEGRestartInterval** | `&H0203` | +| **PropertyTagJPEGLosslessPredictors** | `&H0205` | +| **PropertyTagJPEGPointTransforms** | `&H0206` | +| **PropertyTagJPEGQTables** | `&H0207` | +| **PropertyTagJPEGDCTables** | `&H0208` | +| **PropertyTagJPEGACTables** | `&H0209` | +| **PropertyTagJPEGQuality** | `&H5010` | + +### Halftone properties + +| Constant | Value | +|:---------|:------| +| **PropertyTagHalftoneHints** | `&H0141` | +| **PropertyTagHalftoneLPI** | `&H500A` | +| **PropertyTagHalftoneLPIUnit** | `&H500B` | +| **PropertyTagHalftoneDegree** | `&H500C` | +| **PropertyTagHalftoneShape** | `&H500D` | +| **PropertyTagHalftoneMisc** | `&H500E` | +| **PropertyTagHalftoneScreen** | `&H500F` | + +### TIFF, GIF, PNG and general properties + +| Constant | Value | +|:---------|:------| +| **PropertyTagNewSubfileType** | `&H00FE` | +| **PropertyTagSubfileType** | `&H00FF` | +| **PropertyTagImageWidth** | `&H0100` | +| **PropertyTagImageHeight** | `&H0101` | +| **PropertyTagBitsPerSample** | `&H0102` | +| **PropertyTagCompression** | `&H0103` | +| **PropertyTagPhotometricInterp** | `&H0106` | +| **PropertyTagThreshHolding** | `&H0107` | +| **PropertyTagCellWidth** | `&H0108` | +| **PropertyTagCellHeight** | `&H0109` | +| **PropertyTagFillOrder** | `&H010A` | +| **PropertyTagDocumentName** | `&H010D` | +| **PropertyTagImageDescription** | `&H010E` | +| **PropertyTagEquipMake** | `&H010F` | +| **PropertyTagEquipModel** | `&H0110` | +| **PropertyTagStripOffsets** | `&H0111` | +| **PropertyTagOrientation** | `&H0112` | +| **PropertyTagSamplesPerPixel** | `&H0115` | +| **PropertyTagRowsPerStrip** | `&H0116` | +| **PropertyTagStripBytesCount** | `&H0117` | +| **PropertyTagMinSampleValue** | `&H0118` | +| **PropertyTagMaxSampleValue** | `&H0119` | +| **PropertyTagXResolution** | `&H011A` | +| **PropertyTagYResolution** | `&H011B` | +| **PropertyTagPlanarConfig** | `&H011C` | +| **PropertyTagPageName** | `&H011D` | +| **PropertyTagXPosition** | `&H011E` | +| **PropertyTagYPosition** | `&H011F` | +| **PropertyTagFreeOffset** | `&H0120` | +| **PropertyTagFreeByteCounts** | `&H0121` | +| **PropertyTagGrayResponseUnit** | `&H0122` | +| **PropertyTagGrayResponseCurve** | `&H0123` | +| **PropertyTagT4Option** | `&H0124` | +| **PropertyTagT6Option** | `&H0125` | +| **PropertyTagResolutionUnit** | `&H0128` | +| **PropertyTagPageNumber** | `&H0129` | +| **PropertyTagTransferFuncition** | `&H012D` | +| **PropertyTagSoftwareUsed** | `&H0131` | +| **PropertyTagDateTime** | `&H0132` | +| **PropertyTagArtist** | `&H013B` | +| **PropertyTagHostComputer** | `&H013C` | +| **PropertyTagPredictor** | `&H013D` | +| **PropertyTagWhitePoint** | `&H013E` | +| **PropertyTagPrimaryChromaticities** | `&H013F` | +| **PropertyTagColorMap** | `&H0140` | +| **PropertyTagTileWidth** | `&H0142` | +| **PropertyTagTileLength** | `&H0143` | +| **PropertyTagTileOffset** | `&H0144` | +| **PropertyTagTileByteCounts** | `&H0145` | +| **PropertyTagInkSet** | `&H014C` | +| **PropertyTagInkNames** | `&H014D` | +| **PropertyTagNumberOfInks** | `&H014E` | +| **PropertyTagDotRange** | `&H0150` | +| **PropertyTagTargetPrinter** | `&H0151` | +| **PropertyTagExtraSamples** | `&H0152` | +| **PropertyTagSampleFormat** | `&H0153` | +| **PropertyTagSMinSampleValue** | `&H0154` | +| **PropertyTagSMaxSampleValue** | `&H0155` | +| **PropertyTagTransferRange** | `&H0156` | +| **PropertyTagYCbCrCoefficients** | `&H0211` | +| **PropertyTagYCbCrSubsampling** | `&H0212` | +| **PropertyTagYCbCrPositioning** | `&H0213` | +| **PropertyTagREFBlackWhite** | `&H0214` | +| **PropertyTagICCProfile** | `&H8773` | +| **PropertyTagGamma** | `&H0301` | +| **PropertyTagICCProfileDescriptor** | `&H0302` | +| **PropertyTagSRGBRenderingIntent** | `&H0303` | +| **PropertyTagImageTitle** | `&H0320` | +| **PropertyTagCopyright** | `&H8298` | +| **PropertyTagResolutionXUnit** | `&H5001` | +| **PropertyTagResolutionYUnit** | `&H5002` | +| **PropertyTagResolutionXLengthUnit** | `&H5003` | +| **PropertyTagResolutionYLengthUnit** | `&H5004` | +| **PropertyTagPrintFlags** | `&H5005` | +| **PropertyTagPrintFlagsVersion** | `&H5006` | +| **PropertyTagPrintFlagsCrop** | `&H5007` | +| **PropertyTagPrintFlagsBleedWidth** | `&H5008` | +| **PropertyTagPrintFlagsBleedWidthScale** | `&H5009` | +| **PropertyTagGridSize** | `&H5011` | +| **PropertyTagColorTransferFunction** | `&H501A` | +| **PropertyTagLuminanceTable** | `&H5090` | +| **PropertyTagChrominanceTable** | `&H5091` | +| **PropertyTagFrameDelay** | `&H5100` | +| **PropertyTagLoopCount** | `&H5101` | +| **PropertyTagGlobalPalette** | `&H5102` | +| **PropertyTagIndexBackground** | `&H5103` | +| **PropertyTagIndexTransparent** | `&H5104` | +| **PropertyTagPixelUnit** | `&H5110` | +| **PropertyTagPixelPerUnitX** | `&H5111` | +| **PropertyTagPixelPerUnitY** | `&H5112` | +| **PropertyTagPaletteHistogram** | `&H5113` | + + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Debug.Print Hex$(PropertyTagImageWidth) & " " & Hex$(PropertyTagImageHeight) +Debug.Print Hex$(PropertyTagFrameDelay) +Debug.Print PropertyTagImageWidth = &H100 +Debug.Print PropertyTagCopyright & " " & Hex$(CLng(PropertyTagCopyright)) +Debug.Print Hex$(PropertyTagCopyright And &HFFFF&) +' Output: +' 100 101 +' 5100 +' True +' -32104 FFFF8298 +' 8298 +``` + +## Constants + +### REAL_EPSILON + +The smallest **Single** that added to 1 changes it: 1.192092896E-07. The geometry types use it as the limit under which a length or a size counts as zero. + +### REAL_MAX, REAL_MIN, REAL_TOLERANCE + +**REAL_MAX** is the largest **Single**, 3.402823466E+38; **REAL_MIN** the smallest positive normal one, 1.175494351E-38; **REAL_TOLERANCE** is 100 times **REAL_MIN**. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Debug.Print REAL_EPSILON < 0.000001 ' True +Debug.Print REAL_MIN * 100 = REAL_TOLERANCE ' True +Debug.Print REAL_MAX > 1E+38 ' True +``` + +## Callback delegates + +Delegate types for the callbacks that some methods take. The methods that accept one say so on their pages. + +### ImageAbort, DrawImageAbort, GetThumbnailImageAbort + +**Function**( *pv* As **LongPtr** ) As **GDIP_BOOL**. GDI+ calls the function while it works, with the *callbackData* pointer that the caller passed; a non-zero result asks it to stop. **GetThumbnailImageAbort** is the type of the callback of the **GetThumbnail** method of [**Image**](Image). + +### EnumerateMetafileProc + +**Function**( *recordType* As **GpEmfPlusRecordType**, *flags* As **Long**, *dataSize* As **Long**, *data* As **LongPtr**, *callbackData* As **LongPtr** ). Called once for each record by the methods of **Graphics** that enumerate a metafile; a result of **False** ends the enumeration. See [**Metafile**](Metafile). + +## See Also + +- [GdiPlusBase](GdiPlusBase) class -- **LastResult** and **Status** +- [GdiPlusUser](GdiPlusUser) class -- starts GDI+ +- [Types](Types/) -- the types of the package +- [Effect](Effect) class -- the effects that **ApplyEffect** applies +- [Metafile](Metafile) class -- a picture stored as drawing commands +- [IBrush](IBrush) interface -- what **BrushFrom** returns +- [ImageCodec](ImageCodec) -- the image format and encoder IDs diff --git a/docs/Reference/Contributed/GdiPlus/HueSaturationLightness.md b/docs/Reference/Contributed/GdiPlus/HueSaturationLightness.md new file mode 100644 index 00000000..da9a46af --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/HueSaturationLightness.md @@ -0,0 +1,97 @@ +--- +title: HueSaturationLightness +parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/HueSaturationLightness +--- + +# HueSaturationLightness class +{: .no_toc } + +An [**Effect**](Effect) that changes the hue, the saturation and the lightness of a picture. + +The class mirrors the GDI+ [HueSaturationLightness](https://learn.microsoft.com/en-us/windows/win32/api/gdipluseffects/nl-gdipluseffects-huesaturationlightness) class and inherits the members of [**Effect**](Effect). + +* TOC +{:toc} + +## Creating + +Syntax: *fx* **= HueSaturationLightness**( ) + +Syntax: *fx* **= HueSaturationLightness**( *params* ) + +Syntax: *fx* **= HueSaturationLightness**( *hue*, *saturation*, *lightness* ) + +Each form is also available as **New HueSaturationLightness**( ... ) with the same arguments. + +*params* +: *required* A [**HueSaturationLightnessParams**](Types/HueSaturationLightnessParams) for the parameters. + +*hue* +: *required* A **Long** from -180 to 180: the angle, in degrees, by which every hue is turned around the colour wheel. 0 changes nothing. + +*saturation* +: *required* A **Long** from -100 to 100. A positive value makes the colours more vivid, and -100 turns the picture gray. + +*lightness* +: *required* A **Long** from -100 to 100. A positive value lightens the picture, and a negative one darkens it. + +A constructor that fails creates an unusable object whose **LastResult** tells why. + +> [!WARNING] 0.9.45.0 +> The form with *params* stops the program with an access violation, in 32-bit and 64-bit programs. The forms without arguments and with the three values work. To use a structure, create the effect without arguments and set [**Parameters**](#parameters). + +## Parameters + +Syntax: *fx*.**Parameters** [ **=** *params* ] + +Syntax: *params* **=** *fx*.**Parameters**( *size* ) + +Gets or sets the [**HueSaturationLightnessParams**](Types/HueSaturationLightnessParams). + +> [!WARNING] 0.9.45.0 +> The getter returns zeros and sets **LastResult** to 2 (**InvalidParameter**) unless it is given *size*, the size of the structure: `fx.Parameters(LenB(Of HueSaturationLightnessParams))`. See [**Effect**](Effect#parameters). + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim fx As HueSaturationLightness = HueSaturationLightness(120, -20, 10) +Dim p As HueSaturationLightnessParams = fx.Parameters(LenB(Of HueSaturationLightnessParams)) +Debug.Print fx.LastResult & " " & p.hue & " " & p.saturation & " " & p.lightness +' Output: +' 0 120 -20 10 +``` + +## Example + +The example applies each of the three settings alone to the colour 200, 100, 50. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim light As Bitmap = Bitmap(4!, 4!) +Dim gray As Bitmap = Bitmap(4!, 4!) +Dim turned As Bitmap = Bitmap(4!, 4!) +Graphics(light).Clear(Color(255, 200, 100, 50)) +Graphics(gray).Clear(Color(255, 200, 100, 50)) +Graphics(turned).Clear(Color(255, 200, 100, 50)) + +light.ApplyEffect HueSaturationLightness(0, 0, 50), GpRect(0, 0, 4, 4) +gray.ApplyEffect HueSaturationLightness(0, -100, 0), GpRect(0, 0, 4, 4) +turned.ApplyEffect HueSaturationLightness(120, 0, 0), GpRect(0, 0, 4, 4) +Debug.Print Hex$(light.Pixel(1, 1).argb) +Debug.Print Hex$(gray.Pixel(1, 1).argb) +Debug.Print Hex$(turned.Pixel(1, 1).argb) +' Output: +' FFFFFCFB +' FF7D7D7D +' FF32C862 +``` + +## See Also + +- [HueSaturationLightness](https://learn.microsoft.com/en-us/windows/win32/api/gdipluseffects/nl-gdipluseffects-huesaturationlightness) -- Microsoft's documentation of the GDI+ class +- [Effect](Effect) class +- [Tint](Tint) class +- [ColorBalance](ColorBalance) class +- [HueSaturationLightnessParams](Types/HueSaturationLightnessParams) type diff --git a/docs/Reference/Contributed/GdiPlus/IBrush.md b/docs/Reference/Contributed/GdiPlus/IBrush.md new file mode 100644 index 00000000..b0b85d09 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/IBrush.md @@ -0,0 +1,105 @@ +--- +title: IBrush +parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/IBrush +--- + +# IBrush interface +{: .no_toc } + +The interface that every brush of the package implements. **Brush** is another name for it. + +A brush decides what a fill method of [**Graphics**](Graphics) puts inside a shape, and what a [**Pen**](Pen) draws with. The package has five kinds of brush, one class each: + +| Class | Fills with | +|:------|:-----------| +| [**SolidBrush**](SolidBrush) | One colour. | +| [**HatchBrush**](HatchBrush) | A pattern of lines or dots in two colours. | +| [**LinearGradientBrush**](LinearGradientBrush) | A colour that changes along a line. | +| [**PathGradientBrush**](PathGradientBrush) | A colour that changes from a centre point to the edge of a path. | +| [**TextureBrush**](TextureBrush) | An image, repeated. | + +Because every class implements **IBrush**, a parameter or a variable declared **As Brush** takes any of them, and the type of an object that came back as a **Brush** can be asked with [**Type**](#type). + +* TOC +{:toc} + +## What the brushes share + +Each brush class is created with `New` or with the function of the same name, for example **New SolidBrush**(*color*) and **SolidBrush**(*color*). The two are one thing and are documented once, under *Creating* on the page of the class. + +Each brush class inherits from **GdiPlusBase**, so it has the **LastResult** property: the last status that GDI+ reported as a failure, or **Ok**. Unless the program sets **GdipErrorHandlingStrategy**, a failure raises no error. + +> [!NOTE] 0.9.45.0 +> **LastResult** keeps the last failure until **ClearResult** is called. A property that returns an object returns **Nothing** while **LastResult** is not **Ok**, even when the failure was an earlier, unrelated call, and **Clone** does the same. + +A brush deletes its GDI+ object when the last reference to the brush is released. + +### Colours + +Every brush that takes colours has two forms: one with **Color** parameters, and one with **Long** parameters, which are the *rgb* forms. The **Color** forms are the ones to use. + +> [!WARNING] 0.9.45.0 +> A **Long** passed to an *rgb* parameter is read as `&H00RRGGBB`: red in the third byte and blue in the first. It is not a VB colour (a `COLORREF`, `&H00BBGGRR`), so `SolidBrush(vbRed)` and `SolidBrush(RGB(255, 0, 0))` paint blue, and the colour constants of VB and the system colours (`vbButtonFace`, `&H8000000F`) are not translated. The alpha byte of the **Long** is dropped, so the result is always opaque. A member of **CColor** passed there binds to the **Long** form and loses its alpha: `SolidBrush(CColor.Transparent)` fills opaque white. Pass `Color(`*alpha*`, `*red*`, `*green*`, `*blue*`)`, or `Color(CColor.Transparent)`, to get the colour that was meant. + +## Members + +### CloneBrush + +Syntax: *copy* **=** *brush*.**CloneBrush**( ) + +Returns a new brush of the same class with the same settings, as an **IBrush**. Changing the copy does not change the original. The class of the copy is the class of the original: a **Brush** variable that holds a **HatchBrush** gives a **HatchBrush** back, and can be assigned to a **HatchBrush** variable. + +Each class has a **Clone** method as well, which returns the copy as the class itself. + +### NativeBrush + +Syntax: *handle* **=** *brush*.**NativeBrush** + +Returns the GDI+ handle of the brush, wrapped in a structure. It is for a program that calls the GDI+ functions directly; the handle belongs to the brush and must not be deleted. + +### Type + +Syntax: *type* **=** *brush*.**Type** + +Returns a [**GpBrushType**](Enumerations/GpBrushType) value for the kind of the brush: **BrushTypeSolidColor**, **BrushTypeHatchFill**, **BrushTypeTextureFill**, **BrushTypePathGradient** or **BrushTypeLinearGradient**. The property is read-only. + +> [!WARNING] 0.9.45.0 +> Reading **Type** of a [**PathGradientBrush**](PathGradientBrush#type) stops a program that runs in the IDE, at an assertion that expects a linear gradient. A compiled program is not affected, and returns **BrushTypePathGradient**. + +## Example + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim brushes(1 To 3) As Brush +Set brushes(1) = New SolidBrush(Color(255, 0, 128, 0)) +Set brushes(2) = New HatchBrush(HatchStyleCross, Color(255, 255, 0, 0), Color(255, 255, 255, 255)) +Set brushes(3) = New LinearGradientBrush(GpPointF(0, 0), GpPointF(10, 0), Color(255, 0, 0, 0), Color(255, 255, 255, 255)) + +Dim i As Long +Dim copy As Brush +For i = 1 To 3 + Set copy = brushes(i).CloneBrush() + Debug.Print brushes(i).Type & " " & copy.Type +Next + +Dim hatch As HatchBrush = brushes(2).CloneBrush() +Debug.Print hatch.HatchStyle = HatchStyleCross +' Output: +' 0 0 +' 1 1 +' 4 4 +' True +``` + +## See Also + +- [Brush](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusbrush/nl-gdiplusbrush-brush) -- Microsoft's documentation of the GDI+ class +- [SolidBrush](SolidBrush) class +- [HatchBrush](HatchBrush) class +- [LinearGradientBrush](LinearGradientBrush) class +- [PathGradientBrush](PathGradientBrush) class +- [TextureBrush](TextureBrush) class +- [Pen](Pen) class +- [GpBrushType](Enumerations/GpBrushType) enumeration diff --git a/docs/Reference/Contributed/GdiPlus/IDeviceContext.md b/docs/Reference/Contributed/GdiPlus/IDeviceContext.md new file mode 100644 index 00000000..282ce10e --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/IDeviceContext.md @@ -0,0 +1,63 @@ +--- +title: IDeviceContext +parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/IDeviceContext +--- + +# IDeviceContext interface +{: .no_toc } + +**IDeviceContext** is the pair of members that hand out a Windows device context for drawing with GDI calls. + +It is implemented by [**Graphics**](Graphics). The device context is a GDI **HDC**: a handle that GDI functions such as **SetPixelV**, **TextOut** or **BitBlt** accept. A program takes it with **GetHdc**, draws with GDI and gives it back with **ReleaseHdc**. Between the two calls the **Graphics** object is locked. Calling any other method of the **Graphics** object fails with **ObjectBusy** until **ReleaseHdc** is called. + +The interface has two members. **Graphics** also has methods of its own with the names **GetHDC** and **ReleaseHDC**; the one that takes the handle as an argument is described on the [**Graphics**](Graphics) page. + +## GetHdc +{: .no_toc } + +Syntax: *object*.**GetHdc** **As LongPtr** + +Returns the device context of the object. The handle is 0 if the call fails. + +## ReleaseHdc +{: .no_toc } + +Syntax: *object*.**ReleaseHdc** + +Gives the device context back, which unlocks the object. It must be called after each successful **GetHdc**, and before the next use of the object. The handle is not passed in: the object remembers the one it gave out. + +The GDI calls draw on the same surface as GDI+. A GDI colour is a **COLORREF**, the value `&H00BBGGRR`, so a call that takes a Visual Basic colour such as `vbRed` draws red. The example uses this declaration: + +```tb hidden slot=module +Declare PtrSafe Function SetPixelV Lib "gdi32" (ByVal hdc As LongPtr, ByVal x As Long, ByVal y As Long, ByVal crColor As Long) As Long +``` + +```tb inert=excerpt +Declare PtrSafe Function SetPixelV Lib "gdi32" (ByVal hdc As LongPtr, ByVal x As Long, ByVal y As Long, ByVal crColor As Long) As Long +``` + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim bmp As Bitmap = Bitmap(8!, 8!) +Dim g As Graphics = Graphics(bmp) +g.Clear Color(255, 255, 255, 255) + +Dim dc As IDeviceContext = g +Dim hdc As LongPtr = dc.GetHdc +SetPixelV hdc, 2, 3, &HFF& ' a COLORREF: red +SetPixelV hdc, 4, 3, &HFF0000 ' a COLORREF: blue +dc.ReleaseHdc + +Dim c As Color = bmp.Pixel(2, 3) +Debug.Print Hex$(c.R) & " " & Hex$(c.G) & " " & Hex$(c.B) ' FF 0 0 +c = bmp.Pixel(4, 3) +Debug.Print Hex$(c.R) & " " & Hex$(c.G) & " " & Hex$(c.B) ' 0 0 FF + +``` + +## See Also + +- [Graphics](Graphics) class +- [ITransformable](ITransformable) interface +- [Graphics::GetHDC](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusgraphics/nf-gdiplusgraphics-graphics-gethdc) -- Microsoft's documentation of the GDI+ method diff --git a/docs/Reference/Contributed/GdiPlus/IImageBytes.md b/docs/Reference/Contributed/GdiPlus/IImageBytes.md new file mode 100644 index 00000000..febbbcaf --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/IImageBytes.md @@ -0,0 +1,72 @@ +--- +title: IImageBytes +parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/IImageBytes +--- + +# IImageBytes interface +{: .no_toc } + +The COM interface through which a stream gives GDI+ direct access to the bytes of an image in memory. + +When GDI+ reads an image from a stream, it asks the stream object whether it also supports **IImageBytes**. A stream that does lets GDI+ lock a range of bytes in place and read them, so that the image does not have to be copied out of the stream first. A stream object that offers the interface can be passed to [**Image**](Image#creating) or [**Bitmap**](Bitmap#creating) as the *stream* argument. The interface ID is returned by **CodecIImageBytes** ([**ImageCodec**](ImageCodec#other-ids)). It mirrors the GDI+ [IImageBytes](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusimaging/nn-gdiplusimaging-iimagebytes) interface and derives from **IUnknown**. + +## Methods + +### CountBytes + +Syntax: *obj*.**CountBytes**( *pcb* ) + +*pcb* +: *required* A **UINT** that receives the total number of bytes in the stream. + +### LockBytes + +Syntax: *obj*.**LockBytes**( *cb*, *ulOffset*, *ppvBytes* ) + +*cb* +: *required* The number of bytes to lock, a **UINT**. + +*ulOffset* +: *required* The offset of the first byte to lock from the start of the stream, a **ULONG**. + +*ppvBytes* +: *required* Receives the address of the first locked byte. + +Locks *cb* bytes, starting at *ulOffset*, and returns the address of the locked memory. The memory must stay valid until the matching call of **UnlockBytes**. + +### UnlockBytes + +Syntax: *obj*.**UnlockBytes**( *pvBytes*, *cb*, *ulOffset* ) + +*pvBytes* +: *required* The address that **LockBytes** returned. + +*cb* +: *required* The number of bytes locked, a **UINT**. + +*ulOffset* +: *required* The offset that was locked, a **ULONG**. + +Releases the range that **LockBytes** locked. + +## Example + +The interface ID is what GDI+ asks a stream for. A program that implements the interface in a class compares the requested ID with this one. + +```tb check_build check_run +Dim wanted As GDIP_UUID = CodecIImageBytes() +Debug.Print Hex$(wanted.Data1) +Dim bytes As IImageBytes +Debug.Print bytes Is Nothing +' Output: +' 25D1823 +' True +``` + +## See Also + +- [IImageBytes](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusimaging/nn-gdiplusimaging-iimagebytes) -- Microsoft's documentation of the interface +- [Image](Image) class +- [Bitmap](Bitmap) class +- [ImageCodec](ImageCodec) -- the interface ID diff --git a/docs/Reference/Contributed/GdiPlus/ITransformable.md b/docs/Reference/Contributed/GdiPlus/ITransformable.md new file mode 100644 index 00000000..7ab3696f --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/ITransformable.md @@ -0,0 +1,127 @@ +--- +title: ITransformable +parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/ITransformable +--- + +# ITransformable interface +{: .no_toc } + +**ITransformable** is the set of members that classes with a changeable transformation matrix share. + +It is implemented by [**Matrix**](Matrix), [**Graphics**](Graphics) (its world transformation), [**LinearGradientBrush**](LinearGradientBrush), [**PathGradientBrush**](PathGradientBrush) and [**TextureBrush**](TextureBrush). Code that only needs to move, scale, rotate or shear such an object can take an **ITransformable** and work with any of them. The classes also have these members under their own names; on **Matrix** they are shorter ([**Translate**](Matrix#translate) for **TranslateTransform**, and so on). + +Every method combines a new transformation with the one the object already has. The *order* argument is a [**GpMatrixOrder**](Enumerations/GpMatrixOrder): with **MatrixOrderPrepend**, the default, the new transformation is applied to a point before the existing ones, and with **MatrixOrderAppend** after them. See [**Matrix**](Matrix) for the arithmetic. + +Every method returns a [**GpStatus**](Enumerations/GpStatus), which is **Ok** when the call worked. + +An object is used through the interface by assigning it to a variable of the interface type: + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim bmp As Bitmap = Bitmap(10!, 10!) +Dim g As Graphics = Graphics(bmp) +Dim m As Matrix = Matrix() + +Dim t As ITransformable = m +t.TranslateTransform 5, 6 +t.ScaleTransform 2, 2 +Debug.Print m.OffsetX & " " & m.OffsetY ' 5 6 + +Set t = g +t.TranslateTransform 7, 8 +Dim w As Matrix = Matrix() +t.GetTransform w +Debug.Print w.OffsetX & " " & w.OffsetY ' 7 8 +``` + +## Transform +{: .no_toc } + +Syntax: *object*.**Transform** **=** *matrix* + +Replaces the whole transformation. Assigning copies the elements of *matrix* into the object, so a later change of *matrix* does not change the object. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim m As Matrix = Matrix() +Dim t As ITransformable = m +t.Transform = Matrix(3, 0, 0, 3, 0, 0) +Dim e() As Single = m.Elements +Debug.Print e(1) & " " & e(4) ' 3 3 +``` + +> [!NOTE] 0.9.45.0 +> Reading **Transform** does not work on any of the classes that implement the interface. The getter returns **Nothing** and records **InvalidParameter** in **LastResult**. Read the transformation with [**GetTransform**](#gettransform). + +## GetTransform +{: .no_toc } + +Syntax: *object*.**GetTransform(** *outMatrix* **)** **As GpStatus** + +*outMatrix* +: *required* An existing **Matrix** that receives a copy of the transformation. + +## ResetTransform +{: .no_toc } + +Syntax: *object*.**ResetTransform** **As GpStatus** + +Sets the transformation to the identity: no change to any point. + +## MultiplyTransform +{: .no_toc } + +Syntax: *object*.**MultiplyTransform(** *matrix*, [ *order* ] **)** **As GpStatus** + +Combines *matrix* with the transformation of the object. On a **Matrix** this is [**Multiply**](Matrix#multiply). + +## TranslateTransform +{: .no_toc } + +Syntax: *object*.**TranslateTransform(** *dx*, *dy*, [ *order* ] **)** **As GpStatus** + +Syntax: *object*.**TranslateTransform(** *delta*, [ *order* ] **)** **As GpStatus** + +*dx*, *dy* +: *required* **Single** distances to move by along each axis. + +*delta* +: *required* A [**GpPointF**](Types/GpPointF) that holds the two distances. + +On a **Matrix** this is [**Translate**](Matrix#translate). + +## ScaleTransform +{: .no_toc } + +Syntax: *object*.**ScaleTransform(** *sx*, *sy*, [ *order* ] **)** **As GpStatus** + +Scales the horizontal axis by *sx* and the vertical axis by *sy*. On a **Matrix** this is [**Scale**](Matrix#scale). + +## RotateTransform +{: .no_toc } + +Syntax: *object*.**RotateTransform(** *angle*, [ *order* ] **)** **As GpStatus** + +Rotates by *angle* degrees about the origin. A positive angle turns clockwise where the y axis points down. On a **Matrix** this is [**Rotate**](Matrix#rotate). + +## RotateTransformAt +{: .no_toc } + +Syntax: *object*.**RotateTransformAt(** *angle*, *center*, [ *order* ] **)** **As GpStatus** + +Rotates by *angle* degrees about *center*, a [**GpPointF**](Types/GpPointF) that stays where it is. On a **Matrix** this is [**RotateAt**](Matrix#rotateat). + +## ShearTransform +{: .no_toc } + +Syntax: *object*.**ShearTransform(** *shearX*, *shearY*, [ *order* ] **)** **As GpStatus** + +Shears the axes. On a **Matrix** this is [**Shear**](Matrix#shear). + +## See Also + +- [Matrix](Matrix) class +- [Graphics](Graphics) class +- [GpMatrixOrder](Enumerations/GpMatrixOrder) enumeration +- [IDeviceContext](IDeviceContext) interface -- the other interface that **Graphics** implements diff --git a/docs/Reference/Contributed/GdiPlus/Image.md b/docs/Reference/Contributed/GdiPlus/Image.md new file mode 100644 index 00000000..1e935d1d --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Image.md @@ -0,0 +1,479 @@ +--- +title: Image +parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Image +--- + +# Image class +{: .no_toc } + +The base class of [**Bitmap**](Bitmap) and [**Metafile**](Metafile): a picture loaded from a file or a stream, with its size, resolution, pixel format and properties. + +An **Image** holds either raster data or a recorded sequence of drawing commands. [**Bitmap**](Bitmap) and [**Metafile**](Metafile) inherit every member described here and add the members that work on one kind of picture. A program creates an **Image** directly to load a file whose kind it does not know, and uses [**Type**](#type) to find out which kind it got. The class mirrors the GDI+ [Image](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusheaders/nl-gdiplusheaders-image) class. + +* TOC +{:toc} + +> [!NOTE] 0.9.45.0 +> A project that references the **VB** package (every default project does) also has a VB control class named **Image**. A bare `Image` in a declaration means the VB class, so write `GdiPlus.Image` for the class and for the function that creates it, as the samples on this page do. [**Bitmap**](Bitmap) and [**Metafile**](Metafile) have no such clash. + +```tb check_build hidden +Module ImagePageSaver + Private Declare PtrSafe Function ZFromHBitmap Lib "gdiplus" Alias "GdipCreateBitmapFromHBITMAP" (ByVal hbm As LongPtr, ByVal hpal As LongPtr, nb As LongPtr) As Long + Private Declare PtrSafe Function ZSaveImage Lib "gdiplus" Alias "GdipSaveImageToFile" (ByVal img As LongPtr, ByVal path As LongPtr, clsid As GDIP_UUID, ByVal ep As LongPtr) As Long + Private Declare PtrSafe Function ZDispose Lib "gdiplus" Alias "GdipDisposeImage" (ByVal img As LongPtr) As Long + Private Declare PtrSafe Function DeleteObject Lib "gdi32" (ByVal h As LongPtr) As Long + Private Declare PtrSafe Function CreateDirectoryW Lib "kernel32" (ByVal path As LongPtr, ByVal sa As LongPtr) As Long + + Public Sub MakeDir(ByVal p As String) + CreateDirectoryW StrPtr(p), 0 + End Sub + + Public Function SavePng(bmp As Bitmap, ByVal path As String) As Long + Dim hbm As LongPtr, nb As LongPtr + bmp.GetHBitmap Color(255, 255, 255, 255), hbm + Dim st As Long = ZFromHBitmap(hbm, 0, nb) + If st = 0 Then + Dim clsid As GDIP_UUID = ImageCodecPNG() + st = ZSaveImage(nb, StrPtr(path), clsid, 0) + ZDispose nb + End If + DeleteObject hbm + Return st + End Function +End Module +``` + +## Creating + +Syntax: *img* **= GdiPlus.Image**( *filename* [ , *useEmbeddedColorManagement* ] ) + +Syntax: *img* **= New GdiPlus.Image**( *filename* [ , *useEmbeddedColorManagement* ] ) + +Syntax: *img* **= GdiPlus.Image**( *stream* [ , *useEmbeddedColorManagement* ] ) + +Syntax: *img* **= GdiPlus.FromFile**( *filename* [ , *useEmbeddedColorManagement* ] ) + +*filename* +: *required* A **String** naming an image file. GDI+ decodes the formats that [**ImageCodec**](ImageCodec) lists, and metafiles. The file stays open until the **Image** is released. + +*stream* +: *required* An **IStream** to read the picture from. + +*useEmbeddedColorManagement* +: *optional* A **Boolean**. **True** applies the colour profile stored in the file. The default is **False**. + +The three forms with the same name are one thing: the function creates the object with the same arguments as **New**. **FromFile** is another name for the function. A constructor that fails creates an unusable object whose **LastResult** tells why. Loading a missing file gives **OutOfMemory**, which is how GDI+ reports a file it cannot open. + +An **Image** that holds a bitmap is not a [**Bitmap**](Bitmap): it has no pixel access. To read or change pixels, load the file with [**Bitmap**](Bitmap#creating) instead. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim bmp As Bitmap = Bitmap(16!, 8!) +Dim g As Graphics = Graphics(bmp) +g.Clear(Color(255, 200, 100, 50)) + +Dim dir As String = Environ$("TEMP") & "\tbdocs-gdiplus-image" +ImagePageSaver.MakeDir dir +Dim path As String = dir & "\sample.png" +Debug.Print ImagePageSaver.SavePng(bmp, path) + +Dim img As GdiPlus.Image = GdiPlus.Image(path) +Debug.Print img.LastResult & " " & img.Width & " " & img.Height & " " & img.Type + +Dim missing As GdiPlus.Image = GdiPlus.Image(dir & "\no-such-file.png") +Debug.Print missing.LastResult +' Output: +' 0 +' 0 16 8 1 +' 3 +``` + +### Clone + +Syntax: *copy* **=** *img*.**Clone**( ) + +Returns a new **Image** that holds a copy of the picture. The copy is an **Image**, even when the original is a [**Bitmap**](Bitmap) or a [**Metafile**](Metafile). + +> [!NOTE] 0.9.45.0 +> [**Bitmap**](Bitmap#clone) and [**Metafile**](Metafile) declare their own **Clone**, and on a **Bitmap** the no-argument form is not available: the call does not compile. To copy a whole **Bitmap**, use [**Bitmap.Clone**](Bitmap#clone) with the full rectangle. + +## Saving + +Save writes the picture to a file or a stream with one of the encoders listed by [**ImageCodec**](ImageCodec). *clsidEncoder* is the class ID of the encoder: [**ImageCodecPNG**](ImageCodec#image-codec-ids), **ImageCodecJPG** and the others are functions that return it. + +### Save + +Syntax: *status* **=** *img*.**Save**( *filename*, *clsidEncoder*, *encoderParams*( ) ) + +Syntax: *status* **=** *img*.**Save**( *stream*, *clsidEncoder*, *encoderParams*( ) ) + +*filename* +: *required* A **String** naming the file to write. An existing file is replaced. + +*stream* +: *required* An **IStream** to write to. + +*clsidEncoder* +: *required* The class ID of the encoder, which also selects the file format. + +*encoderParams* +: *required* An array of [**GpEncoderParameter**](Types/GpEncoderParameter). The call expects its lower bound to be 0, and element 0 to be a dummy that is not filled in; the parameters follow from element 1. Any other lower bound returns **InvalidParameter**. + +> [!WARNING] 0.9.45.0 +> **Save** does not work with an encoder parameter array. The call stores the parameter count in memory that lies before the array, and gives GDI+ a pointer to that place, so GDI+ reads its parameters from memory the array does not own. With `Dim ep(0 To 0) As GpEncoderParameter` the call returns **InvalidParameter** and leaves an empty file. With a longer array it returns **Ok** in 64-bit programs while GDI+ ignores the parameters (a JPEG saved with a quality of 10 has the same size as one saved with 100), and in 32-bit programs it raises an access violation or does not return. **SaveAdd** and **SaveAddImage** build their argument in the same way. [**Bitmap**](Bitmap#saving) shows how to write a PNG without calling **Save**. + +### SaveAdd + +Syntax: *status* **=** *img*.**SaveAdd**( *encoderParams*( ) ) + +Syntax: *status* **=** *img*.**SaveAddImage**( *newImage*, *encoderParams*( ) ) + +Adds a frame to a file that an earlier **Save** started with the `EncoderSaveFlag` parameter set to multi-frame. **SaveAdd** adds the frame of the picture itself; **SaveAddImage** adds the frame of *newImage*, an **Image**. Both take *encoderParams* as **Save** does, and are subject to the same warning. + +## Size and format + +### Type + +Syntax: *t* **=** *img*.**Type** + +Returns a [**GpImageType**](Enumerations/GpImageType): **ImageTypeBitmap** for raster data and **ImageTypeMetafile** for a recording. The property is read-only. + +### Width, Height, Size + +Syntax: *w* **=** *img*.**Width** + +Syntax: *h* **=** *img*.**Height** + +Syntax: *s* **=** *img*.**Size** + +**Width** and **Height** return the size in pixels as a **Long**. **Size** returns both in a [**GpSize**](Types/GpSize). For a metafile the numbers are the size of the bounds in device units. + +### Dimension + +Syntax: *d* **=** *img*.**Dimension** + +Returns the width and height as a [**GpSizeF**](Types/GpSizeF) in the unit of the picture, which for a bitmap is the pixel and for a metafile depends on its frame. + +### Bounds + +Syntax: *r* **=** *img*.**Bounds**( *srcUnit* ) + +*srcUnit* +: *required* A [**GpUnit**](Enumerations/GpUnit) giving the unit of the returned rectangle. + +Returns a [**GpRectF**](Types/GpRectF) whose upper left corner is (0, 0) for a bitmap and whose size is the size of the picture in *srcUnit*. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim bmp As Bitmap = Bitmap(8!, 6!) +Debug.Print bmp.Type & " " & bmp.Width & " " & bmp.Height +Debug.Print bmp.Size.Width & " " & bmp.Size.Height +Debug.Print bmp.Dimension.Width & " " & bmp.Dimension.Height + +Dim b As GpRectF = bmp.Bounds(UnitPixel) +Debug.Print b.X & " " & b.Y & " " & b.Width & " " & b.Height +' Output: +' 1 8 6 +' 8 6 +' 8 6 +' 0 0 8 6 +``` + +### HorizontalResolution, VerticalResolution + +Syntax: *dpi* **=** *img*.**HorizontalResolution** + +Syntax: *dpi* **=** *img*.**VerticalResolution** + +Return the resolution in dots per inch as a **Single**. A new bitmap takes the resolution of the screen, so the number differs between machines. Set it with [**Bitmap.SetResolution**](Bitmap#setresolution). + +### PixelFormat + +Syntax: *fmt* **=** *img*.**PixelFormat** + +Returns the [**PixelFormat**](Enumerations/PixelFormat) of the picture. A bitmap created without a format has **PixelFormat32bppARGB**. + +### Flags + +Syntax: *flags* **=** *img*.**Flags** + +Returns a combination of [**ImageFlags**](Enumerations/ImageFlags) values as a **Long**: whether the picture scales, has alpha or translucent pixels, its colour space and whether its resolution and size come from the file. + +### RawFormat + +Syntax: *id* **=** *img*.**RawFormat** + +Returns the class ID of the file format the picture was loaded from, as a **UUID**. Compare it with the values that the [format functions](ImageCodec#image-format-ids) return, such as **ImageFormatPNG**. A picture created in memory has **ImageFormatMemoryBMP**. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim bmp As Bitmap = Bitmap(4!, 4!) +Debug.Print Hex$(bmp.PixelFormat) +Debug.Print Hex$(bmp.Flags) +Debug.Print bmp.RawFormat.Data1 = ImageFormatMemoryBMP().Data1 +' Output: +' 26200A +' 2 +' True +``` + +## Palette + +### PaletteSize + +Syntax: *n* **=** *img*.**PaletteSize** + +Returns the size in bytes of the colour palette of the picture, which is 0 or a small header for a picture without a palette and 1032 for a bitmap in the **PixelFormat8bppIndexed** format. + +### Palette + +Syntax: *pal* **=** *img*.**Palette** + +Syntax: *img*.**Palette** **=** *pal* + +The getter is meant to return the palette as an array of [**ColorPalette**](Types/ColorPalette), and the setter to take one. + +> [!WARNING] 0.9.45.0 +> Reading **Palette** overflows the stack, in 32-bit and 64-bit programs, and the process stops. The setter calls the GDI+ function that reads a palette, not the one that writes it, and so does not change the picture. To get a palette, use [**ImageAttributes.GetAdjustedPalette**](ImageAttributes#getadjustedpalette) or fill a [**ColorPalette**](Types/ColorPalette) yourself, and give it to [**Bitmap.ConvertFormat**](Bitmap#convertformat). + +## Thumbnails + +### GetThumbnail + +Syntax: *thumb* **=** *img*.**GetThumbnail**( *thumbSize* [ , *callback* [ , *callbackData* ] ] ) + +Syntax: *thumb* **=** *img*.**GetThumbnail**( *thumbWidth*, *thumbHeight* [ , *callback* [ , *callbackData* ] ] ) + +*thumbSize* +: *required* A [**GpSize**](Types/GpSize) with the size of the thumbnail in pixels. + +*thumbWidth*, *thumbHeight* +: *required* **Long** values for the same size. + +*callback* +: *optional* A callback that GDI+ can call to ask whether it should stop. Omit it. + +*callbackData* +: *optional* A pointer passed to *callback*. The default is 0. + +Returns a new **Image** of the requested size, or **Nothing** when the call fails. The thumbnail is the embedded one when the file has one, and a scaled copy of the picture otherwise. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim bmp As Bitmap = Bitmap(40!, 20!) +Dim thumb As GdiPlus.Image = bmp.GetThumbnail(10, 5) +Debug.Print bmp.LastResult & " " & thumb.Width & " " & thumb.Height +' Output: +' 0 10 5 +``` + +## Frames + +An image file can hold several frames, such as the pages of a TIFF or the pictures of an animated GIF. Frames are grouped in dimensions; the identifiers are the functions [**FrameDimensionTime**, **FrameDimensionPage** and **FrameDimensionResolution**](ImageCodec#frame-dimension-ids). + +### FrameDimensionsCount + +Syntax: *n* **=** *img*.**FrameDimensionsCount** + +Returns the number of frame dimensions the picture has. A bitmap created in memory has one: the page dimension. + +### GetFrameDimensionsList + +Syntax: *ids* **=** *img*.**GetFrameDimensionsList**( ) + +Returns the class IDs of the frame dimensions as an array of **UUID** that starts at 1. + +### FrameCount + +Syntax: *n* **=** *img*.**FrameCount**( *dimensionID* ) + +*dimensionID* +: *required* The class ID of a frame dimension, such as **FrameDimensionPage**( ). + +Returns the number of frames in that dimension. + +### SelectActiveFrame + +Syntax: *status* **=** *img*.**SelectActiveFrame**( *dimensionID*, *frameIndex* ) + +*dimensionID* +: *required* The class ID of a frame dimension. + +*frameIndex* +: *required* The index of the frame to select, counted from 0. + +Makes the frame the one that drawing and the size properties use. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim bmp As Bitmap = Bitmap(4!, 4!) +Debug.Print bmp.FrameDimensionsCount +Debug.Print bmp.FrameCount(FrameDimensionPage()) +Debug.Print bmp.GetFrameDimensionsList()(1).Data1 = FrameDimensionPage().Data1 +Debug.Print bmp.SelectActiveFrame(FrameDimensionPage(), 0) +' Output: +' 1 +' 1 +' True +' 0 +``` + +### RotateFlip + +Syntax: *status* **=** *img*.**RotateFlip**( *rotateFlipType* ) + +*rotateFlipType* +: *required* A [**RotateFlipType**](Enumerations/RotateFlipType) giving a rotation, a flip, or both. The picture is rotated first. + +Rotates and flips the picture in place. A rotation is clockwise. After a rotation by 90 or 270 degrees the width and height are exchanged. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim bmp As Bitmap = Bitmap(4!, 3!) +bmp.Pixel(0, 0) = Color(255, 255, 0, 0) ' upper left corner +bmp.RotateFlip Rotate90FlipNone +Debug.Print bmp.Width & " " & bmp.Height +Debug.Print Hex$(bmp.Pixel(2, 0).argb) ' the red pixel is now at the upper right +bmp.RotateFlip Rotate270FlipNone +bmp.RotateFlip RotateNoneFlipX +Debug.Print Hex$(bmp.Pixel(3, 0).argb) ' flipped across the vertical axis +' Output: +' 3 4 +' FFFF0000 +' FFFF0000 +``` + +## Properties of a file + +An image file can hold named properties: the camera model of a photograph, the time it was taken, the delay of a GIF frame. Each has a numeric ID, and the [`PropertyTag...` constants](Helpers#property-tag-ids) of the package name the IDs of the common ones. A property is a [**GpPropertyItem**](Types/GpPropertyItem). + +### PropertyCount + +Syntax: *n* **=** *img*.**PropertyCount** + +Returns the number of properties the picture has. + +### PropertyIdList + +Syntax: *ids* **=** *img*.**PropertyIdList** + +Returns the IDs of the properties as an array of **Long** that starts at 1. + +### PropertyItem + +Syntax: *items* **=** *img*.**PropertyItem**( *propId* ) + +Syntax: *img*.**PropertyItem** **=** *item* + +The getter returns the property with the ID *propId* as an array of [**GpPropertyItem**](Types/GpPropertyItem) that holds one element, at index 1. The setter takes one **GpPropertyItem** and sets that property on the picture, adding it when it is not there. Its [**Id**](Types/GpPropertyItem), type, length and the address of its value must be filled in. + +> [!WARNING] 0.9.45.0 +> Reading an element of the array that **PropertyItem** returns stops the process with an access violation, because the array is built in a way that the element access cannot use. Only `UBound` and `LBound` of the array work. **GetAllPropertyItems** returns its array in the same way and has the same defect. The setter, **PropertyCount**, **PropertyIdList** and **RemovePropertyItem** work. + +### RemovePropertyItem + +Syntax: *status* **=** *img*.**RemovePropertyItem**( *propId* ) + +Removes the property with that ID. + +### GetAllPropertyItems + +Syntax: *items* **=** *img*.**GetAllPropertyItems**( ) + +Returns all properties as an array of [**GpPropertyItem**](Types/GpPropertyItem). See the warning under **PropertyItem**. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim bmp As Bitmap = Bitmap(4!, 4!) +Dim text() As Byte = StrConv("A test picture" & vbNullChar, vbFromUnicode) + +Dim item As GpPropertyItem +item.Id = PropertyTagImageDescription +item._type = PropertyTagTypeASCII +item._length = UBound(text) + 1 +item._address = VarPtr(text(0)) +bmp.PropertyItem = item +Debug.Print bmp.LastResult & " " & bmp.PropertyCount +Debug.Print Hex$(bmp.PropertyIdList()(1)) + +Debug.Print bmp.RemovePropertyItem(PropertyTagImageDescription) +Debug.Print bmp.PropertyCount +' Output: +' 0 1 +' 10E +' 0 +' 0 +``` + +### GetEncoderParameterList + +Syntax: *params* **=** *img*.**GetEncoderParameterList**( *clsidEncoder* ) + +Returns the parameters that the encoder with the class ID *clsidEncoder* accepts for this picture, as an array of [**GpEncoderParameter**](Types/GpEncoderParameter). + +> [!WARNING] 0.9.45.0 +> **GetEncoderParameterList** stops the process with an access violation in 32-bit and 64-bit programs. The call hands GDI+ the address of a temporary variable in place of the buffer, so GDI+ overwrites the stack. + +## Items of image data + +Some formats store data beside the pixels. **FindFirstItem**, **FindNextItem** and **GetItemData** enumerate and read it, with a [**GpImageItemData**](Types/GpImageItemData) in an array of one element. These members need GDI+ 1.1 and Windows 7 or later, and only the codecs that provide such data return any. The array is built as for **PropertyItem**, so its element cannot be read. + +### FindFirstItem + +Syntax: *item* **=** *img*.**FindFirstItem**( ) + +### FindNextItem + +Syntax: *item* **=** *img*.**FindNextItem**( ) + +### GetItemData + +Syntax: *status* **=** *img*.**GetItemData**( *item*( ) ) + +**FindFirstItem** and **FindNextItem** return the first and the following item as an array of one [**GpImageItemData**](Types/GpImageItemData). **GetItemData** reads the data of the item in the array that is passed to it. + +### SetAbort + +Syntax: *status* **=** *img*.**SetAbort**( *pIAbort* ) + +GDI+ declares this function, but does not implement it in versions 1.0 and 1.1: it does nothing useful. The argument is a **GdiPlusAbort** object. + +## Example + +The example makes a small picture, rotates and flips it, and reads the results back. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim bmp As Bitmap = Bitmap(6!, 2!) +Dim g As Graphics = Graphics(bmp) +g.Clear(Color(255, 255, 255, 255)) +bmp.Pixel(0, 0) = Color(255, 0, 0, 255) + +Dim copy As GdiPlus.Image = bmp +Debug.Print copy.Width & "x" & copy.Height & " " & copy.Type + +bmp.RotateFlip Rotate180FlipNone +Debug.Print Hex$(bmp.Pixel(5, 1).argb) +' Output: +' 6x2 1 +' FF0000FF +``` + +## See Also + +- [Image](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusheaders/nl-gdiplusheaders-image) -- Microsoft's documentation of the GDI+ class +- [Bitmap](Bitmap) class +- [Metafile](Metafile) class +- [ImageAttributes](ImageAttributes) class +- [ImageCodec](ImageCodec) -- encoders, decoders and the identifiers they use +- [GpPropertyItem](Types/GpPropertyItem) type +- [GpEncoderParameter](Types/GpEncoderParameter) type diff --git a/docs/Reference/Contributed/GdiPlus/ImageAttributes.md b/docs/Reference/Contributed/GdiPlus/ImageAttributes.md new file mode 100644 index 00000000..5bc34bd4 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/ImageAttributes.md @@ -0,0 +1,462 @@ +--- +title: ImageAttributes +parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/ImageAttributes +--- + +# ImageAttributes class +{: .no_toc } + +The colour adjustments that GDI+ applies to an image while it draws it: a colour matrix, gamma, a threshold, colour keys, remapped colours and the way the image wraps at its edges. + +An **ImageAttributes** is handed to [**Graphics.DrawImage**](Graphics#drawimage) (the overloads that take an *imageAttributes* argument) and to [**TextureBrush**](TextureBrush). It never changes the image: the adjustment happens on the way to the destination. The class mirrors the GDI+ [ImageAttributes](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusimageattributes/nl-gdiplusimageattributes-imageattributes) class. + +* TOC +{:toc} + +## Creating + +Syntax: *attrs* **= ImageAttributes**( ) + +Syntax: *attrs* **= New ImageAttributes**( ) + +Creates an object with no adjustments. + +### Clone + +Syntax: *copy* **=** *attrs*.**Clone**( ) + +Returns a new **ImageAttributes** with the same adjustments. Changing the copy does not change the original. + +## Adjustment categories + +Most members take a *type* argument, a [**ColorAdjustType**](Enumerations/ColorAdjustType) that defaults to **ColorAdjustTypeDefault**. An **ImageAttributes** keeps separate settings for bitmaps, brushes, pens and text. A category that has none of its own uses the default settings. As soon as any setting is made for a category, that category starts from nothing and uses only its own settings, not the default ones. + +### Reset + +Syntax: *status* **=** *attrs*.**Reset**( [ *type* ] ) + +Removes every adjustment of the category, so that it uses the default settings again. + +### SetToIdentity + +Syntax: *status* **=** *attrs*.**SetToIdentity**( [ *type* ] ) + +Gives the category no adjustments at all, whatever the default settings are. Unlike **Reset**, it also blocks the default settings. + +The examples on this page draw a one-pixel image through an **ImageAttributes** onto a one-pixel bitmap and read the result. The image is the colour 200, 100, 50. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim src As Bitmap = Bitmap(1!, 1!) +src.Pixel(0, 0) = Color(255, 200, 100, 50) +Dim dst As Bitmap = Bitmap(1!, 1!) +Dim g As Graphics = Graphics(dst) + +Dim attrs As ImageAttributes = ImageAttributes() +attrs.SetGamma 2!, ColorAdjustTypeBitmap +g.DrawImage src, GpRect(0, 0, 1, 1), GpRect(0, 0, 1, 1), UnitPixel, attrs +Debug.Print Hex$(dst.Pixel(0, 0).argb) + +attrs.SetToIdentity ColorAdjustTypeBitmap +g.DrawImage src, GpRect(0, 0, 1, 1), GpRect(0, 0, 1, 1), UnitPixel, attrs +Debug.Print Hex$(dst.Pixel(0, 0).argb) + +attrs.Reset ColorAdjustTypeBitmap +Debug.Print attrs.SetGamma(2!) ' default settings +g.DrawImage src, GpRect(0, 0, 1, 1), GpRect(0, 0, 1, 1), UnitPixel, attrs +Debug.Print Hex$(dst.Pixel(0, 0).argb) +' Output: +' FF9D270A +' FFC86432 +' 0 +' FF9D270A +``` + +## Colour matrix + +A colour matrix changes the colour of every pixel with a linear transformation: the new red, green, blue and alpha values are sums of multiples of the old ones, plus a constant. The matrix is a [**ColorMatrix**](Types/ColorMatrix), a 5 by 5 array of **Single** values. The colour values in the calculation run from 0 to 1. + +In the `m(i, j)` array of the package, the first index *i* picks the output component and the second index *j* the input component. The indexes 0 to 3 stand for red, green, blue and alpha. The input index 4 is the constant 1, so `m(i, 4)` adds a constant to the component *i*. `m(2, 0) = 1` adds the red of the input to the blue of the output. A variable declared **As ColorMatrix** is all zeros, and a matrix of zeros makes every colour black, so a program starts from the identity matrix, which has 1 in `m(i, i)`. + +> [!NOTE] 0.9.45.0 +> The C++ matrix has its indexes the other way round, `M[input][output]`, so `M[0][2]` of C++ is `m(2, 0)` here. The package swaps the indexes to match the memory layout. + +### SetColorMatrix + +Syntax: *status* **=** *attrs*.**SetColorMatrix**( *colorMatrix* [ , *mode* [ , *type* ] ] ) + +*colorMatrix* +: *required* A [**ColorMatrix**](Types/ColorMatrix). + +*mode* +: *optional* A [**ColorMatrixFlags**](Enumerations/ColorMatrixFlags) value. The default is **ColorMatrixFlagsDefault**: the matrix applies to every colour. + +*type* +: *optional* A [**ColorAdjustType**](Enumerations/ColorAdjustType). + +### ClearColorMatrix + +Syntax: *status* **=** *attrs*.**ClearColorMatrix**( [ *type* ] ) + +Removes the colour matrix of the category. + +### SetColorMatrices + +Syntax: *status* **=** *attrs*.**SetColorMatrices**( *colorMatrix*, *grayMatrix* [ , *mode* [ , *type* ] ] ) + +Sets two matrices: *colorMatrix* for colours and *grayMatrix* for shades of gray, so that grays can be adjusted differently. The *mode* chooses what the gray matrix applies to: with **ColorMatrixFlagsSkipGrays**, grays are not adjusted at all; with **ColorMatrixFlagsAltGray**, the gray matrix is used for the grays and the colour matrix for the rest. + +### ClearColorMatrices + +Syntax: *status* **=** *attrs*.**ClearColorMatrices**( [ *type* ] ) + +Removes both matrices of the category. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim src As Bitmap = Bitmap(1!, 1!) +src.Pixel(0, 0) = Color(255, 200, 100, 50) +Dim dst As Bitmap = Bitmap(1!, 1!) +Dim g As Graphics = Graphics(dst) + +Dim cm As ColorMatrix +Dim i As Long +For i = 0 To 4 + cm.m(i, i) = 1 ' the identity +Next +cm.m(2, 0) = 1 ' blue += red + +Dim attrs As ImageAttributes = ImageAttributes() +Debug.Print attrs.SetColorMatrix(cm) +g.DrawImage src, GpRect(0, 0, 1, 1), GpRect(0, 0, 1, 1), UnitPixel, attrs +Debug.Print Hex$(dst.Pixel(0, 0).argb) + +cm.m(2, 0) = 0 +cm.m(1, 4) = 0.1! ' green += 0.1 of the range +attrs.SetColorMatrix cm +g.DrawImage src, GpRect(0, 0, 1, 1), GpRect(0, 0, 1, 1), UnitPixel, attrs +Debug.Print Hex$(dst.Pixel(0, 0).argb) + +attrs.ClearColorMatrix +g.DrawImage src, GpRect(0, 0, 1, 1), GpRect(0, 0, 1, 1), UnitPixel, attrs +Debug.Print Hex$(dst.Pixel(0, 0).argb) +' Output: +' 0 +' FFC864FA +' FFC87E32 +' FFC86432 +``` + +## Gamma, threshold and no-op + +### SetGamma + +Syntax: *status* **=** *attrs*.**SetGamma**( *gamma* [ , *type* ] ) + +*gamma* +: *required* A **Single**. Each colour value `v` from 0 to 1 becomes `v ^ gamma`, so a value above 1 darkens and a value below 1 lightens. + +### ClearGamma + +Syntax: *status* **=** *attrs*.**ClearGamma**( [ *type* ] ) + +Removes the gamma setting of the category. + +### SetThreshold + +Syntax: *status* **=** *attrs*.**SetThreshold**( *threshold* [ , *type* ] ) + +*threshold* +: *required* A **Single** from 0 to 1. Each colour value at or above it becomes 255, and each below it becomes 0. + +### ClearThreshold + +Syntax: *status* **=** *attrs*.**ClearThreshold**( [ *type* ] ) + +Removes the threshold of the category. + +### SetNoOp + +Syntax: *status* **=** *attrs*.**SetNoOp**( [ *type* ] ) + +Turns off all adjustment of the category, whatever else is set for it, until **ClearNoOp**. + +### ClearNoOp + +Syntax: *status* **=** *attrs*.**ClearNoOp**( [ *type* ] ) + +Ends the effect of **SetNoOp**. The other settings of the category apply again. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim src As Bitmap = Bitmap(1!, 1!) +src.Pixel(0, 0) = Color(255, 200, 100, 50) +Dim dst As Bitmap = Bitmap(1!, 1!) +Dim g As Graphics = Graphics(dst) +Dim attrs As ImageAttributes = ImageAttributes() + +attrs.SetThreshold 0.5! +g.DrawImage src, GpRect(0, 0, 1, 1), GpRect(0, 0, 1, 1), UnitPixel, attrs +Debug.Print Hex$(dst.Pixel(0, 0).argb) +attrs.ClearThreshold + +attrs.SetGamma 2! +attrs.SetNoOp +g.DrawImage src, GpRect(0, 0, 1, 1), GpRect(0, 0, 1, 1), UnitPixel, attrs +Debug.Print Hex$(dst.Pixel(0, 0).argb) + +attrs.ClearNoOp +g.DrawImage src, GpRect(0, 0, 1, 1), GpRect(0, 0, 1, 1), UnitPixel, attrs +Debug.Print Hex$(dst.Pixel(0, 0).argb) +' Output: +' FFFF0000 +' FFC86432 +' FF9D270A +``` + +## Colour keys + +### SetColorKey + +Syntax: *status* **=** *attrs*.**SetColorKey**( *colorLow*, *colorHigh* [ , *type* ] ) + +Syntax: *status* **=** *attrs*.**SetColorKey**( *rgbLow*, *rgbHigh* [ , *type* ] ) + +*colorLow*, *colorHigh* +: *required* [**Color**](Types/Color) values: the corners of a range of colours. + +*rgbLow*, *rgbHigh* +: *required* **Long** values for the same, as `&H00RRGGBB`. + +Makes the pixels whose colour lies in the range (every channel at or above *colorLow* and at or below *colorHigh*) transparent. Use the same colour twice to key out one colour. + +> [!WARNING] 0.9.45.0 +> The **Long** form reads its arguments as `&H00RRGGBB`, not as a VB colour. `SetColorKey RGB(200, 100, 50), RGB(200, 100, 50)` keys out a different colour, as red and blue are exchanged. Use the **Color** form, or write the value as `&HRRGGBB`. + +### ClearColorKey + +Syntax: *status* **=** *attrs*.**ClearColorKey**( [ *type* ] ) + +Removes the colour key of the category. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim src As Bitmap = Bitmap(2!, 1!) +src.Pixel(0, 0) = Color(255, 200, 100, 50) +src.Pixel(1, 0) = Color(255, 10, 250, 130) +Dim dst As Bitmap = Bitmap(2!, 1!) +Dim g As Graphics = Graphics(dst) +Dim attrs As ImageAttributes = ImageAttributes() + +g.Clear(Color(255, 0, 0, 0)) +attrs.SetColorKey Color(255, 190, 90, 40), Color(255, 210, 110, 60) +g.DrawImage src, GpRect(0, 0, 2, 1), GpRect(0, 0, 2, 1), UnitPixel, attrs +Debug.Print Hex$(dst.Pixel(0, 0).argb) & " " & Hex$(dst.Pixel(1, 0).argb) + +attrs.ClearColorKey +g.Clear(Color(255, 0, 0, 0)) +attrs.SetColorKey &H0AFA82, &H0AFA82 +g.DrawImage src, GpRect(0, 0, 2, 1), GpRect(0, 0, 2, 1), UnitPixel, attrs +Debug.Print Hex$(dst.Pixel(0, 0).argb) & " " & Hex$(dst.Pixel(1, 0).argb) +' Output: +' FF000000 FF0AFA82 +' FFC86432 FF000000 +``` + +## Output channel + +### SetOutputChannel + +Syntax: *status* **=** *attrs*.**SetOutputChannel**( *channelFlags* [ , *type* ] ) + +*channelFlags* +: *required* A [**ColorChannelFlags**](Enumerations/ColorChannelFlags) value: **ColorChannelFlagsC**, **M**, **Y** or **K**, the cyan, magenta, yellow and black channels of the CMYK model. + +Draws the image as shades of gray that show only that channel of its colours. + +### ClearOutputChannel + +Syntax: *status* **=** *attrs*.**ClearOutputChannel**( [ *type* ] ) + +Removes the output channel setting. + +### SetOutputChannelColorProfile + +Syntax: *status* **=** *attrs*.**SetOutputChannelColorProfile**( *colorProfileFilename* [ , *type* ] ) + +*colorProfileFilename* +: *required* A **String** naming an ICC colour profile file. GDI+ uses the profile to split the colours into CMYK channels for **SetOutputChannel**. + +### ClearOutputChannelColorProfile + +Syntax: *status* **=** *attrs*.**ClearOutputChannelColorProfile**( [ *type* ] ) + +Removes the profile. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim attrs As ImageAttributes = ImageAttributes() +Debug.Print attrs.SetOutputChannel(ColorChannelFlagsK) +Debug.Print attrs.ClearOutputChannel() +' Output: +' 0 +' 0 +``` + +## Remapping colours + +### SetRemapTable + +Syntax: *status* **=** *attrs*.**SetRemapTable**( *map*( ) [ , *type* ] ) + +*map* +: *required* An array of [**ColorMap**](Types/ColorMap) values. Each pair gives a colour to replace and the colour to put in its place. + +Replaces the colours that match an *oldColor* of the table exactly. All other colours are unchanged. + +### ClearRemapTable + +Syntax: *status* **=** *attrs*.**ClearRemapTable**( [ *type* ] ) + +Removes the table of the category. + +### SetBrushRemapTable + +Syntax: *status* **=** *attrs*.**SetBrushRemapTable**( *map*( ) ) + +### ClearBrushRemapTable + +Syntax: *status* **=** *attrs*.**ClearBrushRemapTable**( ) + +The same for the **ColorAdjustTypeBrush** category. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim src As Bitmap = Bitmap(2!, 1!) +src.Pixel(0, 0) = Color(255, 200, 100, 50) +src.Pixel(1, 0) = Color(255, 10, 250, 130) +Dim dst As Bitmap = Bitmap(2!, 1!) +Dim g As Graphics = Graphics(dst) + +Dim map(0 To 0) As ColorMap +map(0) = ColorMap(Color(255, 200, 100, 50), Color(255, 1, 2, 3)) + +Dim attrs As ImageAttributes = ImageAttributes() +Debug.Print attrs.SetRemapTable(map) +g.DrawImage src, GpRect(0, 0, 2, 1), GpRect(0, 0, 2, 1), UnitPixel, attrs +Debug.Print Hex$(dst.Pixel(0, 0).argb) & " " & Hex$(dst.Pixel(1, 0).argb) +' Output: +' 0 +' FF010203 FF0AFA82 +``` + +## Wrap mode + +### SetWrapMode + +Syntax: *status* **=** *attrs*.**SetWrapMode**( *wrap*, *color* [ , *clamp* ] ) + +Syntax: *status* **=** *attrs*.**SetWrapMode**( *wrap*, *rgb* [ , *clamp* ] ) + +*wrap* +: *required* A [**GpWrapMode**](Enumerations/GpWrapMode): how the image repeats when the source rectangle reaches beyond its edges. + +*color* +: *required* A [**Color**](Types/Color) used with **WrapModeClamp**, for the area outside the image. + +*rgb* +: *required* A **Long** for the same, as `&H00RRGGBB`. + +*clamp* +: *optional* A **Boolean**. **True** draws only the part of the image inside the source rectangle. The default is **False**. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim attrs As ImageAttributes = ImageAttributes() +Debug.Print attrs.SetWrapMode(WrapModeClamp, Color(255, 1, 2, 3)) +Debug.Print attrs.SetWrapMode(WrapModeTileFlipXY, &H010203, True) +' Output: +' 0 +' 0 +``` + +## Other + +### SetCachedBackground + +Syntax: *status* **=** *attrs*.**SetCachedBackground**( *enabled* ) + +*enabled* +: *required* A **Boolean**. GDI+ may keep the background of the destination for faster repeated drawing when it is **True**. + +### GetAdjustedPalette + +Syntax: *status* **=** *attrs*.**GetAdjustedPalette**( *colorPalette*, *colorAdjustType* ) + +*colorPalette* +: *required* A [**ColorPalette**](Types/ColorPalette) whose colours are changed in place. + +*colorAdjustType* +: *required* A [**ColorAdjustType**](Enumerations/ColorAdjustType): the category whose settings are applied. + +Applies the adjustments of the category to the colours of the palette. The flags of the palette are ignored. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim pal As ColorPalette +pal.count = 2 +pal.entries(0) = &HFFC86432 +pal.entries(1) = &HFF0AFA82 + +Dim attrs As ImageAttributes = ImageAttributes() +attrs.SetGamma 2!, ColorAdjustTypeBitmap +Debug.Print attrs.GetAdjustedPalette(pal, ColorAdjustTypeBitmap) +Debug.Print Hex$(pal.entries(0)) & " " & Hex$(pal.entries(1)) +' Output: +' 0 +' FF9D270A FF00F542 +``` + +## Example + +The example makes a negative of an image with a colour matrix and then copies the settings with **Clone**. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim src As Bitmap = Bitmap(1!, 1!) +src.Pixel(0, 0) = Color(255, 200, 100, 50) +Dim dst As Bitmap = Bitmap(1!, 1!) +Dim g As Graphics = Graphics(dst) + +Dim cm As ColorMatrix +cm.m(0, 0) = -1: cm.m(1, 1) = -1: cm.m(2, 2) = -1: cm.m(3, 3) = 1 +cm.m(0, 4) = 1: cm.m(1, 4) = 1: cm.m(2, 4) = 1: cm.m(4, 4) = 1 + +Dim negative As ImageAttributes = ImageAttributes() +negative.SetColorMatrix cm +Dim copy As ImageAttributes = negative.Clone() + +g.DrawImage src, GpRect(0, 0, 1, 1), GpRect(0, 0, 1, 1), UnitPixel, copy +Debug.Print Hex$(dst.Pixel(0, 0).argb) +' Output: +' FF379BCD +``` + +## See Also + +- [ImageAttributes](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusimageattributes/nl-gdiplusimageattributes-imageattributes) -- Microsoft's documentation of the GDI+ class +- [Graphics](Graphics) class +- [Image](Image) class +- [ColorMatrix](Types/ColorMatrix) type +- [ColorMap](Types/ColorMap) type +- [ColorAdjustType](Enumerations/ColorAdjustType) enumeration diff --git a/docs/Reference/Contributed/GdiPlus/ImageCodec.md b/docs/Reference/Contributed/GdiPlus/ImageCodec.md new file mode 100644 index 00000000..e7735d68 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/ImageCodec.md @@ -0,0 +1,215 @@ +--- +title: ImageCodec +parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/ImageCodec +--- + +# ImageCodec +{: .no_toc } + +The image encoders and decoders that GDI+ has installed, and the identifiers (class IDs) of the file formats, frame dimensions, encoder parameters and codecs. + +A codec turns the pixels of a picture into the bytes of a file (an encoder) or back (a decoder). GDI+ comes with codecs for BMP, JPEG, GIF, TIFF and PNG, can read EMF, WMF and ICO files, and can use codecs that other programs install. The functions of this page list the codecs, and return the class IDs that [**Image.Save**](Image#save), [**Image.RawFormat**](Image#rawformat), [**Image.FrameCount**](Image#framecount) and [**Image.GetEncoderParameterList**](Image#getencoderparameterlist) work with. All of them are functions of the package, not members of a class, and each class ID is a **UUID**. The page follows the GDI+ [ImageCodecInfo](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusimaging/nl-gdiplusimaging-imagecodecinfo) structure and the flat functions that list the codecs. + +* TOC +{:toc} + +## Listing the codecs + +### GetImageEncoders, GetImageDecoders + +Syntax: *codecs* **= GetImageEncoders**( ) + +Syntax: *codecs* **= GetImageDecoders**( ) + +Return an array of [**GpImageCodecInfo**](Types/GpImageCodecInfo), one element for each installed encoder or decoder, with the lower bound 1. + +> [!WARNING] 0.9.45.0 +> Both functions stop the program with an access violation, in 32-bit and 64-bit programs. They give GDI+ the array variable itself as the buffer to fill, so GDI+ overwrites the array descriptor. Use the declared functions below, which work. + +### GetImageEncodersSize, GetImageDecodersSize, GetImageEncoders, GetImageDecoders + +Syntax: *status* **= GetImageEncodersSize**( *count*, *size* ) + +Syntax: *status* **= GetImageEncoders**( *count*, *size*, *buffer* ) + +Syntax: *status* **= GetImageDecodersSize**( *count*, *size* ) + +Syntax: *status* **= GetImageDecoders**( *count*, *size*, *buffer* ) + +*count* +: *required* A **UINT** that receives the number of codecs (the **Size** functions) or holds that number (the others). + +*size* +: *required* A **UINT** that receives the number of bytes the list takes, or holds it. + +*buffer* +: *required* The first **Byte** of a buffer of *size* bytes, passed by reference. + +These are direct declarations of the GDI+ functions, and return a [**GpStatus**](Enumerations/GpStatus). The buffer receives *count* consecutive **GpImageCodecInfo** structures, followed by the strings they point to. A program reads an element by copying `LenB(Of GpImageCodecInfo)` bytes from the buffer into a variable of that type. The buffer must stay alive for as long as the strings are used. + +> [!WARNING] 0.9.45.0 +> The string properties of [**GpImageCodecInfo**](Types/GpImageCodecInfo) (**FormatDescription**, **MimeType**, **FilenameExtension** and the others) end with a null character, so `info.FormatDescription = "PNG"` is **False**. Remove it with `Replace(text, vbNullChar, "")`, as the example does. + +```tb check_build hidden +Public Declare PtrSafe Sub CodecCopyMemory Lib "kernel32" Alias "RtlMoveMemory" (ByVal dst As LongPtr, ByVal src As LongPtr, ByVal cb As LongPtr) +``` + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim count As UINT, size As UINT +Debug.Print GetImageEncodersSize(count, size) +Dim buffer() As Byte +ReDim buffer(0 To size - 1) +Debug.Print GetImageEncoders(count, size, buffer(0)) + +Dim info As GpImageCodecInfo +Dim i As Long +For i = 0 To count - 1 + CodecCopyMemory VarPtr(info), VarPtr(buffer(0)) + i * LenB(Of GpImageCodecInfo), LenB(Of GpImageCodecInfo) + Debug.Print Replace(info.FormatDescription, vbNullChar, "") & " " & Replace(info.MimeType, vbNullChar, "") & " " & info.IsEncoder +Next +' Output: +' 0 +' 0 +' BMP image/bmp True +' JPEG image/jpeg True +' GIF image/gif True +' TIFF image/tiff True +' PNG image/png True +``` + +## Format and codec IDs + +The functions below take no arguments and return the **UUID** of what their name says. They are compared by value, for instance `fmt.Data1 = ImageFormatPNG().Data1`. + +### Image format IDs + +The IDs of the file formats, which **Image.RawFormat** returns and a **GpImageCodecInfo** holds in its **FormatID**. + +| Function | Format | +|:---------|:-------| +| **ImageFormatUndefined** | No known format. | +| **ImageFormatMemoryBMP** | A bitmap in memory, not from a file. | +| **ImageFormatBMP** | Windows bitmap. | +| **ImageFormatEMF** | Enhanced metafile. | +| **ImageFormatWMF** | Windows metafile. | +| **ImageFormatJPEG** | JPEG. | +| **ImageFormatPNG** | Portable Network Graphics. | +| **ImageFormatGIF** | Graphics Interchange Format. | +| **ImageFormatTIFF** | Tagged Image File Format. | +| **ImageFormatEXIF** | EXIF. | +| **ImageFormatIcon** | Windows icon. | +| **ImageFormatHEIF** | HEIF (needs GDI+ 1.1 and a codec). | +| **ImageFormatWEBP** | WebP (needs GDI+ 1.1 and a codec). | + +### Image codec IDs + +The class IDs of the built-in encoders, which a **GpImageCodecInfo** holds in its **Clsid**. They are the *clsidEncoder* argument of [**Image.Save**](Image#save). + +| Function | Encoder | +|:---------|:--------| +| **ImageCodecBMP** | BMP. | +| **ImageCodecJPG** | JPEG. | +| **ImageCodecGIF** | GIF. | +| **ImageCodecTIF** | TIFF. | +| **ImageCodecPNG** | PNG. | +| **ImageCodecICO** | Icon. | + +### Frame dimension IDs + +The kinds of frames of a multi-frame picture, for [**Image.FrameCount**](Image#framecount) and [**Image.SelectActiveFrame**](Image#selectactiveframe). + +| Function | Frames are | +|:---------|:-----------| +| **FrameDimensionTime** | The pictures of an animation, such as a GIF. | +| **FrameDimensionPage** | The pages of a document, such as a TIFF. | +| **FrameDimensionResolution** | The same picture at several resolutions. | + +### Property set IDs + +| Function | Property set | +|:---------|:-------------| +| **FormatIDImageInformation** | The image information properties of a file. | +| **FormatIDJpegAppHeaders** | The application headers of a JPEG file. | + +### Other IDs + +**CodecIImageBytes** returns the interface ID of [**IImageBytes**](IImageBytes). + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Debug.Print Hex$(ImageCodecPNG().Data1) +Debug.Print Hex$(ImageFormatPNG().Data1) +Debug.Print Hex$(FrameDimensionPage().Data1) + +Dim bmp As Bitmap = Bitmap(4!, 4!) +Debug.Print bmp.RawFormat.Data1 = ImageFormatMemoryBMP().Data1 +Debug.Print bmp.RawFormat.Data1 = ImageFormatPNG().Data1 +' Output: +' 557CF406 +' B96B3CAF +' 7462DC86 +' True +' False +``` + +## Encoder parameters + +An encoder accepts parameters, such as the quality of a JPEG. Each parameter is named by one of the IDs below and is passed to [**Image.Save**](Image#save) as a [**GpEncoderParameter**](Types/GpEncoderParameter). + +| Function | Parameter | +|:---------|:----------| +| **EncoderCompression** | The compression method ([**GpEncoderValue**](Enumerations/GpEncoderValue)). | +| **EncoderColorDepth** | The bits per pixel. | +| **EncoderScanMethod** | Interlaced or progressive. | +| **EncoderVersion** | The version of the format. | +| **EncoderRenderMethod** | How a progressive JPEG is rendered. | +| **EncoderQuality** | The quality, 0 to 100 for JPEG. | +| **EncoderTransformation** | A lossless JPEG transformation. | +| **EncoderLuminanceTable**, **EncoderChrominanceTable** | The quantization tables of a JPEG. | +| **EncoderSaveFlag** | Whether the save starts or continues a multi-frame file. | +| **EncoderColorSpace**, **EncoderImageItems**, **EncoderSaveAsCMYK** | Colour space, extra data items and CMYK saving (GDI+ 1.1). | + +> [!WARNING] 0.9.45.0 +> **Image.Save** cannot pass encoder parameters to the encoder, so these IDs cannot be used to change how a picture is saved. The call reads the parameters from memory before the array, and either returns an error, ignores them, or stops the program. See the warning at [**Image.Save**](Image#save); [**Bitmap**](Bitmap#saving) shows a way to save a PNG without parameters. + +## Example + +The example finds the encoder for PNG in the list and compares its identifiers with the functions. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim count As UINT, size As UINT +GetImageEncodersSize count, size +Dim buffer() As Byte +ReDim buffer(0 To size - 1) +GetImageEncoders count, size, buffer(0) + +Dim info As GpImageCodecInfo +Dim i As Long +For i = 0 To count - 1 + CodecCopyMemory VarPtr(info), VarPtr(buffer(0)) + i * LenB(Of GpImageCodecInfo), LenB(Of GpImageCodecInfo) + If Replace(info.FormatDescription, vbNullChar, "") = "PNG" Then + Debug.Print info.Clsid.Data1 = ImageCodecPNG().Data1 + Debug.Print info.FormatID.Data1 = ImageFormatPNG().Data1 + Debug.Print Replace(info.FilenameExtension, vbNullChar, "") + End If +Next +' Output: +' True +' True +' *.PNG +``` + +## See Also + +- [GpImageCodecInfo](Types/GpImageCodecInfo) type +- [GpEncoderParameter](Types/GpEncoderParameter) type +- [Image](Image) class +- [IImageBytes](IImageBytes) interface +- [GpImageCodecFlags](Enumerations/GpImageCodecFlags) enumeration +- [GpEncoderValue](Enumerations/GpEncoderValue) enumeration diff --git a/docs/Reference/Contributed/GdiPlus/InstalledFontCollection.md b/docs/Reference/Contributed/GdiPlus/InstalledFontCollection.md new file mode 100644 index 00000000..49ce1361 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/InstalledFontCollection.md @@ -0,0 +1,40 @@ +--- +title: InstalledFontCollection +parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/InstalledFontCollection +has_toc: false +--- + +# InstalledFontCollection class +{: .no_toc } + +The font families installed on the system. + +**InstalledFontCollection** lists the families that every program can use. It inherits [**FamilyCount**](FontCollection#familycount) and [**Families**](FontCollection#families) from [**FontCollection**](FontCollection) and adds nothing. It is read-only: fonts are installed and removed through Windows, not through this class. The class mirrors the GDI+ [InstalledFontCollection](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusheaders/nl-gdiplusheaders-installedfontcollection) class. + +A [**FontFamily**](FontFamily) or a [**Font**](Font) that is created without a collection looks in the installed fonts, so this class is needed only to list them. + +## Creating + +Syntax: *collection* **= InstalledFontCollection**( ) + +Syntax: *collection* **= New InstalledFontCollection** + +> [!WARNING] 0.9.45.0, BETA 1005 +> Creating an **InstalledFontCollection** raises run-time error 438, *Object doesn't support this property or method*, and the result is **Nothing**. The statement `Debug.Assert TypeOf (Me) Is InstalledFontCollection` in the class raises it. Even with that statement removed, the constructor does not store the native collection it creates, so the object has no handle and every call on it fails with **InvalidParameter**. The class cannot be used until a version of the package corrects both. + +```tb check_build +Dim user As GdiPlusUser = GdiPlusUser() + +Dim fonts As InstalledFontCollection = InstalledFontCollection() +Dim families() As FontFamily = fonts.Families +Debug.Print "Installed families: " & fonts.FamilyCount +Debug.Print "The first one: " & families(1).FamilyName +``` + +## See Also + +- [FontCollection](FontCollection) class -- the members this class inherits +- [PrivateFontCollection](PrivateFontCollection) class -- fonts for one program only +- [FontFamily](FontFamily) class +- [InstalledFontCollection class](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusheaders/nl-gdiplusheaders-installedfontcollection) -- Microsoft's GDI+ reference diff --git a/docs/Reference/Contributed/GdiPlus/Levels.md b/docs/Reference/Contributed/GdiPlus/Levels.md new file mode 100644 index 00000000..c2da94b4 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Levels.md @@ -0,0 +1,95 @@ +--- +title: Levels +parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Levels +--- + +# Levels class +{: .no_toc } + +An [**Effect**](Effect) that sets the highlight, midtone and shadow levels of a picture. + +Levels stretches the range of colour values: the shadow level is the value that becomes black, the highlight level the value that becomes white, and the midtone setting moves the middle values. It is the effect behind a Levels dialog of a picture editor. The class mirrors the GDI+ [Levels](https://learn.microsoft.com/en-us/windows/win32/api/gdipluseffects/nl-gdipluseffects-levels) class and inherits the members of [**Effect**](Effect). + +* TOC +{:toc} + +## Creating + +Syntax: *fx* **= Levels**( ) + +Syntax: *fx* **= Levels**( *params* ) + +Syntax: *fx* **= Levels**( *highlight*, *midtone*, *shadow* ) + +Each form is also available as **New Levels**( ... ) with the same arguments. + +*params* +: *required* A [**LevelsParams**](Types/LevelsParams) for the parameters. + +*highlight* +: *required* A **Long** from 0 to 100: the level, in percent of the range, that becomes white. 100 leaves the top of the range alone. + +*midtone* +: *required* A **Long** from -100 to 100. A positive value lightens the middle values and a negative one darkens them. 0 changes nothing. + +*shadow* +: *required* A **Long** from 0 to 100: the level, in percent of the range, that becomes black. 0 leaves the bottom of the range alone. It has to be lower than *highlight*. + +A constructor that fails creates an unusable object whose **LastResult** tells why. + +> [!WARNING] 0.9.45.0 +> The form with *params* stops the program with an access violation, in 32-bit and 64-bit programs. The forms without arguments and with the three values work. To use a structure, create the effect without arguments and set [**Parameters**](#parameters). + +## Parameters + +Syntax: *fx*.**Parameters** [ **=** *params* ] + +Syntax: *params* **=** *fx*.**Parameters**( *size* ) + +Gets or sets the [**LevelsParams**](Types/LevelsParams). + +> [!NOTE] 0.9.45.0 +> The first field of **LevelsParams** is named **highight**, with the letter l missing. Write `params.highight`. + +> [!WARNING] 0.9.45.0 +> The getter returns zeros and sets **LastResult** to 2 (**InvalidParameter**) unless it is given *size*, the size of the structure: `fx.Parameters(LenB(Of LevelsParams))`. See [**Effect**](Effect#parameters). + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim fx As Levels = Levels(80, 50, 20) +Dim p As LevelsParams = fx.Parameters(LenB(Of LevelsParams)) +Debug.Print fx.LastResult & " " & p.highight & " " & p.midtone & " " & p.shadow +' Output: +' 0 80 50 20 +``` + +## Example + +The example applies the default levels, which change nothing, and then stretched levels. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim same As Bitmap = Bitmap(4!, 4!) +Dim stretched As Bitmap = Bitmap(4!, 4!) +Graphics(same).Clear(Color(255, 200, 100, 50)) +Graphics(stretched).Clear(Color(255, 200, 100, 50)) + +same.ApplyEffect Levels(100, 0, 0), GpRect(0, 0, 4, 4) +stretched.ApplyEffect Levels(80, 50, 20), GpRect(0, 0, 4, 4) +Debug.Print Hex$(same.Pixel(1, 1).argb) +Debug.Print Hex$(stretched.Pixel(1, 1).argb) +' Output: +' FFC86432 +' FFFC9000 +``` + +## See Also + +- [Levels](https://learn.microsoft.com/en-us/windows/win32/api/gdipluseffects/nl-gdipluseffects-levels) -- Microsoft's documentation of the GDI+ class +- [Effect](Effect) class +- [BrightnessContrast](BrightnessContrast) class +- [ColorCurve](ColorCurve) class +- [LevelsParams](Types/LevelsParams) type diff --git a/docs/Reference/Contributed/GdiPlus/LinearGradientBrush.md b/docs/Reference/Contributed/GdiPlus/LinearGradientBrush.md new file mode 100644 index 00000000..e99f9c49 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/LinearGradientBrush.md @@ -0,0 +1,389 @@ +--- +title: LinearGradientBrush +parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/LinearGradientBrush +--- + +# LinearGradientBrush class +{: .no_toc } + +A brush that fills a shape with a colour that changes smoothly from one colour to another along a line. + +A **LinearGradientBrush** implements [**IBrush**](IBrush) and [**ITransformable**](ITransformable). It has a start colour and an end colour, and a line that joins the point of the start colour to the point of the end colour. The colour at any other point depends on how far along the line its projection falls. Outside the line the gradient repeats, mirrored or not, as the [wrap mode](#wrapmode) says. Further colours, or a different rate of change, can be added with a [blend](#blends). The class mirrors the GDI+ [LinearGradientBrush](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusbrush/nl-gdiplusbrush-lineargradientbrush) class. + +* TOC +{:toc} + +## Creating + +Syntax: *brush* **= LinearGradientBrush**( *rect*, *color1*, *color2* ) + +Syntax: *brush* **= LinearGradientBrush**( *point1*, *point2*, *color1*, *color2* ) + +Syntax: *brush* **= LinearGradientBrush**( *rect*, *color1*, *color2*, *mode* ) + +Syntax: *brush* **= LinearGradientBrush**( *rect*, *color1*, *color2*, *angle* [, *isAngleScalable*] ) + +Each form can also be written with **New**: *brush* **= New LinearGradientBrush**( ... ). The two are one thing. + +*rect* +: *required* A **GpRectF** or a **GpRect**, the rectangle that the gradient spans. + +*point1*, *point2* +: *required* Two **GpPointF** or two **GpPoint** values: the point of *color1* and the point of *color2*. The gradient runs along the line between them. + +*color1*, *color2* +: *required* **Color** values for the start and the end of the gradient. Each form also takes two **Long** values, *rgb1* and *rgb2*, as `&H00RRGGBB`. + +*mode* +: *required* A [**GpLinearGradientMode**](Enumerations/GpLinearGradientMode) value for the direction across the rectangle: **LinearGradientModeHorizontal**, from the left edge to the right edge; **LinearGradientModeVertical**, from the top edge to the bottom edge; **LinearGradientModeForwardDiagonal**, from the top left corner to the bottom right corner; **LinearGradientModeBackwardDiagonal**, from the top right corner to the bottom left corner. + +*angle* +: *required* A **Single**, the direction of the line in degrees, measured clockwise from the horizontal. 0 runs from left to right and 90 from top to bottom. + +*isAngleScalable* +: *optional* A **Boolean**. When **True**, the angle is scaled with the shape of the rectangle, as for a rectangle that is not square, instead of being used as it is. The default is **False**. + +The form with only a rectangle and two colours runs the gradient along the diagonal from the top left corner to the bottom right corner, like **LinearGradientModeForwardDiagonal**. A new brush has the wrap mode **WrapModeTile**. + +> [!WARNING] 0.9.45.0 +> The forms with *rgb1* and *rgb2* read each **Long** as `&H00RRGGBB`, not as a VB colour, and drop the alpha: `vbRed` is blue. [**IBrush**](IBrush#colours) lists what else is not translated. Use the **Color** forms. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim black As Color = Color(255, 0, 0, 0) +Dim white As Color = Color(255, 255, 255, 255) +Dim brush As LinearGradientBrush = New LinearGradientBrush(GpRectF(0, 0, 10, 4), black, white, LinearGradientModeHorizontal) + +Dim bmp As Bitmap = Bitmap(20!, 4!) +Dim g As Graphics = Graphics(bmp) +g.FillRectangle(brush, 0, 0, 20, 4) + +Debug.Print Hex$(bmp.Pixel(0, 1).R) & " " & Hex$(bmp.Pixel(4, 1).R) & " " & Hex$(bmp.Pixel(9, 1).R) +Debug.Print Hex$(bmp.Pixel(10, 1).R) +' Output: +' 0 66 E5 +' 0 +``` + +The example shows both ends of the gradient and, at the start of the second tile, its repetition. + +### Clone + +Syntax: *copy* **=** *brush*.**Clone**( ) + +Returns a new **LinearGradientBrush** with the same colours, blend, transformation and wrap mode. + +## Colours + +### SetLinearColors + +Syntax: *brush*.**SetLinearColors**( *color1*, *color2* ) + +Syntax: *brush*.**SetLinearColors**( *rgb1*, *rgb2* ) + +Replaces the start colour and the end colour, and returns a [**GpStatus**](Enumerations/GpStatus). A blend that was set before is kept. The *rgb* form takes `&H00RRGGBB` values, with the warning above. + +### LinearColors + +Syntax: *colors* **=** *brush*.**LinearColors** + +Returns the start colour and the end colour, as an array of **Color**. + +> [!NOTE] 0.9.45.0 +> The array runs from 0 to 2, and its element 0 is not used: the start colour is element 1 and the end colour element 2. + +### LinearRGBs + +Syntax: *colors* **=** *brush*.**LinearRGBs** + +Returns the same two colours as an array of **Long**, laid out as the array of **LinearColors**. Each value is a complete `&HAARRGGBB` colour, with its alpha, and not a `&H00RRGGBB` value. + +### Rectangle, RectangleI + +Syntax: *rect* **=** *brush*.**Rectangle** + +Syntax: *rect* **=** *brush*.**RectangleI** + +Return the rectangle that the gradient spans, as a **GpRectF** and as a **GpRect**. For a brush made from two points, GDI+ makes the rectangle from the points. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim brush As LinearGradientBrush = New LinearGradientBrush(GpPointF(0, 0), GpPointF(10, 0), Color(255, 255, 0, 0), Color(255, 0, 0, 255)) + +Dim colors() As Color = brush.LinearColors +Debug.Print UBound(colors) & " " & Hex$(colors(1).argb) & " " & Hex$(colors(2).argb) + +brush.SetLinearColors Color(255, 0, 255, 0), Color(255, 255, 255, 0) +colors = brush.LinearColors +Debug.Print Hex$(colors(1).argb) & " " & Hex$(colors(2).argb) + +Dim bmp As Bitmap = Bitmap(10!, 2!) +Dim g As Graphics = Graphics(bmp) +g.FillRectangle(brush, 0, 0, 10, 2) +Debug.Print Hex$(bmp.Pixel(0, 0).argb) & " " & Hex$(bmp.Pixel(5, 0).argb) +' Output: +' 2 FFFF0000 FF0000FF +' FF00FF00 FFFFFF00 +' FF00FF00 FF80FF00 +``` + +### GammaCorrection + +Syntax: *brush*.**GammaCorrection** [ **=** *useGamma* ] + +Gets or sets whether the colours are blended in a gamma-corrected space. The default is **False**. The middle of a black-to-white gradient is darker without the correction than with it. + +## Blends + +A blend changes how fast the colour moves from the start colour to the end colour. It is one of three things, and setting one replaces the others: a list of blend factors, a list of preset colours, or a bell or triangle shape. + +### BlendCount + +Syntax: *count* **=** *brush*.**BlendCount** + +Returns the number of blend factors. A new brush has 1. + +### SetBlend + +Syntax: *brush*.**SetBlend**( *blendFactors*, *blendPositions* ) + +Syntax: *brush*.**SetBlend**( *blendFactors*(1), *blendPositions*(1), *count* ) + +Sets the blend factors, and returns a [**GpStatus**](Enumerations/GpStatus). A blend factor is a **Single** from 0 to 1: the share of the end colour at a position, with the rest from the start colour. A position is a **Single** from 0 at the start of the gradient to 1 at its end. The first position must be 0 and the last 1. The first form takes two arrays of the same length. The second form takes the first element of each array by reference and the number of elements to read. + +> [!WARNING] 0.9.45.0 +> The form with two arrays never returns. Use the form with the first elements and the count, as the example does. + +### GetBlend + +Syntax: *brush*.**GetBlend**( *blendFactors*, *blendPositions* ) + +Syntax: *brush*.**GetBlend**( *blendFactors*(1), *blendPositions*(1), *count* ) + +Reads the blend factors and positions. The first form sizes the two arrays, from 1 to **BlendCount**, and fills them. The second form fills arrays that the caller has sized; *count* is the number of elements to read. + +### InterpolationColorCount + +Syntax: *count* **=** *brush*.**InterpolationColorCount** + +Returns the number of preset colours. A brush that has none returns 0. + +### SetInterpolationColors + +Syntax: *brush*.**SetInterpolationColors**( *presetColors*, *blendPositions* ) + +Syntax: *brush*.**SetInterpolationColors**( *presetColors*(1), *blendPositions*(1), *count* ) + +Sets preset colours, and returns a [**GpStatus**](Enumerations/GpStatus). The gradient takes the colour at each position, and blends between them. The first position must be 0 and the last 1. Like **SetBlend**, the first form takes two arrays and the second form takes the first elements by reference and a count. The preset colours replace the start and the end colour for the drawing; [**LinearColors**](#linearcolors) still returns those two. + +> [!WARNING] 0.9.45.0 +> The form with two arrays never returns. Use the form with the first elements and the count. + +### GetInterpolationColors + +Syntax: *brush*.**GetInterpolationColors**( *presetColors*, *blendPositions* ) + +Syntax: *brush*.**GetInterpolationColors**( *presetColors*(1), *blendPositions*(1), *count* ) + +Reads the preset colours and their positions. The first form sizes the two arrays, from 1 to **InterpolationColorCount**, and fills them. + +### SetBlendBellShape + +Syntax: *brush*.**SetBlendBellShape**( *focus* [, *scale*] ) + +Makes the colour reach the end colour at *focus*, a **Single** from 0 to 1 along the gradient, and fall back to the start colour on both sides, with a smooth bell-shaped curve. *scale*, a **Single** from 0 to 1, is how fast the colour falls off from *focus*; the default is 1. Returns a [**GpStatus**](Enumerations/GpStatus). + +### SetBlendTriangularShape + +Syntax: *brush*.**SetBlendTriangularShape**( *focus* [, *scale*] ) + +The same, with a triangle in place of the bell: the colour changes at a constant rate to *focus* and back. The default *scale* is 1. Returns a [**GpStatus**](Enumerations/GpStatus). + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim bmp As Bitmap = Bitmap(10!, 2!) +Dim g As Graphics = Graphics(bmp) +Dim brush As LinearGradientBrush = New LinearGradientBrush(GpRectF(0, 0, 10, 2), Color(255, 0, 0, 0), Color(255, 255, 255, 255), LinearGradientModeHorizontal) + +' black, white in the middle, black again +Dim factors(1 To 3) As Single, positions(1 To 3) As Single +factors(1) = 0: factors(2) = 1: factors(3) = 0 +positions(1) = 0: positions(2) = 0.5: positions(3) = 1 +Debug.Print brush.SetBlend(factors(1), positions(1), 3) & " " & brush.BlendCount +g.FillRectangle(brush, 0, 0, 10, 2) +Debug.Print Hex$(bmp.Pixel(0, 0).R) & " " & Hex$(bmp.Pixel(5, 0).R) & " " & Hex$(bmp.Pixel(9, 0).R) + +' red, green, blue +Dim colors(1 To 3) As Color +colors(1) = Color(255, 255, 0, 0) +colors(2) = Color(255, 0, 255, 0) +colors(3) = Color(255, 0, 0, 255) +Debug.Print brush.SetInterpolationColors(colors(1), positions(1), 3) & " " & brush.InterpolationColorCount +g.FillRectangle(brush, 0, 0, 10, 2) +Debug.Print Hex$(bmp.Pixel(0, 0).argb) & " " & Hex$(bmp.Pixel(5, 0).argb) + +Dim c2() As Color, p2() As Single +Debug.Print brush.GetInterpolationColors(c2, p2) & " " & UBound(c2) & " " & Hex$(c2(2).argb) & " " & p2(2) +' Output: +' 0 3 +' 0 FF 33 +' 0 3 +' FFFF0000 FF00FF00 +' 0 3 FF00FF00 0.5 +``` + +## Wrap mode + +### WrapMode + +Syntax: *brush*.**WrapMode** [ **=** *wrapMode* ] + +Gets or sets what the brush does outside its line: a [**GpWrapMode**](Enumerations/GpWrapMode) value. The default is **WrapModeTile**. + +| Value | Outside the gradient | +|:------|:---------------------| +| **WrapModeTile** | The gradient repeats, from the start colour again. | +| **WrapModeTileFlipX**, **WrapModeTileFlipXY** | The gradient repeats, mirrored every second time, so that the colour runs back from the end colour. | +| **WrapModeTileFlipY** | Like **WrapModeTile**. | + +> [!NOTE] 0.9.45.0 +> **WrapModeClamp** is refused: **LastResult** becomes **InvalidParameter** and the wrap mode is not changed. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim brush As LinearGradientBrush = New LinearGradientBrush(GpRectF(0, 0, 10, 10), Color(255, 0, 0, 0), Color(255, 255, 255, 255), LinearGradientModeHorizontal) +Dim bmp As Bitmap = Bitmap(20!, 2!) +Dim g As Graphics = Graphics(bmp) + +Dim row As String, x As Long +brush.WrapMode = WrapModeTileFlipX +g.FillRectangle(brush, 0, 0, 20, 2) +For x = 8 To 12 + row = row & Hex$(bmp.Pixel(x, 0).R) & " " +Next +Debug.Print row + +row = "" +brush.WrapMode = WrapModeTile +g.FillRectangle(brush, 0, 0, 20, 2) +For x = 8 To 12 + row = row & Hex$(bmp.Pixel(x, 0).R) & " " +Next +Debug.Print row + +brush.WrapMode = WrapModeClamp +Debug.Print brush.LastResult & " " & brush.WrapMode +' Output: +' CC E5 FF E5 CC +' CC E5 0 1A 33 +' 2 0 +``` + +## Transformations + +The brush implements [**ITransformable**](ITransformable). Its transformation moves, scales, rotates or shears the gradient, as a matrix applies to a shape. The *order* parameter of each method is a [**GpMatrixOrder**](Enumerations/GpMatrixOrder): **MatrixOrderPrepend**, the default, applies the new operation before those the brush already has, and **MatrixOrderAppend** applies it after. Each method returns a [**GpStatus**](Enumerations/GpStatus). + +### Transform + +Syntax: *brush*.**Transform** [ **=** *matrix* ] + +Sets the transformation of the brush to a [**Matrix**](Matrix). Reading it should return a copy of the matrix. + +> [!NOTE] 0.9.45.0 +> Reading **Transform** always fails: it returns **Nothing** and **LastResult** becomes **InvalidParameter**. Use [**GetTransform**](#gettransform). + +### GetTransform + +Syntax: *brush*.**GetTransform**( *matrix* ) + +Copies the transformation of the brush into *matrix*, a **Matrix** that the caller created. + +### ResetTransform + +Syntax: *brush*.**ResetTransform**( ) + +Sets the transformation to the identity matrix: no movement, scaling, rotation or shear. + +### MultiplyTransform + +Syntax: *brush*.**MultiplyTransform**( *matrix* [, *order*] ) + +Combines the transformation with a **Matrix**. + +### TranslateTransform + +Syntax: *brush*.**TranslateTransform**( *dx*, *dy* [, *order*] ) + +Syntax: *brush*.**TranslateTransform**( *delta* [, *order*] ) + +Moves the gradient by *dx* and *dy*, or by a **GpPointF**, in the units of the drawing surface. + +### ScaleTransform + +Syntax: *brush*.**ScaleTransform**( *sx*, *sy* [, *order*] ) + +Scales the gradient by the factors *sx* across and *sy* down. + +### RotateTransform + +Syntax: *brush*.**RotateTransform**( *angle* [, *order*] ) + +Rotates the gradient by *angle* degrees clockwise about the origin of the drawing surface. + +### RotateTransformAt + +Syntax: *brush*.**RotateTransformAt**( *angle*, *center* [, *order*] ) + +Rotates the gradient by *angle* degrees about the **GpPointF** *center*. + +### ShearTransform + +Syntax: *brush*.**ShearTransform**( *shearX*, *shearY* [, *order*] ) + +Shears the gradient: *shearX* is the amount that x grows for each unit of y, and *shearY* the amount that y grows for each unit of x. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim brush As LinearGradientBrush = New LinearGradientBrush(GpRectF(0, 0, 10, 10), Color(255, 0, 0, 0), Color(255, 255, 255, 255), LinearGradientModeHorizontal) +brush.TranslateTransform 5, 0 + +Dim m As Matrix = New Matrix() +Debug.Print brush.GetTransform(m) & " " & m.OffsetX & " " & m.OffsetY + +Dim bmp As Bitmap = Bitmap(20!, 2!) +Dim g As Graphics = Graphics(bmp) +g.FillRectangle(brush, 0, 0, 20, 2) +Debug.Print Hex$(bmp.Pixel(0, 0).R) & " " & Hex$(bmp.Pixel(5, 0).R) + +brush.ResetTransform +brush.GetTransform m +Debug.Print m.OffsetX +' Output: +' 0 5 0 +' 80 0 +' 0 +``` + +## Type + +### Type + +Syntax: *type* **=** *brush*.**Type** + +Returns **BrushTypeLinearGradient** ([**GpBrushType**](Enumerations/GpBrushType)). The property is read-only. + +## See Also + +- [LinearGradientBrush](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusbrush/nl-gdiplusbrush-lineargradientbrush) -- Microsoft's documentation of the GDI+ class +- [IBrush](IBrush) interface +- [ITransformable](ITransformable) interface +- [PathGradientBrush](PathGradientBrush) class +- [Matrix](Matrix) class +- [GpLinearGradientMode](Enumerations/GpLinearGradientMode) enumeration +- [GpWrapMode](Enumerations/GpWrapMode) enumeration diff --git a/docs/Reference/Contributed/GdiPlus/Matrix.md b/docs/Reference/Contributed/GdiPlus/Matrix.md new file mode 100644 index 00000000..884dff9b --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Matrix.md @@ -0,0 +1,393 @@ +--- +title: Matrix +parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Matrix +--- + +# Matrix class +{: .no_toc } + +A **Matrix** holds a 3 by 3 affine transformation, which moves, scales, rotates or shears points. + +An affine transformation always has the third column 0, 0, 1, so a **Matrix** stores only six numbers. They are written *m11*, *m12*, *m21*, *m22*, *dx* and *dy*, after the rows and columns they occupy: + +| | | | +|:--:|:--:|:--:| +| *m11* | *m12* | 0 | +| *m21* | *m22* | 0 | +| *dx* | *dy* | 1 | + +A point is a row vector (*x*, *y*, 1), multiplied by the matrix from the left. The transformed point is (*x* · *m11* + *y* · *m21* + *dx*, *x* · *m12* + *y* · *m22* + *dy*). The pair *dx*, *dy* is the translation. A matrix of 1, 0, 0, 1, 0, 0 is the identity: it leaves every point where it is. + +A matrix is built by combining simple transformations with [**Translate**](#translate), [**Scale**](#scale), [**Rotate**](#rotate), [**RotateAt**](#rotateat), [**Shear**](#shear) and [**Multiply**](#multiply). Each takes an *order* of type [**GpMatrixOrder**](Enumerations/GpMatrixOrder): with **MatrixOrderPrepend**, the default, the new transformation is applied to a point before the transformations already in the matrix. With **MatrixOrderAppend** it is applied after them. + +**Matrix** implements [**ITransformable**](ITransformable), so a matrix can be passed to code that transforms a [**Graphics**](Graphics) or a brush through that interface. The methods listed there under other names are the ones on this page: **Translate** is **TranslateTransform**, **Scale** is **ScaleTransform**, and so on. + +Other classes take a **Matrix** to describe a transformation: [**GraphicsPath.Transform**](GraphicsPath#transform), [**Region.Transform**](Region#transform), and the **Transform** property of [**Graphics**](Graphics), [**Pen**](Pen) and the brushes. + +Most members return a [**GpStatus**](Enumerations/GpStatus), which is **Ok** when the call worked. A property that fails records its status in **LastResult**, as every object of the package does. See [**GdiPlusBase**](GdiPlusBase). + +## Creating +{: .no_toc } + +Syntax: *matrix* **= Matrix(** [ *m11*, *m12*, *m21*, *m22*, *dx*, *dy* ] **)** + +Syntax: *matrix* **= New Matrix(** [ *m11*, *m12*, *m21*, *m22*, *dx*, *dy* ] **)** + +The function **Matrix** and **New Matrix** are the same thing, and take the same arguments. + +With no arguments the matrix is the identity. With six arguments, each a **Single**, it holds those elements. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim m As Matrix = Matrix(2, 0, 0, 3, 10, 20) +Dim e() As Single = m.Elements +Debug.Print e(1) & " " & e(4) & " " & m.OffsetX & " " & m.OffsetY ' 2 3 10 20 +Dim id As Matrix = Matrix() +Debug.Print id.IsIdentity ' True +``` + +Syntax: *matrix* **= Matrix(** *rect*, *point* **)** + +*rect* +: *required* A [**GpRectF**](Types/GpRectF) or a [**GpRect**](Types/GpRect). + +*point* +: *required* A [**GpPointF**](Types/GpPointF) for a **GpRectF**, a [**GpPoint**](Types/GpPoint) for a **GpRect**. + +In GDI+ this constructor maps a rectangle to a parallelogram, and the parallelogram is given by three points: the images of the top-left, top-right and bottom-left corners of the rectangle. The package takes one point where GDI+ reads three. + +> [!WARNING] 0.9.45.0 +> The constructors that take a rectangle and a point give a matrix whose elements depend on whatever memory follows the point. The call does not report an error. Use the six-number constructor, or build the matrix with [**Translate**](#translate), [**Scale**](#scale) and the other methods. + +## Elements and offset + +### Elements +{: .no_toc } + +Syntax: *matrix*.**Elements** **As Single()** + +Syntax: *matrix*.**Elements** **=** *elts* + +The six elements as an array, in the order *m11*, *m12*, *m21*, *m22*, *dx*, *dy*. The array that is read has indexes 1 to 6. + +To set the elements, assign an array of exactly six **Single** values; its lower bound does not matter. An array of another length leaves the matrix as it was and records **InvalidParameter** in **LastResult**. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim m As Matrix = Matrix() +Dim f(1 To 6) As Single +f(1) = 1: f(2) = 2: f(3) = 3: f(4) = 4: f(5) = 5: f(6) = 6 +m.Elements = f +Dim e() As Single = m.Elements +Debug.Print e(2) & " " & e(5) ' 2 5 +Dim bad(1 To 3) As Single +m.Elements = bad +Debug.Print m.LastResult ' 2 +``` + +### GetElements +{: .no_toc } + +Syntax: *matrix*.**GetElements(** *elts*() **)** **As GpStatus** + +Syntax: *matrix*.**GetElements(** [ *m11*, *m12*, *m21*, *m22*, *dx*, *dy* ] **)** **As GpStatus** + +*elts* +: *required* An array of **Single** with room for six elements, starting at its lower bound. Nothing checks its size. + +*m11* to *dy* +: *optional* **Single** variables that receive the elements. Leave out the ones that are not wanted. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim m As Matrix = Matrix(1, 2, 3, 4, 5, 6) +Dim a As Single, d As Single, tx As Single +m.GetElements a, , , d, tx +Debug.Print a & " " & d & " " & tx ' 1 4 5 +Dim g(0 To 5) As Single +m.GetElements g +Debug.Print g(0) & " " & g(5) ' 1 6 +``` + +### SetElements +{: .no_toc } + +Syntax: *matrix*.**SetElements(** *m11*, *m12*, *m21*, *m22*, *dx*, *dy* **)** **As GpStatus** + +Sets the six elements. + +### OffsetX, OffsetY and Offset +{: .no_toc } + +Syntax: *matrix*.**OffsetX** [ **=** *value* ] + +Syntax: *matrix*.**OffsetY** [ **=** *value* ] + +Syntax: *matrix*.**Offset** [ **=** *point* ] + +The translation elements *dx* and *dy*. **OffsetX** and **OffsetY** are **Single** values. **Offset** is a [**GpPointF**](Types/GpPointF) holding both. + +> [!WARNING] 0.9.45.0 +> Assigning **OffsetX** sets *dx* and sets *dy* to 0. Assigning **OffsetY** does not change *dy* to the value: it sets *dx* to the value and *dy* to 0. Reading all three properties is correct, and so is assigning **Offset**. To change one offset, assign **Offset**, or call **SetElements**. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim m As Matrix = Matrix(1, 0, 0, 1, 3, 4) +m.Offset = GpPointF(m.OffsetX, 9) +Debug.Print m.OffsetX & " " & m.OffsetY ' 3 9 +``` + +### Clone +{: .no_toc } + +Syntax: *matrix*.**Clone** **As Matrix** + +Returns a new matrix with the same elements. Changing one does not change the other. + +### SetFrom and GetTo +{: .no_toc } + +Syntax: *matrix*.**SetFrom(** *input* **)** **As GpStatus** + +Syntax: *matrix*.**GetTo(** *output* **)** **As GpStatus** + +**SetFrom** copies the elements of *input* into this matrix. **GetTo** copies the elements of this matrix into *output*, which must be an existing **Matrix**. **GetTo** is the **GetTransform** method of [**ITransformable**](ITransformable#gettransform). + +### IsIdentity, IsInvertible and IsEqualTo +{: .no_toc } + +Syntax: *matrix*.**IsIdentity** **As Boolean** + +Syntax: *matrix*.**IsInvertible** **As Boolean** + +Syntax: *matrix*.**IsEqualTo(** *other* **)** **As Boolean** + +**IsIdentity** is **True** when the matrix leaves every point unchanged. **IsInvertible** is **True** when the matrix has an inverse, which is when its determinant, *m11* · *m22* - *m12* · *m21*, is not 0. **IsEqualTo** compares all six elements with those of *other*. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim m As Matrix = Matrix(2, 0, 0, 2, 0, 0) +Dim z As Matrix = Matrix(0, 0, 0, 0, 0, 0) +Debug.Print m.IsIdentity & " " & m.IsInvertible & " " & z.IsInvertible ' False True False +Debug.Print m.IsEqualTo(m.Clone) ' True +``` + +## Building a transformation + +### Reset +{: .no_toc } + +Syntax: *matrix*.**Reset** **As GpStatus** + +Sets the matrix to the identity. It is **ResetTransform** of [**ITransformable**](ITransformable#resettransform). + +### Translate +{: .no_toc } + +Syntax: *matrix*.**Translate(** *dx*, *dy*, [ *order* ] **)** **As GpStatus** + +Syntax: *matrix*.**Translate(** *offset*, [ *order* ] **)** **As GpStatus** + +*dx*, *dy* +: *required* **Single** distances to move by along each axis. + +*offset* +: *required* A [**GpPointF**](Types/GpPointF) that holds the two distances. + +*order* +: *optional* A [**GpMatrixOrder**](Enumerations/GpMatrixOrder), **MatrixOrderPrepend** by default. + +Combines a translation with the matrix. + +### Scale +{: .no_toc } + +Syntax: *matrix*.**Scale(** *sx*, *sy*, [ *order* ] **)** **As GpStatus** + +*sx*, *sy* +: *required* **Single** factors for the horizontal and vertical axes. A negative factor mirrors. + +*order* +: *optional* A [**GpMatrixOrder**](Enumerations/GpMatrixOrder), **MatrixOrderPrepend** by default. + +Combines a scaling with the matrix. + +> [!WARNING] BETA 1005 +> A call of **Scale** written as a statement, with its arguments in parentheses and without **Call**, does nothing and raises no error: `m.Scale(2, 3)` leaves the matrix as it was. The same call written `m.Scale 2, 3`, `Call m.Scale(2, 3)` or `status = m.Scale(2, 3)` works. This is the case for a method of any class that is named **Scale**. + +### Rotate +{: .no_toc } + +Syntax: *matrix*.**Rotate(** *angle*, [ *order* ] **)** **As GpStatus** + +*angle* +: *required* A **Single** angle in degrees. A positive angle turns clockwise on a surface whose y axis points down, as the screen's does. + +*order* +: *optional* A [**GpMatrixOrder**](Enumerations/GpMatrixOrder), **MatrixOrderPrepend** by default. + +Combines a rotation about the origin with the matrix. The elements are *m11* = cos *angle*, *m12* = sin *angle*, *m21* = -sin *angle* and *m22* = cos *angle*, so the elements of a rotation by 90 degrees differ from 0 and 1 by a rounding error of about 10^-7. + +### RotateAt +{: .no_toc } + +Syntax: *matrix*.**RotateAt(** *angle*, *center*, [ *order* ] **)** **As GpStatus** + +*angle* +: *required* A **Single** angle in degrees. + +*center* +: *required* A [**GpPointF**](Types/GpPointF), the point that stays where it is. + +*order* +: *optional* A [**GpMatrixOrder**](Enumerations/GpMatrixOrder), **MatrixOrderPrepend** by default. + +Combines a rotation about *center* with the matrix. It moves *center* to the origin, rotates, and moves it back. + +### Shear +{: .no_toc } + +Syntax: *matrix*.**Shear(** *shearX*, *shearY*, [ *order* ] **)** **As GpStatus** + +*shearX*, *shearY* +: *required* **Single** shear factors. *shearX* adds *shearX* times *y* to every *x*. *shearY* adds *shearY* times *x* to every *y*. + +*order* +: *optional* A [**GpMatrixOrder**](Enumerations/GpMatrixOrder), **MatrixOrderPrepend** by default. + +Combines a shear with the matrix. + +### Multiply +{: .no_toc } + +Syntax: *matrix*.**Multiply(** *other*, [ *order* ] **)** **As GpStatus** + +*other* +: *required* The **Matrix** to combine with this one. + +*order* +: *optional* A [**GpMatrixOrder**](Enumerations/GpMatrixOrder), **MatrixOrderPrepend** by default. + +With **MatrixOrderPrepend**, the matrix becomes *other* · *matrix*: a point goes through *other* first. With **MatrixOrderAppend**, it becomes *matrix* · *other*. + +The order decides what a sequence of calls means: + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim a As Matrix = Matrix() +a.Translate 10, 20 +a.Scale 2, 3 ' prepend: the scaling is applied first +Dim pt As GpPointF = GpPointF(1, 1) +a.TransformPoint pt +Debug.Print pt.X & " " & pt.Y ' 12 23 + +Dim b As Matrix = Matrix() +b.Translate 10, 20 +b.Scale 2, 3, MatrixOrderAppend ' append: the scaling is applied last +pt = GpPointF(1, 1) +b.TransformPoint pt +Debug.Print pt.X & " " & pt.Y ' 22 63 +``` + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim m As Matrix = Matrix() +m.RotateAt 90, GpPointF(10, 10) ' turn about (10, 10) +Dim pt As GpPointF = GpPointF(10, 10) +m.TransformPoint pt +Debug.Print Round(pt.X, 3) & " " & Round(pt.Y, 3) ' 10 10 +pt = GpPointF(20, 10) +m.TransformPoint pt +Debug.Print Round(pt.X, 3) & " " & Round(pt.Y, 3) ' 10 20 +``` + +## Inverting + +### Invert +{: .no_toc } + +Syntax: *matrix*.**Invert** **As GpStatus** + +Replaces the matrix with its inverse, which undoes the transformation. When the matrix is not invertible, the call returns **InvalidParameter** and leaves the matrix as it was. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim m As Matrix = Matrix(2, 0, 0, 4, 6, 8) +Dim inv As Matrix = m.Clone +Debug.Print inv.Invert ' 0 +Dim pt As GpPointF = GpPointF(10, 20) +m.TransformPoint pt +inv.TransformPoint pt +Debug.Print pt.X & " " & pt.Y ' 10 20 +Dim z As Matrix = Matrix(0, 0, 0, 0, 0, 0) +Debug.Print z.Invert ' 2 +``` + +## Transforming points + +### TransformPoint and TransformPoints +{: .no_toc } + +Syntax: *matrix*.**TransformPoint(** *pt* **)** **As GpStatus** + +Syntax: *matrix*.**TransformPoints(** *pts*() **)** **As GpStatus** + +*pt* +: *required* A [**GpPointF**](Types/GpPointF) or a [**GpPoint**](Types/GpPoint) variable. The call replaces it with the transformed point. + +*pts* +: *required* An array of **GpPointF** or **GpPoint**. The call replaces every element. + +The translation elements apply. The integer overloads round the result to whole numbers. + +### VectorTransformPoint and VectorTransformPoints +{: .no_toc } + +Syntax: *matrix*.**VectorTransformPoint(** *pt* **)** **As GpStatus** + +Syntax: *matrix*.**VectorTransformPoints(** *pts*() **)** **As GpStatus** + +As **TransformPoint** and **TransformPoints**, but the translation is left out: *dx* and *dy* are taken as 0. Use them for a direction or a distance, which a move does not change. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim m As Matrix = Matrix(2, 0, 0, 3, 10, 20) +Dim pts(1 To 2) As GpPointF +pts(1) = GpPointF(0, 0): pts(2) = GpPointF(2, 2) +m.TransformPoints pts +Debug.Print pts(1).X & "," & pts(1).Y & " " & pts(2).X & "," & pts(2).Y ' 10,20 14,26 +Dim v As GpPointF = GpPointF(1, 1) +m.VectorTransformPoint v +Debug.Print v.X & "," & v.Y ' 2,3 +``` + +## Example + +This example draws a rectangle turned by 45 degrees about its centre. It builds the matrix with **RotateAt**, applies it to a path and reads two pixels back. The first is covered by the turned rectangle, so its green value is 0. The second is covered only by the unturned rectangle, so it is still white. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim bmp As Bitmap = Bitmap(40!, 40!) +Dim g As Graphics = Graphics(bmp) +g.Clear Color(255, 255, 255, 255) + +Dim path As GraphicsPath = GraphicsPath() +path.AddRectangle 8, 14, 24, 12 +Dim m As Matrix = Matrix() +m.RotateAt 45, GpPointF(20, 20) +path.Transform m + +Dim sb As SolidBrush = New SolidBrush(Color(255, 255, 0, 0)) +g.FillPath sb, path +Debug.Print Hex$(bmp.Pixel(27, 27).G) ' 0 +Debug.Print Hex$(bmp.Pixel(31, 15).G) ' FF +``` + +## See Also + +- [ITransformable](ITransformable) interface -- the members that **Matrix** shares with **Graphics** and the brushes +- [GraphicsPath](GraphicsPath) class -- **Transform** applies a matrix to a path +- [Region](Region) class -- **Transform** applies a matrix to a region +- [GpMatrixOrder](Enumerations/GpMatrixOrder) enumeration +- [Matrix class](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusmatrix/nl-gdiplusmatrix-matrix) -- Microsoft's documentation of the GDI+ class diff --git a/docs/Reference/Contributed/GdiPlus/Metafile.md b/docs/Reference/Contributed/GdiPlus/Metafile.md new file mode 100644 index 00000000..2f4a848a --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Metafile.md @@ -0,0 +1,260 @@ +--- +title: Metafile +parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Metafile +--- + +# Metafile class +{: .no_toc } + +A picture stored as a sequence of drawing commands: a Windows metafile (WMF), an enhanced metafile (EMF) or an EMF+ metafile. + +A **Metafile** inherits every member of [**Image**](Image), so it can be drawn with [**Graphics.DrawImage**](Graphics#drawimage), and it scales without losing quality because it holds commands, not pixels. A program can also record one: a [**Graphics**](Graphics) created from a **Metafile** that is being recorded writes its drawing commands into it. The class mirrors the GDI+ [Metafile](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusheaders/nl-gdiplusheaders-metafile) class. + +* TOC +{:toc} + +## Creating + +Syntax: *mf* **= Metafile**( *hEmf* [ , *deleteEmf* ] ) + +Syntax: *mf* **= Metafile**( *hWmf*, *header* [ , *deleteWmf* ] ) + +Syntax: *mf* **= Metafile**( *filename* ) + +Syntax: *mf* **= Metafile**( *filename*, *header* ) + +Syntax: *mf* **= Metafile**( *stream* ) + +Syntax: *mf* **= Metafile**( *referenceHdc* [ , *type* [ , *description* ] ] ) + +Syntax: *mf* **= Metafile**( *referenceHdc*, *frameRect* [ , *frameUnit* [ , *type* [ , *description* ] ] ] ) + +Syntax: *mf* **= Metafile**( *filename*, *referenceHdc* [ , ... ] ) + +Syntax: *mf* **= Metafile**( *stream*, *referenceHdc* [ , ... ] ) + +Each form is also available as **New Metafile**( ... ) with the same arguments. + +The first five forms play back an existing metafile: + +*hEmf*, *deleteEmf* +: *required* The handle of an enhanced metafile, and a **Boolean** that is **True** when GDI+ should delete the handle together with the **Metafile**. The default is **False**. + +*hWmf*, *header*, *deleteWmf* +: *required* The handle of a Windows metafile, the [**WmfPlaceableFileHeader**](Types/WmfPlaceableFileHeader) that gives its position and scale, and a **Boolean** as above. + +*filename*, *stream* +: *required* A **String** naming a metafile, or an **IStream** to read one from. The *header* form reads a WMF file that has no placeable header. + +The other forms record a new metafile: + +*referenceHdc* +: *required* A device context whose resolution and capabilities the metafile is recorded for. + +*frameRect* +: *optional* A [**GpRect**](Types/GpRect) or [**GpRectF**](Types/GpRectF): the frame of the picture, in *frameUnit*. Without it, GDI+ uses the size of the device. + +*frameUnit* +: *optional* A [**GpMetafileFrameUnit**](Enumerations/GpMetafileFrameUnit). The default is **MetafileFrameUnitGdi**, hundredths of a millimetre. + +*type* +: *optional* A [**GpEmfType**](Enumerations/GpEmfType): **EmfTypeEmfOnly**, **EmfTypeEmfPlusOnly** or **EmfTypeEmfPlusDual**, the default. + +*description* +: *optional* A **String** stored in the metafile. + +With a *filename* or a *stream* in front, the recording is written there as it is made. + +A constructor that fails creates an unusable object whose **LastResult** tells why. + +> [!WARNING] 0.9.45.0 +> The constructors that take a file name (`Metafile(filename)`, `Metafile(filename, header)`, and the recording forms with a file name) and the forms that record with a *referenceHdc* and a *type* raise run-time error 13 (*Type mismatch*): they pass a **String** to a GDI+ function that expects a pointer. An unhandled error ends the program. `Metafile(referenceHdc)` with nothing else does not record either: it binds to the *hEmf* form, treats the device context as a metafile handle, and returns an unusable object with **LastResult** 1 (**GenericError**). Of the constructors, the *hEmf* and *hWmf* forms work. To load a metafile from a file, use [**Image**](Image#creating): `GdiPlus.Image(filename)` returns an **Image** whose [**Type**](Image#type) is **ImageTypeMetafile**, which can be drawn, and whose header [**GetMetafileHeader**](#metafileheader) reads. + +The metafile in the example comes from GDI: the module creates an enhanced metafile with a rectangle in it, and the **Metafile** plays it back. + +```tb check_build slot=file projname=gdiplus-metafile +Module GdiMetafile + Private Declare PtrSafe Function CreateEnhMetaFileW Lib "gdi32" (ByVal hdcRef As LongPtr, ByVal fileName As LongPtr, ByVal rc As LongPtr, ByVal desc As LongPtr) As LongPtr + Private Declare PtrSafe Function CloseEnhMetaFile Lib "gdi32" (ByVal hdc As LongPtr) As LongPtr + Private Declare PtrSafe Function Rectangle Lib "gdi32" (ByVal hdc As LongPtr, ByVal l As Long, ByVal t As Long, ByVal r As Long, ByVal b As Long) As Long + Private Declare PtrSafe Function CreateSolidBrush Lib "gdi32" (ByVal c As Long) As LongPtr + Private Declare PtrSafe Function SelectObject Lib "gdi32" (ByVal hdc As LongPtr, ByVal h As LongPtr) As LongPtr + Private Declare PtrSafe Function DeleteObject Lib "gdi32" (ByVal h As LongPtr) As Long + + ' Returns the handle of an enhanced metafile with one red rectangle. + Public Function MakeRedRectangleEmf(ByVal width As Long, ByVal height As Long) As LongPtr + Dim dc As LongPtr = CreateEnhMetaFileW(0, 0, 0, 0) + Dim brush As LongPtr = CreateSolidBrush(&HFF) ' a COLORREF: red + Dim old As LongPtr = SelectObject(dc, brush) + Rectangle dc, 0, 0, width, height + SelectObject dc, old + DeleteObject brush + Return CloseEnhMetaFile(dc) + End Function +End Module +``` + +```tb check_build check_run projname=gdiplus-metafile +Dim user As GdiPlusUser = GdiPlusUser() + +Dim hemf As LongPtr = GdiMetafile.MakeRedRectangleEmf(40, 30) +Dim mf As Metafile = Metafile(hemf, True) ' the Metafile deletes the handle +Debug.Print mf.LastResult & " " & mf.Type & " " & mf.Width & " " & mf.Height + +Dim bmp As Bitmap = Bitmap(60!, 50!) +Dim g As Graphics = Graphics(bmp) +g.Clear(Color(255, 255, 255, 255)) +g.DrawImage mf, 5, 5 +Debug.Print Hex$(bmp.Pixel(20, 20).argb) +Debug.Print Hex$(bmp.Pixel(55, 45).argb) +' Output: +' 0 2 40 30 +' FFFF0000 +' FFFFFFFF +``` + +### Clone + +Syntax: *copy* **=** *mf*.**Clone**( ) + +Returns a new **Metafile** that plays back the same commands. + +## Information + +### MetafileHeader + +Syntax: *header* **=** *mf*.**MetafileHeader** + +Returns the [**MetafileHeader**](Types/MetafileHeader) of the metafile: its kind, size, resolution and bounds. The property is read-only. The functions **GetMetafileHeader**, **GetMetafileHeaderFromEmf** and **GetMetafileHeaderFromWmf** read the header of a file, a handle or a stream without making a **Metafile**. + +### DownLevelRasterizationLimit + +Syntax: *dpi* **=** *mf*.**DownLevelRasterizationLimit** [ **=** *dpi* ] + +Gets or sets the resolution, in dots per inch, at which GDI+ rasterizes the parts of an EMF+ metafile that a down-level reader (one that knows only EMF) cannot draw. It matters for a metafile recorded for a printer that is to be drawn on the screen: set it to the screen resolution, 96 or 120. The value 0 means the resolution of the device. + +### GetHENHMETAFILE + +Syntax: *hEmf* **=** *mf*.**GetHENHMETAFILE**( ) + +Returns a handle to an enhanced metafile with the commands of the **Metafile**. The **Metafile** is no longer usable afterwards, and the program must delete the handle with the GDI function `DeleteEnhMetaFile`. + +```tb check_build check_run projname=gdiplus-metafile +Dim user As GdiPlusUser = GdiPlusUser() + +Dim mf As Metafile = Metafile(GdiMetafile.MakeRedRectangleEmf(40, 30), True) +Dim header As MetafileHeader = mf.MetafileHeader +Debug.Print header.IsEmf & " " & header.IsEmfPlus & " " & header.IsWmf +Debug.Print header.Width & " " & header.Height + +Dim copy As Metafile = mf.Clone() +Debug.Print copy.Width + +Dim hemf As LongPtr = mf.GetHENHMETAFILE() +Debug.Print hemf <> 0 +Debug.Print mf.Width ' unusable now +' Output: +' True False False +' 40 30 +' 40 +' True +' 0 +``` + +## Playing and converting + +### PlayRecord + +Syntax: *status* **=** *mf*.**PlayRecord**( *recordType*, *flags*, *dataSize*, *data* ) + +*recordType* +: *required* A [**GpEmfPlusRecordType**](Enumerations/GpEmfPlusRecordType). + +*flags* +: *required* The flags of the record, a **Long**. + +*dataSize* +: *required* The size of *data* in bytes. + +*data* +: *required* The first **Byte** of the record data, passed by reference. The data must be aligned to 4 bytes for an EMF or EMF+ metafile and to 2 bytes for a WMF. + +Plays one record. A program calls it from the callback of [**Graphics.EnumerateMetafile**](Graphics#enumeratemetafile), which hands it each record of the metafile in turn, to draw a record or to change it first. + +### ConvertToEmfPlus + +Syntax: *status* **=** *mf*.**ConvertToEmfPlus**( *refGraphics*, *filename* [ , *conversionFailureFlag* [ , *emfType* [ , *description* ] ] ] ) + +Syntax: *status* **=** *mf*.**ConvertToEmfPlus**( *refGraphics*, *stream* [ , *conversionFailureFlag* [ , *emfType* [ , *description* ] ] ] ) + +Syntax: *status* **=** *mf*.**ConvertToEmfPlus**( *refGraphics* [ , *conversionFailureFlag* [ , *emfType* [ , *description* ] ] ] ) + +*refGraphics* +: *required* A [**Graphics**](Graphics) that gives the resolution to convert for. + +*filename*, *stream* +: A **String** or an **IStream** that receives the converted metafile. + +*conversionFailureFlag* +: *optional* A **Long** that receives a [**GpConvertToEmfPlusFlags**](Enumerations/GpConvertToEmfPlusFlags) value telling why a record could not be converted. + +*emfType* +: *optional* A [**GpEmfType**](Enumerations/GpEmfType). The default is **EmfTypeEmfPlusOnly**. + +*description* +: *optional* A **String** stored in the metafile. + +Converts an EMF metafile into an EMF+ metafile. The **Metafile** itself becomes the converted one. It needs GDI+ 1.1 (Windows 7 or later). + +> [!WARNING] 0.9.45.0 +> The form without a file name or a stream raises run-time error 13 (*Type mismatch*), as the constructors above do. The *filename* form works. + +```tb check_build check_run projname=gdiplus-metafile +Dim user As GdiPlusUser = GdiPlusUser() + +Dim mf As Metafile = Metafile(GdiMetafile.MakeRedRectangleEmf(40, 30), True) +Dim bmp As Bitmap = Bitmap(10!, 10!) +Dim g As Graphics = Graphics(bmp) + +Dim path As String = Environ$("TEMP") & "\tbdocs-gdiplus-converted.emf" +Debug.Print mf.ConvertToEmfPlus(g, path) +Debug.Print mf.MetafileHeader.IsEmfPlus +' Output: +' 0 +' True +``` + +## Example + +The example reads the header of a metafile and draws it twice, at two sizes. The metafile scales without losing its sharp edges. + +```tb check_build check_run projname=gdiplus-metafile +Dim user As GdiPlusUser = GdiPlusUser() + +Dim mf As Metafile = Metafile(GdiMetafile.MakeRedRectangleEmf(40, 30), True) +Dim bmp As Bitmap = Bitmap(80!, 30!) +Dim g As Graphics = Graphics(bmp) +g.Clear(Color(255, 255, 255, 255)) + +g.DrawImage mf, 0, 0, 40, 30 ' at its own size +g.DrawImage mf, 42, 0, 20, 15 ' half size + +Debug.Print Hex$(bmp.Pixel(10, 10).argb) +Debug.Print Hex$(bmp.Pixel(50, 10).argb) +Debug.Print Hex$(bmp.Pixel(50, 25).argb) +' Output: +' FFFF0000 +' FFFF0000 +' FFFFFFFF +``` + +## See Also + +- [Metafile](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusheaders/nl-gdiplusheaders-metafile) -- Microsoft's documentation of the GDI+ class +- [Image](Image) class +- [Graphics](Graphics) class +- [MetafileHeader](Types/MetafileHeader) type +- [WmfPlaceableFileHeader](Types/WmfPlaceableFileHeader) type +- [GpMetafileFrameUnit](Enumerations/GpMetafileFrameUnit) enumeration +- [GpEmfType](Enumerations/GpEmfType) enumeration diff --git a/docs/Reference/Contributed/GdiPlus/PathData.md b/docs/Reference/Contributed/GdiPlus/PathData.md new file mode 100644 index 00000000..b0ce058f --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/PathData.md @@ -0,0 +1,164 @@ +--- +title: PathData +parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/PathData +--- + +# PathData class +{: .no_toc } + +A **PathData** holds the points of a path and their types in two arrays of equal length, in memory that it allocates and frees. + +The two arrays are the same pair that a [**GraphicsPath**](GraphicsPath) stores: the n-th point is a [**GpPointF**](Types/GpPointF), and the n-th type is a [**PathPointType**](Types/PathPointType) that says whether the point starts a figure, ends a line or belongs to a curve. Indexes are counted from 1. A [**TypedPoint**](Types/TypedPoint) bundles a point with its type. + +The memory is released when the **PathData** object is. It is not cleared when it is allocated, so a point or a type holds an arbitrary value until it is set. + +Two members of the package are meant to exchange a **PathData** with a path: the constructor [**GraphicsPath**](GraphicsPath#creating) that takes one, and the property [**GraphicsPath.PathData**](GraphicsPath#pathdata). Neither works in this version, so a **PathData** is at present a container filled and read by the program. + +A call that fails records its status in **LastResult**, as every object of the package does. See [**GdiPlusBase**](GdiPlusBase). + +## Creating + +Syntax: *data* **= PathData(** *count* **)** + +Syntax: *data* **= PathData(** *typedPoints*() **)** + +Syntax: *data* **= New PathData** + +*count* +: *required* The number of points to allocate room for. + +*typedPoints* +: *required* An array of [**TypedPoint**](Types/TypedPoint). The new object holds a copy of each, in the order of the array, at the indexes 1 to the length of the array. + +**New PathData** with no arguments creates an object with room for no points. The function form has no version without arguments. Call [**Allocate**](#allocate) to give it room. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim a As PathData = PathData(3) +Dim b As PathData = New PathData +Debug.Print a.Count & " " & b.Count ' 3 0 +``` + +## Members + +### Count +{: .no_toc } + +Syntax: *data*.**Count** **As Long** + +The number of points the object has room for. + +### Allocate +{: .no_toc } + +Syntax: *data*.**Allocate(** *count* **)** **As GpStatus** + +Frees the arrays and allocates new ones for *count* points. The old values are lost, and a view taken with **Points** or **Types** is no longer valid. The new memory is not cleared. A *count* of 0 leaves the object empty. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim d As PathData = New PathData +Debug.Print d.Allocate(5) & " " & d.Count ' 0 5 +``` + +### Point +{: .no_toc } + +Syntax: *data*.**Point(** *index* **)** [ **=** *point* ] + +Reads or sets the point with the given index, a [**GpPointF**](Types/GpPointF). Reading an index outside 1 to **Count** returns a point at 0, 0. + +> [!WARNING] 0.9.45.0 +> Reading **Point** stops a 32-bit program with an access violation, whatever the index is, as long as it is in range. A 64-bit program reads correctly. The same is true of **TypedPoint** and of **TypedPoints**, which read points through it. In a program that is built in both widths, read the points with [**Points**](#points), which works in both. + +> [!WARNING] 0.9.45.0 +> Setting **Point**, **Type** or **TypedPoint** does not check the index. A value outside 1 to **Count** is written to the memory next to the arrays and raises no error. + +### Type +{: .no_toc } + +Syntax: *data*.**Type(** *index* **)** [ **=** *type* ] + +Reads or sets the [**PathPointType**](Types/PathPointType) of the point with the given index. Reading an index outside 1 to **Count** returns a type of 0. + +### TypedPoint +{: .no_toc } + +Syntax: *data*.**TypedPoint(** *index* **)** [ **=** *typedPoint* ] + +Reads or sets a point and its type together, as a [**TypedPoint**](Types/TypedPoint). See the warning under **Point**. + +### Points +{: .no_toc } + +Syntax: *data*.**Points** **As GpPointF()** + +Returns the points as an array, with indexes 1 to **Count**. The array is a *view* of the object's memory, not a copy: reading it shows the points as they are, and the view is valid only while the object exists and until the next call of **Allocate**. Use it to read points in both 32-bit and 64-bit programs. + +### Types +{: .no_toc } + +Syntax: *data*.**Types** **As PathPointType()** + +Returns the types as an array, a view of the memory as **Points** is. + +### TypedPoints +{: .no_toc } + +Syntax: *data*.**TypedPoints** **As TypedPoint()** + +Returns a copy of the points and types as an array of [**TypedPoint**](Types/TypedPoint), with indexes 1 to **Count**. See the warning under **Point**. + +### PointsPtr and TypesPtr +{: .no_toc } + +Syntax: *data*.**PointsPtr** **As LongPtr** + +Syntax: *data*.**TypesPtr** **As LongPtr** + +The addresses of the first point and of the first type, for a call of a Windows function. The address is 0 when the object has no room. + +The example fills a **PathData** and reads it through the views: + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim d As PathData = PathData(3) +d.Point(1) = GpPointF(3, 4) +d.Point(2) = GpPointF(5, 6) +d.Point(3) = GpPointF(7, 8) + +Dim t As PathPointType +t._value = PathPointTypeLine +d.Type(1) = t +d.Type(2) = t +d.Type(3) = t + +Dim pts() As GpPointF = d.Points +Dim ty() As PathPointType = d.Types +Debug.Print LBound(pts) & " " & UBound(pts) ' 1 3 +Debug.Print pts(2).X & "," & pts(2).Y & " " & ty(2)._value ' 5,6 1 +``` + +A **PathData** is also created from an array of typed points: + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim tp(1 To 3) As TypedPoint +tp(1).pos = GpPointF(0, 0) +tp(2).pos = GpPointF(10, 0) +tp(3).pos = GpPointF(10, 10) +tp(2).type._value = PathPointTypeLine +tp(3).type._value = PathPointTypeLine + +Dim d As PathData = PathData(tp) +Dim pts() As GpPointF = d.Points +Debug.Print d.Count & " " & pts(3).X & "," & pts(3).Y ' 3 10,10 +``` + +## See Also + +- [GraphicsPath](GraphicsPath) class +- [PathIterator](PathIterator) class +- [TypedPoint](Types/TypedPoint) and [PathPointType](Types/PathPointType) -- the types of the elements +- [GraphicsPath::GetPathData](https://learn.microsoft.com/en-us/windows/win32/api/gdipluspath/nf-gdipluspath-graphicspath-getpathdata) -- Microsoft's documentation of the GDI+ method that fills the corresponding structure diff --git a/docs/Reference/Contributed/GdiPlus/PathGradientBrush.md b/docs/Reference/Contributed/GdiPlus/PathGradientBrush.md new file mode 100644 index 00000000..a02f4694 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/PathGradientBrush.md @@ -0,0 +1,440 @@ +--- +title: PathGradientBrush +parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/PathGradientBrush +--- + +# PathGradientBrush class +{: .no_toc } + +A brush that fills a shape with a colour that changes from a centre point to the edge of a path. + +A **PathGradientBrush** implements [**IBrush**](IBrush) and [**ITransformable**](ITransformable). It is made from a closed path, either a list of points or a [**GraphicsPath**](GraphicsPath). The centre colour is at the centre point of the path, the surround colours are on its boundary, and the colour between them changes at a constant rate. Where the brush is used outside its path, the [wrap mode](#wrapmode) says what is drawn. The class mirrors the GDI+ [PathGradientBrush](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusbrush/nl-gdiplusbrush-pathgradientbrush) class. + +* TOC +{:toc} + +## Creating + +Syntax: *brush* **= PathGradientBrush**( *points* [, *wrapMode*] ) + +Syntax: *brush* **= PathGradientBrush**( *path* ) + +Each form can also be written with **New**: *brush* **= New PathGradientBrush**( ... ). The two are one thing. + +*points* +: *required* An array of **GpPointF** or of **GpPoint**: the corners of the path. The array can start at any index. + +*wrapMode* +: *optional* A [**GpWrapMode**](Enumerations/GpWrapMode) value for what is drawn outside the path. The default is **WrapModeClamp**. + +*path* +: *required* A [**GraphicsPath**](GraphicsPath) whose figure is the shape of the gradient. + +A new brush has the centre point at the centroid of the path and a black centre colour. Set the colours before the brush is used. + +> [!NOTE] 0.9.45.0 +> The form with points does not report a failure. A list that GDI+ cannot use, such as a single point, gives a brush whose **LastResult** is **Ok**; every later call on it fails with **InvalidParameter**. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim corners(0 To 3) As GpPointF +corners(0) = GpPointF(0, 0): corners(1) = GpPointF(10, 0) +corners(2) = GpPointF(10, 10): corners(3) = GpPointF(0, 10) + +Dim brush As PathGradientBrush = New PathGradientBrush(corners) +brush.CenterColor = Color(255, 255, 255, 255) + +Dim edge(1 To 1) As Color +edge(1) = Color(255, 0, 0, 0) +brush.SurroundColors = edge + +Dim bmp As Bitmap = Bitmap(10!, 10!) +Dim g As Graphics = Graphics(bmp) +g.FillRectangle(brush, 0, 0, 10, 10) + +Debug.Print brush.PointCount & " " & brush.CenterPoint.X & " " & brush.CenterPoint.Y +Debug.Print Hex$(bmp.Pixel(0, 5).R) & " " & Hex$(bmp.Pixel(2, 5).R) & " " & Hex$(bmp.Pixel(5, 5).R) +' Output: +' 4 5 5 +' 0 6A FF +``` + +### Clone + +Syntax: *copy* **=** *brush*.**Clone**( ) + +Returns a new **PathGradientBrush** with the same path, colours, blend, transformation and wrap mode. + +## Colours + +### CenterColor + +Syntax: *brush*.**CenterColor** [ **=** *color* ] + +Gets or sets the colour at the centre point, as a **Color**. + +### CenterRGB + +Syntax: *brush*.**CenterRGB** = *rgb* + +Sets the centre colour from a **Long**, as `&H00RRGGBB`. The property cannot be read. + +> [!WARNING] 0.9.45.0 +> **CenterRGB** reads its **Long** as `&H00RRGGBB`, not as a VB colour, and the alpha is always 255: `vbRed` gives blue. [**IBrush**](IBrush#colours) lists what else is not translated. Use [**CenterColor**](#centercolor). + +### SurroundColors + +Syntax: *brush*.**SurroundColors** = *colors* + +Sets the colours of the boundary. *colors* is an array of **Color**. One colour is used for the whole boundary. A longer array gives each point its own colour, in the order of the points the brush was made from, and the colour between two points changes along the boundary. The array must not have more elements than the path has points. + +> [!WARNING] 0.9.45.0 +> Reading **SurroundColors** never returns. Keep the array that was set. + +### SurroundColorCount + +Syntax: *count* **=** *brush*.**SurroundColorCount** + +Returns the number of surround colours, which is the number of points of the path. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim corners(0 To 3) As GpPointF +corners(0) = GpPointF(0, 0): corners(1) = GpPointF(10, 0) +corners(2) = GpPointF(10, 10): corners(3) = GpPointF(0, 10) + +Dim brush As PathGradientBrush = New PathGradientBrush(corners) +brush.CenterColor = Color(255, 255, 0, 0) + +Dim edge(1 To 4) As Color +edge(1) = Color(255, 0, 0, 0) +edge(2) = Color(255, 0, 255, 0) +edge(3) = Color(255, 0, 0, 255) +edge(4) = Color(255, 255, 255, 255) +brush.SurroundColors = edge +Debug.Print brush.LastResult & " " & brush.SurroundColorCount + +Dim bmp As Bitmap = Bitmap(10!, 10!) +Dim g As Graphics = Graphics(bmp) +g.FillRectangle(brush, 0, 0, 10, 10) +Debug.Print Hex$(bmp.Pixel(0, 0).argb) & " " & Hex$(bmp.Pixel(5, 5).argb) +' Output: +' 0 4 +' FF000000 FFFF0000 +``` + +## The path + +### PointCount + +Syntax: *count* **=** *brush*.**PointCount** + +Returns the number of points of the path. For a brush made from a path, these are all the points of the path, the control points of its curves included. + +### GraphicsPath + +Syntax: *brush*.**GraphicsPath** [ **=** *path* ] + +Gets or sets the path of the brush as a [**GraphicsPath**](GraphicsPath). + +> [!NOTE] 0.9.45.0 +> Reading and writing fail: GDI+ answers **NotImplemented**. Reading returns **Nothing**. + +### CenterPoint, CenterPointI + +Syntax: *brush*.**CenterPoint** [ **=** *point* ] + +Syntax: *brush*.**CenterPointI** [ **=** *point* ] + +Get or set the point that has the centre colour, as a **GpPointF** and as a **GpPoint**. The point can be moved anywhere inside the path. + +### Rectangle, RectangleI + +Syntax: *rect* **=** *brush*.**Rectangle** + +Syntax: *rect* **=** *brush*.**RectangleI** + +Return the bounding rectangle of the path, as a **GpRectF** and as a **GpRect**. + +### FocusScales + +Syntax: *brush*.**SetFocusScales**( *xScale*, *yScale* ) + +Syntax: *brush*.**GetFocusScales**( *xScale*, *yScale* ) + +Set or read the focus scales, two **Single** values. The centre colour is not at one point only: it fills a copy of the path that is shrunk about the centre point by *xScale* across and *yScale* down, and the colour changes between that copy and the boundary. The default is 0, one point. Both methods return a [**GpStatus**](Enumerations/GpStatus); **GetFocusScales** puts its results in the two variables. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim corners(0 To 3) As GpPointF +corners(0) = GpPointF(0, 0): corners(1) = GpPointF(10, 0) +corners(2) = GpPointF(10, 10): corners(3) = GpPointF(0, 10) + +Dim brush As PathGradientBrush = New PathGradientBrush(corners) +brush.CenterColor = Color(255, 255, 255, 255) +Dim edge(1 To 1) As Color +edge(1) = Color(255, 0, 0, 0) +brush.SurroundColors = edge + +Debug.Print brush.SetFocusScales(0.5, 0.5) +Dim fx As Single, fy As Single +Debug.Print brush.GetFocusScales(fx, fy) & " " & fx & " " & fy + +brush.CenterPoint = GpPointF(2, 2) +Debug.Print brush.CenterPoint.X & " " & brush.CenterPointI.X + +Dim bmp As Bitmap = Bitmap(10!, 10!) +Dim g As Graphics = Graphics(bmp) +g.FillRectangle(brush, 0, 0, 10, 10) +Debug.Print Hex$(bmp.Pixel(0, 2).R) & " " & Hex$(bmp.Pixel(1, 2).R) & " " & Hex$(bmp.Pixel(9, 2).R) +' Output: +' 0 +' 0 0.5 0.5 +' 2 2 +' 0 FF 3E +``` + +## Blends + +A blend changes how fast the colour moves from the centre colour to the surround colour. The positions of a blend run from 0 at the boundary to 1 at the centre. + +### GammaCorrection + +Syntax: *brush*.**GammaCorrection** [ **=** *useGamma* ] + +Gets or sets whether the colours are blended in a gamma-corrected space. The default is **False**. + +### BlendCount + +Syntax: *count* **=** *brush*.**BlendCount** + +Returns the number of blend factors. A new brush has 1. + +### GetBlend + +Syntax: *brush*.**GetBlend**( *blendFactors*, *blendPositions* ) + +Sizes the two **Single** arrays from 1 to **BlendCount**, fills them with the blend factors and positions, and returns a [**GpStatus**](Enumerations/GpStatus). + +### SetBlend + +Syntax: *brush*.**SetBlend**( *blendFactors*, *blendPositions* ) + +Sets the blend factors, with two **Single** arrays of the same length. This is the form that [**LinearGradientBrush**](LinearGradientBrush#setblend) has with two arrays. + +> [!WARNING] 0.9.45.0 +> **SetBlend** never returns. Use [**SetBlendBellShape**](#setblendbellshape) or [**SetBlendTriangularShape**](#setblendtriangularshape). + +### InterpolationColorCount + +Syntax: *count* **=** *brush*.**InterpolationColorCount** + +Returns the number of preset colours. A brush that has none returns 0. + +### GetInterpolationColors + +Syntax: *brush*.**GetInterpolationColors**( *presetColors*, *blendPositions* ) + +Sizes a **Color** array and a **Single** array from 1 to **InterpolationColorCount**, fills them, and returns a [**GpStatus**](Enumerations/GpStatus). It returns **WrongState** when the brush has no preset colours. + +### SetInterpolationColors + +Syntax: *brush*.**SetInterpolationColors**( *presetColors*, *blendPositions* ) + +Sets preset colours at positions, with a **Color** array and a **Single** array of the same length. + +> [!WARNING] 0.9.45.0 +> **SetInterpolationColors** never returns. + +### SetBlendBellShape + +Syntax: *brush*.**SetBlendBellShape**( *focus* [, *scale*] ) + +Makes the colour reach the centre colour at *focus*, a **Single** from 0 to 1, and fall off with a smooth bell-shaped curve. *scale*, a **Single** from 0 to 1, is how fast the colour falls off from *focus*. The default is 1. Returns a [**GpStatus**](Enumerations/GpStatus). + +### SetBlendTriangularShape + +Syntax: *brush*.**SetBlendTriangularShape**( *focus* [, *scale*] ) + +The same, with a triangle in place of the bell. The default *scale* is 1. Returns a [**GpStatus**](Enumerations/GpStatus). + +## Wrap mode + +### WrapMode + +Syntax: *brush*.**WrapMode** [ **=** *wrapMode* ] + +Gets or sets what is drawn outside the bounding rectangle of the path: a [**GpWrapMode**](Enumerations/GpWrapMode) value. + +| Value | Outside the path | +|:------|:-----------------| +| **WrapModeClamp** | Nothing is drawn. This is the default of the form with points. | +| **WrapModeTile** | The gradient repeats. | +| **WrapModeTileFlipX**, **WrapModeTileFlipY**, **WrapModeTileFlipXY** | The gradient repeats, mirrored every second time in x, in y, or in both. | + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim corners(0 To 3) As GpPointF +corners(0) = GpPointF(0, 0): corners(1) = GpPointF(10, 0) +corners(2) = GpPointF(10, 10): corners(3) = GpPointF(0, 10) + +Dim brush As PathGradientBrush = New PathGradientBrush(corners) +brush.CenterColor = Color(255, 255, 255, 255) +Dim edge(1 To 1) As Color +edge(1) = Color(255, 0, 0, 0) +brush.SurroundColors = edge + +Dim bmp As Bitmap = Bitmap(30!, 10!) +Dim g As Graphics = Graphics(bmp) +Dim modes(2) As GpWrapMode +modes(0) = WrapModeClamp: modes(1) = WrapModeTile: modes(2) = WrapModeTileFlipX + +Dim i As Long +For i = 0 To 2 + brush.WrapMode = modes(i) + g.Clear Color(255, 255, 0, 255) + g.FillRectangle(brush, 0, 0, 30, 10) + Debug.Print brush.WrapMode & " " & Hex$(bmp.Pixel(10, 5).argb) & " " & Hex$(bmp.Pixel(15, 5).argb) +Next +' Output: +' 4 FFFF00FF FFFF00FF +' 0 FF000000 FFFFFFFF +' 1 FF353535 FFCACACA +``` + +## Transformations + +The brush implements [**ITransformable**](ITransformable). Its transformation moves, scales, rotates or shears the gradient, as a matrix applies to a shape. The *order* parameter of each method is a [**GpMatrixOrder**](Enumerations/GpMatrixOrder): **MatrixOrderPrepend**, the default, applies the new operation before those the brush already has, and **MatrixOrderAppend** applies it after. Each method returns a [**GpStatus**](Enumerations/GpStatus). + +### Transform + +Syntax: *brush*.**Transform** [ **=** *matrix* ] + +Sets the transformation of the brush to a [**Matrix**](Matrix). Reading it should return a copy of the matrix. + +> [!NOTE] 0.9.45.0 +> Reading **Transform** always fails: it returns **Nothing** and **LastResult** becomes **InvalidParameter**. Use [**GetTransform**](#gettransform). + +### GetTransform + +Syntax: *brush*.**GetTransform**( *matrix* ) + +Copies the transformation of the brush into *matrix*, a **Matrix** that the caller created. + +### ResetTransform + +Syntax: *brush*.**ResetTransform**( ) + +Sets the transformation to the identity matrix. + +### MultiplyTransform + +Syntax: *brush*.**MultiplyTransform**( *matrix* [, *order*] ) + +Combines the transformation with a **Matrix**. + +### TranslateTransform + +Syntax: *brush*.**TranslateTransform**( *dx*, *dy* [, *order*] ) + +Syntax: *brush*.**TranslateTransform**( *delta* [, *order*] ) + +Moves the gradient by *dx* and *dy*, or by a **GpPointF**. + +### ScaleTransform + +Syntax: *brush*.**ScaleTransform**( *sx*, *sy* [, *order*] ) + +Scales the gradient by the factors *sx* across and *sy* down. + +### RotateTransform + +Syntax: *brush*.**RotateTransform**( *angle* [, *order*] ) + +Rotates the gradient by *angle* degrees clockwise about the origin of the drawing surface. + +### RotateTransformAt + +Syntax: *brush*.**RotateTransformAt**( *angle*, *center* [, *order*] ) + +Rotates the gradient by *angle* degrees about the **GpPointF** *center*. + +### ShearTransform + +Syntax: *brush*.**ShearTransform**( *shearX*, *shearY* [, *order*] ) + +Shears the gradient: *shearX* is the amount that x grows for each unit of y, and *shearY* the amount that y grows for each unit of x. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim corners(0 To 3) As GpPointF +corners(0) = GpPointF(0, 0): corners(1) = GpPointF(10, 0) +corners(2) = GpPointF(10, 10): corners(3) = GpPointF(0, 10) +Dim brush As PathGradientBrush = New PathGradientBrush(corners) + +brush.TranslateTransform 3, 4 +Dim m As Matrix = New Matrix() +Debug.Print brush.GetTransform(m) & " " & m.OffsetX & " " & m.OffsetY + +brush.ResetTransform +brush.GetTransform m +Debug.Print m.OffsetX & " " & m.OffsetY +' Output: +' 0 3 4 +' 0 0 +``` + +## Type + +### Type + +Syntax: *type* **=** *brush*.**Type** + +Returns **BrushTypePathGradient** ([**GpBrushType**](Enumerations/GpBrushType)). The property is read-only. + +> [!WARNING] 0.9.45.0 +> In a program that runs in the IDE, reading **Type** stops at an assertion that expects a linear gradient. A compiled program returns the right value. + +## Example + +The example makes a brush from a path, an ellipse, and fills a bitmap with it. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim path As GraphicsPath = New GraphicsPath() +path.AddEllipse 0, 0, 10, 10 + +Dim brush As PathGradientBrush = New PathGradientBrush(path) +Debug.Print brush.LastResult & " " & brush.PointCount + +brush.CenterColor = Color(255, 255, 255, 255) +Dim edge(1 To 1) As Color +edge(1) = Color(255, 0, 0, 0) +brush.SurroundColors = edge + +Dim bmp As Bitmap = Bitmap(10!, 10!) +Dim g As Graphics = Graphics(bmp) +g.Clear Color(255, 255, 0, 255) +g.FillRectangle(brush, 0, 0, 10, 10) +Debug.Print Hex$(bmp.Pixel(5, 5).argb) & " " & Hex$(bmp.Pixel(0, 0).argb) +' Output: +' 0 13 +' FFEDEDED FFFF00FF +``` + +## See Also + +- [PathGradientBrush](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusbrush/nl-gdiplusbrush-pathgradientbrush) -- Microsoft's documentation of the GDI+ class +- [IBrush](IBrush) interface +- [ITransformable](ITransformable) interface +- [LinearGradientBrush](LinearGradientBrush) class +- [GraphicsPath](GraphicsPath) class +- [Matrix](Matrix) class +- [GpWrapMode](Enumerations/GpWrapMode) enumeration diff --git a/docs/Reference/Contributed/GdiPlus/PathIterator.md b/docs/Reference/Contributed/GdiPlus/PathIterator.md new file mode 100644 index 00000000..7ab58931 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/PathIterator.md @@ -0,0 +1,298 @@ +--- +title: PathIterator +parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/PathIterator +--- + +# PathIterator class +{: .no_toc } + +A **PathIterator** reads the figures, the marker sections, the runs of points of one type, and the points of a [**GraphicsPath**](GraphicsPath), one part after another. + +A path is made of figures, which [**StartFigure**](GraphicsPath#startfigure) and [**CloseFigure**](GraphicsPath#closefigure) separate. [**SetMarker**](GraphicsPath#setmarker) divides it into sections, independently of the figures. Each point has a [**PathPointType**](Types/PathPointType). The iterator finds where each figure, section or run of points begins and ends, as indexes into the path's points, or copies the part into a new path or array. + +The indexes are counted from 0 and are inclusive: a figure from 4 to 5 has the points 4 and 5. The arrays that **Enumerate** fills are counted from 1, so index *i* of the path is element *i* + 1 of the array. + +Each kind of iteration keeps its own position. The calls of **NextSubpath** step through the figures, the calls of **NextMarker** through the sections, and **NextPathType** through the runs of the figure that **NextSubpath** returned last. **Rewind** puts every position back at the start of the path. + +Every method exists twice. The *UDT form* has no arguments and returns a user-defined type: [**NextSubpath**](#nextsubpath) returns a [**SubPath**](Types/SubPath), [**NextMarker**](#nextmarker) a [**Marker**](Types/Marker), and so on. The *direct form* has the same name, takes variables for the results, and returns the number of points as a **Long**, as the C++ class does. In both forms the number of points is 0 when the iteration has come to its end. A call that fails records its status in **LastResult**, as every object of the package does. See [**GdiPlusBase**](GdiPlusBase). + +> [!WARNING] 0.9.45.0 +> **NextSubpathPath** and **NextMarkerPath** do not work. The compiler reports a code generation error in **NextSubpathPath** whenever it compiles a project that uses **PathIterator**, though the other members still work when the program is run from the IDE. A program that calls the UDT form of either method stops at the call. The direct form returns 0 and a path that holds no GDI+ object, which stops the program at the first use. To get the points of a figure or a section, take the indexes from **NextSubpath** or **NextMarker** and read the points with **Enumerate**. + +## Creating + +Syntax: *iterator* **= PathIterator(** *path* **)** + +Syntax: *iterator* **= New PathIterator(** *path* **)** + +The function **PathIterator** and **New PathIterator** are the same thing. + +*path* +: *required* The [**GraphicsPath**](GraphicsPath) to read. + +## Properties + +### Count +{: .no_toc } + +Syntax: *iterator*.**Count** **As Long** + +The number of points in the path. + +### SubpathCount +{: .no_toc } + +Syntax: *iterator*.**SubpathCount** **As Long** + +The number of figures in the path. A path with no points has none. + +### HasCurve +{: .no_toc } + +Syntax: *iterator*.**HasCurve** **As Boolean** + +**True** when the path has at least one Bézier curve. A path that has been through [**Flatten**](GraphicsPath#flatten) has none. + +```tb check_build +Dim user As GdiPlusUser = GdiPlusUser() +Dim p As GraphicsPath = GraphicsPath() +p.AddRectangle 0, 0, 10, 10 +p.SetMarker +p.AddLine 20, 20, 30, 30 +p.StartFigure +p.AddEllipse 40, 40, 10, 10 + +Dim it As PathIterator = PathIterator(p) +Debug.Print it.Count & " " & it.SubpathCount & " " & it.HasCurve ' 19 3 True +``` + +### Rewind +{: .no_toc } + +Syntax: *iterator*.**Rewind** **As GpStatus** + +Puts all the positions back at the start of the path. + +## Figures + +### NextSubpath +{: .no_toc } + +Syntax: *iterator*.**NextSubpath** **As SubPath** + +Syntax: *iterator*.**NextSubpath(** *startIndex*, *endIndex*, *isClosed* **)** **As Long** + +*startIndex*, *endIndex* +: *required* **Long** variables that receive the index of the first and of the last point of the figure. + +*isClosed* +: *required* A **Boolean** variable that receives **True** when the figure is closed. + +Returns the next figure. The UDT form returns a [**SubPath**](Types/SubPath) with the same values and the number of points in its field *resultCount*. The direct form returns the number of points. At the end of the path both give 0 and leave the indexes as they were. + +The path of the first example has three figures. The rectangle is closed by nature, the line is open, and the ellipse is closed: + +```tb check_build +Dim user As GdiPlusUser = GdiPlusUser() +Dim p As GraphicsPath = GraphicsPath() +p.AddRectangle 0, 0, 10, 10 +p.SetMarker +p.AddLine 20, 20, 30, 30 +p.StartFigure +p.AddEllipse 40, 40, 10, 10 + +Dim it As PathIterator = PathIterator(p) +Dim sp As SubPath +Do + sp = it.NextSubpath() + If sp.resultCount = 0 Then Exit Do + Debug.Print sp.startIndex & ".." & sp.endIndex & " " & sp.isClosed +Loop +' 0..3 True +' 4..5 False +' 6..18 True +``` + +The direct form does the same with variables: + +```tb check_build +Dim user As GdiPlusUser = GdiPlusUser() +Dim p As GraphicsPath = GraphicsPath() +p.AddRectangle 0, 0, 10, 10 +p.AddLine 20, 20, 30, 30 + +Dim it As PathIterator = PathIterator(p) +Dim first As Long, last As Long, closed As Boolean, n As Long +n = it.NextSubpath(first, last, closed) +Debug.Print n & " " & first & " " & last & " " & closed ' 4 0 3 True +n = it.NextSubpath(first, last, closed) +Debug.Print n & " " & first & " " & last & " " & closed ' 2 4 5 False +n = it.NextSubpath(first, last, closed) +Debug.Print n ' 0 +``` + +### NextSubpathPath +{: .no_toc } + +Syntax: *iterator*.**NextSubpathPath** **As SubPathPath** + +Syntax: *iterator*.**NextSubpathPath(** *path*, *isClosed* **)** **As Long** + +Meant to return the next figure as a new [**GraphicsPath**](GraphicsPath), together with whether it is closed. The UDT form returns a [**SubPathPath**](Types/SubPathPath). See the warning at the top of this page: these forms do not work. + +## Sections between markers + +### NextMarker +{: .no_toc } + +Syntax: *iterator*.**NextMarker** **As Marker** + +Syntax: *iterator*.**NextMarker(** *startIndex*, *endIndex* **)** **As Long** + +Returns the next section of the path, which ends at a marker set with [**SetMarker**](GraphicsPath#setmarker), or at the end of the path. The UDT form returns a [**Marker**](Types/Marker). Sections are not the same as figures: a marker can fall in the middle of a figure, and a section can hold several figures. + +```tb check_build +Dim user As GdiPlusUser = GdiPlusUser() +Dim p As GraphicsPath = GraphicsPath() +p.AddRectangle 0, 0, 10, 10 +p.SetMarker +p.AddLine 20, 20, 30, 30 +p.StartFigure +p.AddEllipse 40, 40, 10, 10 + +Dim it As PathIterator = PathIterator(p) +Dim mk As Marker +Do + mk = it.NextMarker() + If mk.resultCount = 0 Then Exit Do + Debug.Print mk.startIndex & ".." & mk.endIndex +Loop +' 0..3 +' 4..18 +``` + +### NextMarkerPath +{: .no_toc } + +Syntax: *iterator*.**NextMarkerPath** **As MarkerPath** + +Syntax: *iterator*.**NextMarkerPath(** *path* **)** **As Long** + +Meant to return the next section as a new [**GraphicsPath**](GraphicsPath). The UDT form returns a [**MarkerPath**](Types/MarkerPath). See the warning at the top of this page: these forms do not work. + +## Runs of one type + +### NextPathType +{: .no_toc } + +Syntax: *iterator*.**NextPathType** **As PathType** + +Syntax: *iterator*.**NextPathType(** *pathType*, *startIndex*, *endIndex* **)** **As Long** + +*pathType* +: *required* A [**PathPointType**](Types/PathPointType) variable that receives the type of the run. + +*startIndex*, *endIndex* +: *required* **Long** variables that receive the index of the first and of the last point of the run. + +Returns the next group of points of the same type, within the figure that **NextSubpath** returned last. The first group includes the start point of the figure. The UDT form returns a [**PathType**](Types/PathType). + +Call **NextSubpath** first: before it, and after the last group of a figure, the call returns 0. Each figure then needs its own call of **NextSubpath**. + +```tb check_build +Dim user As GdiPlusUser = GdiPlusUser() +Dim p As GraphicsPath = GraphicsPath() +p.AddLine 0, 0, 10, 0 +p.AddBezier 10, 0, 12, 5, 14, 5, 16, 0 + +Dim it As PathIterator = PathIterator(p) +Dim sp As SubPath = it.NextSubpath() +Dim run As PathType +Do + run = it.NextPathType() + If run.resultCount = 0 Then Exit Do + Debug.Print CLng(run.type.PointType) & ": " & run.startIndex & ".." & run.endIndex +Loop +' 1: 0..1 +' 3: 1..4 +``` + +## Copying points + +### Enumerate +{: .no_toc } + +Syntax: *iterator*.**Enumerate(** [ *startIndex*, *endIndex* ] **)** **As TypedPoints** + +Syntax: *iterator*.**Enumerate(** *points*(), *types*(), [ *startIndex*, *endIndex* ] **)** **As Long** + +*points* +: *required* A dynamic array of [**GpPointF**](Types/GpPointF) that receives the points. + +*types* +: *required* A dynamic array of [**PathPointType**](Types/PathPointType) that receives their types. + +*startIndex*, *endIndex* +: *optional* The first and the last point to copy, counted from 0. Both default to -1, which copies the whole path. Giving only one of them is refused with **InvalidParameter**. + +Copies the points and their types. The UDT form returns a [**TypedPoints**](Types/TypedPoints), a structure that holds an array of [**TypedPoint**](Types/TypedPoint) and the count in *resultCount*. The direct form sizes the two arrays, with indexes from 1, and returns the count. + +> [!NOTE] 0.9.45.0 +> On an empty path both forms raise run-time error -2147467259, *Unspecified error*. Check **Count** first. + +```tb check_build +Dim user As GdiPlusUser = GdiPlusUser() +Dim p As GraphicsPath = GraphicsPath() +Dim pts(1 To 3) As GpPointF +pts(1) = GpPointF(0, 0): pts(2) = GpPointF(10, 0): pts(3) = GpPointF(10, 10) +p.AddLines pts + +Dim it As PathIterator = PathIterator(p) +Dim all As TypedPoints = it.Enumerate() +Debug.Print all.resultCount & " " & UBound(all.points) ' 3 3 +Dim part As TypedPoints = it.Enumerate(1, 2) +Debug.Print part.resultCount & " " & part.points(1).pos.X ' 2 10 +``` + +### CopyData +{: .no_toc } + +Syntax: *iterator*.**CopyData(** *startIndex*, *endIndex* **)** **As TypedPoints** + +Syntax: *iterator*.**CopyData(** *points*(), *types*(), *startIndex*, *endIndex* **)** **As Long** + +Deprecated. It does what **Enumerate** does with the two indexes; use **Enumerate**. + +## Example + +This example lists the figures of a path and, for each one, the type of its first run of points. + +```tb check_build +Dim user As GdiPlusUser = GdiPlusUser() +Dim p As GraphicsPath = GraphicsPath() +p.AddRectangle 0, 0, 10, 10 +p.AddEllipse 20, 0, 10, 10 +p.AddLine 40, 0, 50, 10 + +Dim it As PathIterator = PathIterator(p) +Dim sp As SubPath +Dim run As PathType +Do + sp = it.NextSubpath() + If sp.resultCount = 0 Then Exit Do + run = it.NextPathType() + Debug.Print "points " & sp.startIndex & ".." & sp.endIndex & ", first run of type " & CLng(run.type.PointType) +Loop +' points 0..3, first run of type 1 +' points 4..16, first run of type 3 +' points 17..18, first run of type 1 +``` + +## See Also + +- [GraphicsPath](GraphicsPath) class +- [PathData](PathData) class +- [SubPath](Types/SubPath), [Marker](Types/Marker), [PathType](Types/PathType), [TypedPoints](Types/TypedPoints) -- the types the UDT forms return +- [PathPointType](Types/PathPointType) -- the type of a point +- [GraphicsPathIterator class](https://learn.microsoft.com/en-us/windows/win32/api/gdipluspath/nl-gdipluspath-graphicspathiterator) -- Microsoft's documentation of the GDI+ class diff --git a/docs/Reference/Contributed/GdiPlus/Pen.md b/docs/Reference/Contributed/GdiPlus/Pen.md new file mode 100644 index 00000000..56a7ac54 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Pen.md @@ -0,0 +1,508 @@ +--- +title: Pen +parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Pen +--- + +# Pen class +{: .no_toc } + +Draws lines and the outlines of shapes, with a width, a colour or brush, caps, a dash pattern and a join style. + +A **Pen** is passed to the draw methods of [**Graphics**](Graphics): **DrawLine**, **DrawRectangle**, **DrawPath** and the others. A pen paints with one colour, or with any [brush](IBrush) when it is made from one, so a line can be hatched, a gradient or a texture. The class mirrors the GDI+ [Pen](https://learn.microsoft.com/en-us/windows/win32/api/gdipluspen/nl-gdipluspen-pen) class. + +* TOC +{:toc} + +## Creating + +Syntax: *pen* **= Pen**( *color* [, *width* [, *unit*]] ) + +Syntax: *pen* **= Pen**( *rgb* [, *width* [, *unit*]] ) + +Syntax: *pen* **= Pen**( *brush* [, *width*] ) + +Each form can also be written with **New**: *pen* **= New Pen**( ... ). The two are one thing. + +*color* +: *required* A **Color** for the pen. Its alpha value is kept. + +*rgb* +: *required* A **Long** for the colour, as `&H00RRGGBB`. The alpha is always 255. + +*brush* +: *required* A [**Brush**](IBrush) of any kind that the pen paints with. + +*width* +: *optional* A **Single** for the width of the pen. The default is 1. + +*unit* +: *optional* A [**GpUnit**](Enumerations/GpUnit) for the unit of *width*. The default is **UnitWorld**. + +With **UnitWorld**, the width is in the units of the drawing surface, so a transformation of the [**Graphics**](Graphics) scales the line: after **ScaleTransform** 3, 3 a pen of width 1 draws a line 3 pixels wide. With **UnitPixel**, the pen is 1 pixel wide whatever the transformation. + +> [!WARNING] 0.9.45.0 +> The *rgb* form reads its **Long** as `&H00RRGGBB`, not as a VB colour, and drops the alpha: `Pen(vbRed)` and `Pen(RGB(255, 0, 0))` draw in blue. [**IBrush**](IBrush#colours) lists what else is not translated. The same holds for [**Set**](#set) and [**RGB**](#rgb) with a **Long**. Use the **Color** forms. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim bmp As Bitmap = Bitmap(8!, 8!) +Dim g As Graphics = Graphics(bmp) +g.Clear Color(255, 255, 255, 255) + +Dim linePen As Pen = Pen(Color(255, 255, 0, 0), 3) +Debug.Print linePen.Width & " " & Hex$(linePen.Color.argb) & " " & linePen.PenType + +g.DrawLine linePen, 0, 4, 8, 4 +Debug.Print Hex$(bmp.Pixel(4, 3).argb) & " " & Hex$(bmp.Pixel(4, 5).argb) & " " & Hex$(bmp.Pixel(4, 6).argb) + +' a surface scaled by 3: the world pen is 3 pixels thick, the pixel pen 1 +Dim tall As Bitmap = Bitmap(10!, 10!) +Dim g3 As Graphics = Graphics(tall) +g3.ScaleTransform 3, 3 +Dim worldPen As Pen = Pen(Color(255, 255, 0, 0), 1) +Dim pixelPen As Pen = Pen(Color(255, 255, 0, 0), 1, UnitPixel) + +Dim y As Long, column As String +g3.Clear Color(255, 255, 255, 255) +g3.DrawLine worldPen, 0, 1.5, 3, 1.5 +For y = 0 To 9 + column = column & IIf(tall.Pixel(2, y).argb = &HFFFFFFFF, ".", "#") +Next +Debug.Print column + +column = "" +g3.Clear Color(255, 255, 255, 255) +g3.DrawLine pixelPen, 0, 1.5, 3, 1.5 +For y = 0 To 9 + column = column & IIf(tall.Pixel(2, y).argb = &HFFFFFFFF, ".", "#") +Next +Debug.Print column +' Output: +' 3 FFFF0000 0 +' FFFF0000 FFFF0000 FFFFFFFF +' ...###.... +' ....#..... +``` + +### Clone + +Syntax: *copy* **=** *pen*.**Clone**( ) + +Returns a new **Pen** with the same settings. Changing the copy does not change the original. + +## General + +### Width + +Syntax: *pen*.**Width** [ **=** *width* ] + +Gets or sets the width of the pen, a **Single**, in the unit that the pen was made with. + +### PenType + +Syntax: *type* **=** *pen*.**PenType** + +Returns a [**GpPenType**](Enumerations/GpPenType) value for what the pen paints with: **PenTypeSolidColor**, **PenTypeHatchFill**, **PenTypeTextureFill**, **PenTypePathGradient** or **PenTypeLinearGradient**. A pen made from a **SolidBrush** is a solid colour pen. The property is read-only. + +### Color + +Syntax: *pen*.**Color** [ **=** *color* ] + +Gets or sets the colour of the pen, as a **Color**. Setting it turns a pen that was made from another kind of brush into a solid colour pen. For a pen that is not of a solid colour, the value read is 0. + +### RGB + +Syntax: *pen*.**RGB** [ **=** *rgb* ] + +Gets or sets the colour as a **Long** in the form `&H00RRGGBB`. Reading it drops the alpha value, and writing it sets an opaque colour. The warning of [Creating](#creating) applies. + +### Set + +Syntax: *pen*.**Set**( *color*, *width* ) + +Syntax: *pen*.**Set**( *rgb*, *width* ) + +Sets the colour and the width in one call. The *rgb* form takes `&H00RRGGBB`. + +### Brush + +Syntax: *pen*.**Brush** [ **=** *brush* ] + +Gets or sets the [**Brush**](IBrush) that the pen paints with. Reading it returns a new brush of the same class as the one the pen was made from. + +> [!NOTE] 0.9.45.0 +> A property that returns an object, such as **Brush**, **CustomStartCap** and **CustomEndCap**, returns **Nothing** while **LastResult** is not **Ok**, even when the failure was an earlier call. Call **ClearResult** first. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim hatch As HatchBrush = New HatchBrush(HatchStyleCross, Color(255, 1, 2, 3), Color(255, 4, 5, 6)) +Dim linePen As Pen = Pen(hatch, 2) +Debug.Print linePen.PenType & " " & Hex$(linePen.Color.argb) + +Dim b As Brush = linePen.Brush +Debug.Print b.Type + +linePen.Color = Color(255, 9, 9, 9) +Debug.Print linePen.PenType & " " & Hex$(linePen.Color.argb) + +linePen.Set Color(255, 1, 2, 3), 5 +Debug.Print linePen.Width & " " & Hex$(linePen.Color.argb) + +Dim copy As Pen = linePen.Clone() +copy.Width = 7 +Debug.Print linePen.Width & " " & copy.Width +' Output: +' 1 0 +' 1 +' 0 FF090909 +' 5 FF010203 +' 5 7 +``` + +## Line caps + +A cap is the end of a line. A line has a start cap, at the first point given to the draw method, and an end cap, at the last. + +### StartCap + +Syntax: *pen*.**StartCap** [ **=** *lineCap* ] + +Gets or sets the [**GpLineCap**](Enumerations/GpLineCap) of the start of a line. The default is **LineCapFlat**. A value with the anchor flag, such as **LineCapArrowAnchor**, draws a mark that is bigger than the line; **LineCapCustom** is what the property returns when a custom cap was set. + +### EndCap + +Syntax: *pen*.**EndCap** [ **=** *lineCap* ] + +Gets or sets the [**GpLineCap**](Enumerations/GpLineCap) of the end of a line, as [**StartCap**](#startcap) does for the start. + +### DashCap + +Syntax: *pen*.**DashCap** [ **=** *lineCap* ] + +Gets or sets the cap of each dash of a dashed line. The property is declared as a **GpLineCap** and takes the values of [**GpDashCap**](Enumerations/GpDashCap), which are **DashCapFlat**, **DashCapRound** and **DashCapTriangle**. The default is flat. + +### Caps + +Syntax: *pen*.**Caps** = *lineCap* + +Sets the start cap and the end cap to the same [**GpLineCap**](Enumerations/GpLineCap). The property cannot be read. + +### SetLineCap + +Syntax: *status* **=** *pen*.**SetLineCap**( *startCap*, *endCap*, *dashCap* ) + +Sets the start cap, the end cap and the dash cap, a [**GpDashCap**](Enumerations/GpDashCap), together. Returns a [**GpStatus**](Enumerations/GpStatus). + +### CustomStartCap + +Syntax: *pen*.**CustomStartCap** [ **=** *cap* ] + +Gets or sets a [**CustomLineCap**](CustomLineCap), or an [**ArrowCap**](ArrowCap), for the start of a line. Setting one makes the start cap **LineCapCustom**. Reading returns a cap object, or **Nothing** when the pen has none. + +> [!WARNING] 0.9.45.0 +> A pen with an **ArrowCap** returns an **ArrowCap** from **CustomStartCap** that is not usable: its members report **InvalidParameter** in **LastResult** and return 0. A plain **CustomLineCap** is returned correctly. + +### CustomEndCap + +Syntax: *pen*.**CustomEndCap** [ **=** *cap* ] + +Sets a [**CustomLineCap**](CustomLineCap), or an [**ArrowCap**](ArrowCap), for the end of a line, and makes the end cap **LineCapCustom**. + +> [!WARNING] 0.9.45.0 +> Reading **CustomEndCap** raises error 91 and returns **Nothing**, and it replaces the custom start cap of the pen with the end cap: a failed read changes the pen. Only assigning works. + +The example draws a line with a round start cap and a flat end cap. **#** is a pixel of the pen. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim bmp As Bitmap = Bitmap(16!, 8!) +Dim g As Graphics = Graphics(bmp) +g.Clear Color(255, 255, 255, 255) + +Dim linePen As Pen = Pen(Color(255, 255, 0, 0), 4) +linePen.StartCap = LineCapRound +linePen.EndCap = LineCapFlat +g.DrawLine linePen, 5, 4, 11, 4 + +Dim x As Long, y As Long, row As String +For y = 2 To 5 + row = "" + For x = 0 To 15 + row = row & IIf(bmp.Pixel(x, y).argb = &HFFFFFFFF, ".", "#") + Next + Debug.Print row +Next + +Debug.Print linePen.SetLineCap(LineCapSquare, LineCapDiamondAnchor, DashCapTriangle) +Debug.Print linePen.StartCap & " " & linePen.EndCap & " " & linePen.DashCap + +linePen.Caps = LineCapRound +Debug.Print linePen.StartCap & " " & linePen.EndCap +' Output: +' .....######..... +' ....#######..... +' ...########..... +' ....#######..... +' 0 +' 1 19 3 +' 2 2 +``` + +## Dashes + +### DashStyle + +Syntax: *pen*.**DashStyle** [ **=** *style* ] + +Gets or sets the [**GpDashStyle**](Enumerations/GpDashStyle): **DashStyleSolid**, one of four predefined patterns, or **DashStyleCustom**. Setting a predefined style replaces the dash pattern of the pen. + +### DashPattern + +Syntax: *pen*.**DashPattern** [ **=** *pattern* ] + +Gets or sets the dash pattern as an array of **Single** values: the length of a dash, then of a gap, then of a dash, and so on, each as a multiple of the pen width. The array read starts at index 1. Setting a pattern sets the style to **DashStyleCustom**. + +### DashPatternCount + +Syntax: *count* **=** *pen*.**DashPatternCount** + +Returns the number of lengths in the dash pattern: 2 for **DashStyleDash** and **DashStyleDot**, and 0 for a solid line. + +### DashOffset + +Syntax: *pen*.**DashOffset** [ **=** *offset* ] + +Gets or sets how far into the pattern the line starts, a **Single** that is a multiple of the pen width. The default is 0. + +### CompoundArray + +Syntax: *pen*.**CompoundArray** [ **=** *array* ] + +A compound pen draws a line as several parallel lines. **CompoundArray** gets or sets an array of **Single** values from 0 to 1 that increase: pairs of a start and an end, as fractions of the pen width, measured from one edge. A pair is one line. The array read starts at index 1. + +### CompoundArrayCount + +Syntax: *count* **=** *pen*.**CompoundArrayCount** + +Returns the number of values of the compound array, 0 for a pen that is not compound. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim bmp As Bitmap = Bitmap(40!, 12!) +Dim g As Graphics = Graphics(bmp) +Dim linePen As Pen = Pen(Color(255, 255, 0, 0), 2) + +Dim x As Long, row As String +linePen.DashStyle = DashStyleDash +g.Clear Color(255, 255, 255, 255) +g.DrawLine linePen, 0, 6, 40, 6 +For x = 0 To 39 + row = row & IIf(bmp.Pixel(x, 5).argb = &HFFFFFFFF, ".", "#") +Next +Debug.Print row + +Dim pattern() As Single = linePen.DashPattern +Debug.Print linePen.DashPatternCount & " " & pattern(1) & " " & pattern(2) + +Dim custom(1 To 2) As Single +custom(1) = 3: custom(2) = 1 +linePen.DashPattern = custom +linePen.DashOffset = 2 +g.Clear Color(255, 255, 255, 255) +g.DrawLine linePen, 0, 6, 40, 6 +row = "" +For x = 0 To 39 + row = row & IIf(bmp.Pixel(x, 5).argb = &HFFFFFFFF, ".", "#") +Next +Debug.Print row +Debug.Print linePen.DashStyle + +Dim thick As Pen = Pen(Color(255, 255, 0, 0), 8) +Dim bands(1 To 4) As Single +bands(1) = 0: bands(2) = 0.25: bands(3) = 0.75: bands(4) = 1 +thick.CompoundArray = bands +Debug.Print thick.CompoundArrayCount + +Dim edge As Bitmap = Bitmap(12!, 12!) +Dim ge As Graphics = Graphics(edge) +ge.Clear Color(255, 255, 255, 255) +ge.DrawLine thick, 0, 6, 12, 6 +Dim y As Long +row = "" +For y = 0 To 11 + row = row & IIf(edge.Pixel(6, y).argb = &HFFFFFFFF, ".", "#") +Next +Debug.Print row +' Output: +' ######..######..######..######..######.. +' 2 3 1 +' ##..######..######..######..######..#### +' 5 +' 4 +' ..##....##.. +``` + +## Joins and alignment + +### LineJoin + +Syntax: *pen*.**LineJoin** [ **=** *lineJoin* ] + +Gets or sets the [**GpLineJoin**](Enumerations/GpLineJoin) of the corners where two lines of a path meet. The default is **LineJoinMiter**. + +### MiterLimit + +Syntax: *pen*.**MiterLimit** [ **=** *limit* ] + +Gets or sets how far a mitered corner may reach, a **Single**, as a ratio to the width of the pen. A corner that would reach further is cut off flat. The default is 10, and a value below 1 becomes 1. + +### Alignment + +Syntax: *pen*.**Alignment** [ **=** *alignment* ] + +Gets or sets the [**GpPenAlignment**](Enumerations/GpPenAlignment). With **PenAlignmentCenter**, the default, the line of a shape is centred on its edge. With **PenAlignmentInset**, the whole width of the pen lies inside the shape. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim bmp As Bitmap = Bitmap(14!, 10!) +Dim g As Graphics = Graphics(bmp) +Dim linePen As Pen = Pen(Color(255, 255, 0, 0), 2) +Debug.Print linePen.LineJoin & " " & linePen.MiterLimit & " " & linePen.Alignment + +linePen.LineJoin = LineJoinRound +linePen.MiterLimit = 4 +Debug.Print linePen.LineJoin & " " & linePen.MiterLimit + +Dim x As Long, y As Long, row As String, pass As Long +For pass = 1 To 2 + g.Clear Color(255, 255, 255, 255) + g.DrawRectangle linePen, 4, 2, 6, 6 + For y = 0 To 9 + row = "" + For x = 0 To 13 + row = row & IIf(bmp.Pixel(x, y).argb = &HFFFFFFFF, ".", "#") + Next + Debug.Print row + Next + linePen.Alignment = PenAlignmentInset +Next +' Output: +' 0 10 0 +' 2 4 +' .............. +' ....######.... +' ...########... +' ...##....##... +' ...##....##... +' ...##....##... +' ...##....##... +' ...########... +' ...########... +' .............. +' .............. +' .............. +' ....######.... +' ....######.... +' ....##..##.... +' ....##..##.... +' ....######.... +' ....######.... +' .............. +' .............. +``` + +## Transformations + +A pen has a transformation that is applied to its line. Scaling it by different factors across and down, for example, makes the line thicker in one direction. The *order* parameter of each method is a [**GpMatrixOrder**](Enumerations/GpMatrixOrder): **MatrixOrderPrepend**, the default, applies the new operation before those the pen already has, and **MatrixOrderAppend** applies it after. The methods return a [**GpStatus**](Enumerations/GpStatus). **Pen** does not implement [**ITransformable**](ITransformable) and has no **GetTransform** or **RotateTransformAt**. + +### Transform + +Syntax: *pen*.**Transform** [ **=** *matrix* ] + +Sets the transformation of the pen to a [**Matrix**](Matrix). Reading it should return a copy of the matrix. + +> [!NOTE] 0.9.45.0 +> Reading **Transform** always fails: it returns **Nothing** and **LastResult** becomes **InvalidParameter**. Keep the matrix that was set. + +### ResetTransform + +Syntax: *pen*.**ResetTransform**( ) + +Sets the transformation to the identity matrix. + +### MultiplyTransform + +Syntax: *pen*.**MultiplyTransform**( *matrix* [, *order*] ) + +Combines the transformation with a **Matrix**. + +### TranslateTransform + +Syntax: *pen*.**TranslateTransform**( *dx*, *dy* [, *order*] ) + +Syntax: *pen*.**TranslateTransform**( *delta* [, *order*] ) + +Moves the line by *dx* and *dy*, or by a **GpPointF**. + +### ScaleTransform + +Syntax: *pen*.**ScaleTransform**( *sx*, *sy* [, *order*] ) + +Scales the pen by the factors *sx* across and *sy* down. Scaling a horizontal line by (1, 3) makes it three times as thick. + +### RotateTransform + +Syntax: *pen*.**RotateTransform**( *angle* [, *order*] ) + +Rotates the pen by *angle* degrees clockwise. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim bmp As Bitmap = Bitmap(10!, 20!) +Dim g As Graphics = Graphics(bmp) +Dim tall As Pen = Pen(Color(255, 255, 0, 0), 2) +Debug.Print tall.ScaleTransform(1, 3) + +Dim y As Long, column As String +g.Clear Color(255, 255, 255, 255) +g.DrawLine tall, 0, 10, 10, 10 +For y = 0 To 19 + column = column & IIf(bmp.Pixel(5, y).argb = &HFFFFFFFF, ".", "#") +Next +Debug.Print column + +Dim m As Matrix = tall.Transform +Debug.Print tall.LastResult & " " & (m Is Nothing) + +tall.ResetTransform +g.Clear Color(255, 255, 255, 255) +g.DrawLine tall, 0, 10, 10, 10 +column = "" +For y = 0 To 19 + column = column & IIf(bmp.Pixel(5, y).argb = &HFFFFFFFF, ".", "#") +Next +Debug.Print column +' Output: +' 0 +' .......######....... +' 2 True +' .........##......... +``` + +## See Also + +- [Pen](https://learn.microsoft.com/en-us/windows/win32/api/gdipluspen/nl-gdipluspen-pen) -- Microsoft's documentation of the GDI+ class +- [Graphics](Graphics) class +- [IBrush](IBrush) interface +- [CustomLineCap](CustomLineCap) class +- [ArrowCap](ArrowCap) class +- [GpLineCap](Enumerations/GpLineCap) enumeration +- [GpDashStyle](Enumerations/GpDashStyle) enumeration +- [GpPenAlignment](Enumerations/GpPenAlignment) enumeration diff --git a/docs/Reference/Contributed/GdiPlus/PrivateFontCollection.md b/docs/Reference/Contributed/GdiPlus/PrivateFontCollection.md new file mode 100644 index 00000000..ea7073dc --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/PrivateFontCollection.md @@ -0,0 +1,72 @@ +--- +title: PrivateFontCollection +parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/PrivateFontCollection +has_toc: false +--- + +# PrivateFontCollection class +{: .no_toc } + +A set of fonts loaded from files or from memory for use by one program, without installing them. + +A **PrivateFontCollection** starts empty. [**AddFontFile**](#addfontfile) and [**AddMemoryFont**](#addmemoryfont) put fonts into it, and [**FamilyCount**](FontCollection#familycount) and [**Families**](FontCollection#families), inherited from [**FontCollection**](FontCollection), list the families that result. To draw with one of them, pass the collection as the last argument of [**FontFamily**](FontFamily) or of [**Font**](Font), with the name of the family. The class mirrors the GDI+ [PrivateFontCollection](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusheaders/nl-gdiplusheaders-privatefontcollection) class. + +Microsoft warns that a program must never load arbitrary fonts from sources it does not trust: the operating system requires elevated rights to install a font, so that every installed font is trusted. + +## Creating + +Syntax: *collection* **= PrivateFontCollection**( ) + +Syntax: *collection* **= New PrivateFontCollection** + +> [!WARNING] 0.9.45.0, BETA 1005 +> Creating a **PrivateFontCollection** raises run-time error 438, *Object doesn't support this property or method*, and the result is **Nothing**. The statement `Debug.Assert TypeOf (Me) Is PrivateFontCollection` in the class raises it. Even with that statement removed, the constructor does not store the native collection it creates, so the object has no handle and **AddFontFile**, **AddMemoryFont** and the members of **FontCollection** fail with **InvalidParameter**. The class cannot be used until a version of the package corrects both. + +## AddFontFile + +Syntax: *status* **=** *collection*.**AddFontFile**( *filename* ) + +*filename* +: *required* A **String** with the path of a font file, such as a `.ttf` or an `.otf` file. + +Adds the fonts of the file to the collection and returns a [**GpStatus**](Enumerations/GpStatus): **Ok** for success, **FileNotFound** when the file does not exist. The families of the file are in [**Families**](FontCollection#families) afterwards. + +```tb check_build +Dim user As GdiPlusUser = GdiPlusUser() + +Dim fonts As PrivateFontCollection = PrivateFontCollection() +Dim status As GpStatus = fonts.AddFontFile(Environ$("TEMP") & "\MyFont.ttf") +If status = Ok Then + Dim f As GdiPlus.Font = Font(fonts.Families(1).FamilyName, 14!, FontStyleRegular, UnitPoint, fonts) +End If +``` + +## AddMemoryFont + +Syntax: *status* **=** *collection*.**AddMemoryFont**( *memAddress*, *length* ) + +*memAddress* +: *required* A **LongPtr** with the address of the font data, such as a font file read into a **Byte** array or locked from a resource. + +*length* +: *required* A **Long** with the number of bytes at *memAddress*. + +Adds the fonts in the block of memory to the collection and returns a [**GpStatus**](Enumerations/GpStatus). GDI+ does not copy the data: the block must stay valid, and unchanged, until the collection is released. + +```tb check_build +Dim user As GdiPlusUser = GdiPlusUser() + +Dim fonts As PrivateFontCollection = PrivateFontCollection() +Dim data(0 To 65535) As Byte +' ... read the bytes of a font file into data ... +Debug.Print fonts.AddMemoryFont(VarPtr(data(0)), UBound(data) + 1) +``` + +## See Also + +- [FontCollection](FontCollection) class -- the members this class inherits +- [InstalledFontCollection](InstalledFontCollection) class -- the fonts installed on the system +- [FontFamily](FontFamily) class +- [Font](Font) class +- [PrivateFontCollection class](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusheaders/nl-gdiplusheaders-privatefontcollection) -- Microsoft's GDI+ reference diff --git a/docs/Reference/Contributed/GdiPlus/RedEyeCorrection.md b/docs/Reference/Contributed/GdiPlus/RedEyeCorrection.md new file mode 100644 index 00000000..9c9a7aba --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/RedEyeCorrection.md @@ -0,0 +1,64 @@ +--- +title: RedEyeCorrection +parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/RedEyeCorrection +--- + +# RedEyeCorrection class +{: .no_toc } + +An [**Effect**](Effect) that corrects red eyes in the rectangles of a picture that a program names. + +The effect works only inside the rectangles of its [**RedEyeCorrectionParams**](Types/RedEyeCorrectionParams). The program, or the user, finds the eyes; the effect fixes their colour. The class mirrors the GDI+ [RedEyeCorrection](https://learn.microsoft.com/en-us/windows/win32/api/gdipluseffects/nl-gdipluseffects-redeyecorrection) class and inherits the members of [**Effect**](Effect). + +* TOC +{:toc} + +## Creating + +Syntax: *fx* **= RedEyeCorrection**( ) + +Syntax: *fx* **= RedEyeCorrection**( *params* ) + +Each form is also available as **New RedEyeCorrection**( ... ) with the same arguments. + +*params* +: *required* A [**RedEyeCorrectionParams**](Types/RedEyeCorrectionParams): the number of areas and the memory that holds their rectangles. + +A constructor that fails creates an unusable object whose **LastResult** tells why. The effect created without arguments has no areas, and [**Bitmap.ApplyEffect**](Bitmap#applyeffect) refuses to apply it: the call returns 2 (**InvalidParameter**). + +> [!WARNING] 0.9.45.0 +> The form with *params* does not work. In a 64-bit program it stops the program with an access violation, and in a 32-bit program it sets **LastResult** to 2 (**InvalidParameter**), and so does a later **ApplyEffect** with the effect. The parameters are not set in either case. Setting [**Parameters**](#parameters) on an effect fails the same way. + +## Parameters + +Syntax: *fx*.**Parameters** [ **=** *params* ] + +Syntax: *params* **=** *fx*.**Parameters**( *size* ) + +Gets or sets the [**RedEyeCorrectionParams**](Types/RedEyeCorrectionParams). The setter creates the GDI+ effect again and sets the parameters on the new one, with the size `LenB(Of RedEyeCorrectionParams)` plus the size of the rectangles. + +> [!WARNING] 0.9.45.0 +> The getter returns zeros and sets **LastResult** to 2 (**InvalidParameter**) unless it is given *size*. See [**Effect**](Effect#parameters). + +The areas are described by a structure whose methods allocate and fill the rectangles; the page of [**RedEyeCorrectionParams**](Types/RedEyeCorrectionParams) shows them. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim fx As RedEyeCorrection = RedEyeCorrection() +Debug.Print fx.LastResult + +Dim bmp As Bitmap = Bitmap(10!, 10!) +Graphics(bmp).Clear(Color(255, 220, 20, 20)) +Debug.Print bmp.ApplyEffect(fx, GpRect(0, 0, 10, 10)) +' Output: +' 0 +' 2 +``` + +## See Also + +- [RedEyeCorrection](https://learn.microsoft.com/en-us/windows/win32/api/gdipluseffects/nl-gdipluseffects-redeyecorrection) -- Microsoft's documentation of the GDI+ class +- [Effect](Effect) class +- [RedEyeCorrectionParams](Types/RedEyeCorrectionParams) type diff --git a/docs/Reference/Contributed/GdiPlus/Region.md b/docs/Reference/Contributed/GdiPlus/Region.md new file mode 100644 index 00000000..801f820d --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Region.md @@ -0,0 +1,422 @@ +--- +title: Region +parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Region +--- + +# Region class +{: .no_toc } + +A **Region** describes an area of a drawing surface, of any shape, made from rectangles and paths and combined with the operations of set theory. + +Regions are used to clip drawing, with the **SetClip** methods of [**Graphics**](Graphics), to fill an area with **FillRegion**, and to test whether a point or a rectangle is inside an area. A region is stored in world coordinates, so it scales and moves with the transformation of the graphics object it is used with. A Windows GDI region is stored in device coordinates. + +A new region is *infinite*: it covers the whole plane. [**MakeEmpty**](#makeempty) turns it into an area with no points, and the combining methods [**Intersect**](#intersect), [**Union**](#union), [**Xor**](#xor), [**Exclude**](#exclude) and [**Complement**](#complement) change it by a rectangle, a path or another region. + +The methods that describe a region in terms of a drawing surface, such as **Bounds**, **IsEmpty** and **IsVisible**, take a [**Graphics**](Graphics) argument *g* for its transformation. It can be any graphics object. For **Bounds**, **IsEmpty**, **IsInfinite**, **IsEqualTo** and **GetHRGN** it must be a real object: with **Nothing** the call records **InvalidParameter** and returns an empty result. The **IsVisible** methods accept **Nothing**, which means no transformation. + +Most members return a [**GpStatus**](Enumerations/GpStatus), which is **Ok** when the call worked. A function or property that fails records its status in **LastResult**, as every object of the package does. See [**GdiPlusBase**](GdiPlusBase). Members that take coordinates have a floating-point and an integer form. The floating-point form takes **Single** values or a [**GpRectF**](Types/GpRectF) or [**GpPointF**](Types/GpPointF). The integer form takes [**GpRect**](Types/GpRect) or [**GpPoint**](Types/GpPoint), or is the method with the extra letter **I**, such as **TranslateI**. + +## Creating + +Syntax: *region* **= Region(** [ *shape* ] **)** + +Syntax: *region* **= New Region(** [ *shape* ] **)** + +The function **Region** and **New Region** are the same thing, and take the same arguments. + +*shape* +: *optional* What the region covers. Without it the region is infinite. It can be a [**GpRectF**](Types/GpRectF) or a [**GpRect**](Types/GpRect), the rectangle to cover; a [**GraphicsPath**](GraphicsPath), whose inside the region covers, as its [fill mode](GraphicsPath#fillmode) decides; or an **HRGN**, a Windows GDI region handle, passed as a **LongPtr**, which the region copies. + +Syntax: *region* **= Region(** *regionData*, *size* **)** + +*regionData* +: *required* The first byte of a **Byte** array that holds region data from [**GetData**](#getdata). + +*size* +: *required* The number of bytes of data. + +Creates a region from data that [**GetData**](#getdata) wrote earlier, which can be stored and used in another program. + +Syntax: *region* **= FromHRGN(** *hRgn* **)** + +Creates a region from a GDI region handle. It is the same as **Region(** *hRgn* **)**. The region keeps a copy: the program still owns the handle and deletes it with the GDI function **DeleteObject**. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim bmp As Bitmap = Bitmap(10!, 10!) +Dim g As Graphics = Graphics(bmp) + +Dim all As Region = Region() +Debug.Print all.IsInfinite(g) & " " & all.IsEmpty(g) ' True False +Dim box As Region = Region(GpRectF(10, 20, 30, 40)) +Debug.Print box.IsInfinite(g) & " " & box.IsVisible(15, 25, g) ' False True +``` + +### Clone +{: .no_toc } + +Syntax: *region*.**Clone** **As Region** + +Returns a new region that covers the same area. A change to one region does not change the other. + +## Combining + +### Intersect +{: .no_toc } + +Syntax: *region*.**Intersect(** *shape* **)** **As GpStatus** + +*shape* +: *required* A [**GpRectF**](Types/GpRectF), a [**GpRect**](Types/GpRect), a [**GraphicsPath**](GraphicsPath) or a **Region**. + +Changes the region to the part of it that is also inside *shape*. + +### Union +{: .no_toc } + +Syntax: *region*.**Union(** *shape* **)** **As GpStatus** + +Changes the region to everything that is inside the region, *shape* or both. + +### Xor +{: .no_toc } + +Syntax: *region*.**Xor(** *shape* **)** **As GpStatus** + +Changes the region to the parts that are inside the region or *shape* but not both. + +### Exclude +{: .no_toc } + +Syntax: *region*.**Exclude(** *shape* **)** **As GpStatus** + +Changes the region to the part of it that is not inside *shape*. + +### Complement +{: .no_toc } + +Syntax: *region*.**Complement(** *shape* **)** **As GpStatus** + +Changes the region to the part of *shape* that is not inside the region. It is **Exclude** the other way round. + +The arguments of the five methods are the same. This example starts each time from the square from 0, 0 to 50, 50 and combines it with the square from 25, 0 to 75, 50, then reads the bounds of the result: + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim bmp As Bitmap = Bitmap(10!, 10!) +Dim g As Graphics = Graphics(bmp) +Dim other As GpRectF = GpRectF(25, 0, 50, 50) +Dim b As GpRectF + +Dim r As Region = Region(GpRectF(0, 0, 50, 50)) +r.Intersect other +b = r.Bounds(g) +Debug.Print "intersect " & b.X & " " & b.Width ' intersect 25 25 + +Set r = Region(GpRectF(0, 0, 50, 50)) +r.Union other +b = r.Bounds(g) +Debug.Print "union " & b.X & " " & b.Width ' union 0 75 + +Set r = Region(GpRectF(0, 0, 50, 50)) +r.Exclude other +b = r.Bounds(g) +Debug.Print "exclude " & b.X & " " & b.Width ' exclude 0 25 + +Set r = Region(GpRectF(0, 0, 50, 50)) +r.Complement other +b = r.Bounds(g) +Debug.Print "complement " & b.X & " " & b.Width ' complement 50 25 + +Set r = Region(GpRectF(0, 0, 50, 50)) +r.Xor other +Debug.Print "xor " & r.IsVisible(10, 10, g) & " " & r.IsVisible(30, 10, g) & " " & r.IsVisible(60, 10, g) ' xor True False True +``` + +## State + +### MakeInfinite +{: .no_toc } + +Syntax: *region*.**MakeInfinite** **As GpStatus** + +Changes the region to cover the whole plane. + +### MakeEmpty +{: .no_toc } + +Syntax: *region*.**MakeEmpty** **As GpStatus** + +Changes the region to cover nothing. + +### IsEmpty and IsInfinite +{: .no_toc } + +Syntax: *region*.**IsEmpty(** *g* **)** **As Boolean** + +Syntax: *region*.**IsInfinite(** *g* **)** **As Boolean** + +**True** when the region covers nothing, or the whole plane. + +### IsEqualTo +{: .no_toc } + +Syntax: *region*.**IsEqualTo(** *other*, *g* **)** **As Boolean** + +**True** when the two regions cover the same area. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim bmp As Bitmap = Bitmap(10!, 10!) +Dim g As Graphics = Graphics(bmp) +Dim r As Region = Region() +r.MakeEmpty +Debug.Print r.IsEmpty(g) & " " & r.IsInfinite(g) ' True False +r.MakeInfinite +Debug.Print r.IsEmpty(g) & " " & r.IsInfinite(g) ' False True +Dim a As Region = Region(GpRectF(1, 2, 3, 4)) +Debug.Print a.IsEqualTo(a.Clone, g) & " " & a.IsEqualTo(r, g) ' True False +``` + +## Bounds + +### Bounds and BoundsI +{: .no_toc } + +Syntax: *region*.**Bounds(** *g* **)** **As GpRectF** + +Syntax: *region*.**BoundsI(** *g* **)** **As GpRect** + +Returns a rectangle that holds the whole region, in the coordinates of the graphics object *g*. **Bounds** returns a [**GpRectF**](Types/GpRectF), **BoundsI** a [**GpRect**](Types/GpRect) with whole numbers. + +## Moving and transforming + +### Translate and TranslateI +{: .no_toc } + +Syntax: *region*.**Translate(** *dx*, *dy* **)** **As GpStatus** + +Syntax: *region*.**Translate(** *offset* **)** **As GpStatus** + +Syntax: *region*.**TranslateI(** *dx*, *dy* **)** **As GpStatus** + +*dx*, *dy* +: *required* The distances to move by along each axis, **Single** for **Translate** and **Long** for **TranslateI**. + +*offset* +: *required* A [**GpPointF**](Types/GpPointF) or a [**GpPoint**](Types/GpPoint). + +Moves the region. + +### Transform +{: .no_toc } + +Syntax: *region*.**Transform(** *matrix* **)** **As GpStatus** + +*matrix* +: *required* A [**Matrix**](Matrix). + +Multiplies each point of the region by the matrix. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim bmp As Bitmap = Bitmap(10!, 10!) +Dim g As Graphics = Graphics(bmp) +Dim r As Region = Region(GpRectF(0, 0, 50, 50)) +r.Translate 5, 6 +Dim b As GpRectF = r.Bounds(g) +Debug.Print b.X & " " & b.Y & " " & b.Width ' 5 6 50 +Dim m As Matrix = Matrix() +m.Scale 2, 2 +r.Transform m +b = r.Bounds(g) +Debug.Print b.X & " " & b.Y & " " & b.Width ' 10 12 100 +``` + +## Hit testing + +### IsVisible +{: .no_toc } + +Syntax: *region*.**IsVisible(** *x*, *y*, *g* **)** **As Boolean** + +Syntax: *region*.**IsVisible(** *point*, *g* **)** **As Boolean** + +Syntax: *region*.**IsVisible(** *x*, *y*, *width*, *height*, *g* **)** **As Boolean** + +Syntax: *region*.**IsVisible(** *rect*, *g* **)** **As Boolean** + +Syntax: *region*.**IsVisibleI(** *x*, *y*, *g* **)** **As Boolean** + +Syntax: *region*.**IsVisibleI(** *x*, *y*, *width*, *height*, *g* **)** **As Boolean** + +With a point, **True** when the point is inside the region. With a rectangle, **True** when the rectangle and the region have a point in common. *g* can be **Nothing**. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim r As Region = Region(GpRectF(10, 10, 20, 20)) +Debug.Print r.IsVisible(15, 15, Nothing) & " " & r.IsVisible(GpPointF(5, 5), Nothing) ' True False +Debug.Print r.IsVisible(GpRectF(0, 0, 12, 12), Nothing) & " " & r.IsVisible(GpRectF(0, 0, 5, 5), Nothing) ' True False +Debug.Print r.IsVisibleI(15, 15, Nothing) ' True +``` + +## Scans + +The scans are a set of rectangles that approximate the region. A rectangular region has one; a region with curved edges has many thin ones. + +### GetRegionScansCount +{: .no_toc } + +Syntax: *region*.**GetRegionScansCount(** *matrix* **)** **As Long** + +The number of rectangles. The number can depend on the *matrix*, a [**Matrix**](Matrix), which is applied to the region first; it is normally the world-to-device transformation of a graphics object, or an identity matrix. + +### GetRegionScans and GetRegionScansI +{: .no_toc } + +Syntax: *region*.**GetRegionScans(** *matrix* **)** **As GpRectF()** + +Syntax: *region*.**GetRegionScansI(** *matrix* **)** **As GpRect()** + +Syntax: *region*.**GetRegionScans(** *matrix*, *rects*, *count* **)** **As GpStatus** + +*rects* +: *required* The first element of an array of [**GpRectF**](Types/GpRectF) or [**GpRect**](Types/GpRect) that has room for all the rectangles. Call **GetRegionScansCount** first to find out how many. + +*count* +: *required* A **Long** variable that receives the number of rectangles written. + +The array forms return the rectangles in an array with indexes from 1. The array is empty when the region has no rectangles. The last form writes into an array that the program owns. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim r As Region = Region(GpRectF(5, 6, 10, 20)) +Dim m As Matrix = Matrix() +Debug.Print r.GetRegionScansCount(m) ' 1 +Dim sc() As GpRectF = r.GetRegionScans(m) +Debug.Print sc(1).X & " " & sc(1).Y & " " & sc(1).Width & " " & sc(1).Height ' 5 6 10 20 + +Dim buf(1 To 4) As GpRectF +Dim n As Long = 4 +Debug.Print r.GetRegionScans(m, buf(1), n) & " " & n ' 0 1 +``` + +## Saving a region + +### GetDataSize +{: .no_toc } + +Syntax: *region*.**GetDataSize** **As Long** + +The number of bytes that [**GetData**](#getdata) writes. + +### GetData +{: .no_toc } + +Syntax: *region*.**GetData(** *buffer*, *bufferSize*, [ *sizeFilled* ] **)** **As GpStatus** + +*buffer* +: *required* The first byte of a **Byte** array with at least *bufferSize* bytes. + +*bufferSize* +: *required* The size of the array, in bytes. It should be at least **GetDataSize**. + +*sizeFilled* +: *optional* A **Long** variable that receives the number of bytes written. + +Writes a description of the region into the array. A program creates a region from the data again with the constructor that takes data. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim bmp As Bitmap = Bitmap(10!, 10!) +Dim g As Graphics = Graphics(bmp) +Dim r As Region = Region(GpRectF(5, 6, 10, 20)) +Dim size As Long = r.GetDataSize +Dim data() As Byte +ReDim data(0 To size - 1) +Dim filled As Long +r.GetData data(0), size, filled +Debug.Print (filled = size) ' True + +Dim copy As Region = Region(data(0), filled) +Dim b As GpRectF = copy.Bounds(g) +Debug.Print b.X & " " & b.Y & " " & b.Width & " " & b.Height ' 5 6 10 20 +``` + +## Windows regions + +### GetHRGN +{: .no_toc } + +Syntax: *region*.**GetHRGN(** *g* **)** **As LongPtr** + +Creates a Windows GDI region with the same area, in device coordinates, and returns its handle. The program owns the handle and deletes it with the GDI function **DeleteObject**. The handle is 0 if the call fails. + +The two directions use the GDI functions **CreateRectRgn**, **GetRgnBox** and **DeleteObject**, which the example declares: + +```tb hidden slot=module +Declare PtrSafe Function CreateRectRgn Lib "gdi32" (ByVal x1 As Long, ByVal y1 As Long, ByVal x2 As Long, ByVal y2 As Long) As LongPtr +Declare PtrSafe Function DeleteObject Lib "gdi32" (ByVal h As LongPtr) As Long +Declare PtrSafe Function GetRgnBox Lib "gdi32" (ByVal h As LongPtr, ByRef r As Long) As Long +``` + +```tb inert=excerpt +Declare PtrSafe Function CreateRectRgn Lib "gdi32" (ByVal x1 As Long, ByVal y1 As Long, ByVal x2 As Long, ByVal y2 As Long) As LongPtr +Declare PtrSafe Function DeleteObject Lib "gdi32" (ByVal h As LongPtr) As Long +Declare PtrSafe Function GetRgnBox Lib "gdi32" (ByVal h As LongPtr, ByRef r As Long) As Long +``` + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim bmp As Bitmap = Bitmap(100!, 100!) +Dim g As Graphics = Graphics(bmp) + +Dim h As LongPtr = CreateRectRgn(10, 20, 40, 60) +Dim r As Region = FromHRGN(h) +DeleteObject h ' the region keeps a copy +Dim b As GpRectF = r.Bounds(g) +Debug.Print b.X & " " & b.Y & " " & b.Width & " " & b.Height ' 10 20 30 40 + +Dim h2 As LongPtr = r.GetHRGN(g) +Dim box(0 To 3) As Long ' left, top, right, bottom +GetRgnBox h2, box(0) +Debug.Print box(0) & " " & box(1) & " " & box(2) & " " & box(3) ' 10 20 40 60 +DeleteObject h2 +``` + +## Example + +This example builds a ring from two ellipses, draws it, and tests two points. It then clips the drawing with the ring. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim bmp As Bitmap = Bitmap(40!, 40!) +Dim g As Graphics = Graphics(bmp) +g.Clear Color(255, 255, 255, 255) + +Dim outer As GraphicsPath = GraphicsPath() +outer.AddEllipse 2, 2, 36, 36 +Dim inner As GraphicsPath = GraphicsPath() +inner.AddEllipse 10, 10, 20, 20 +Dim ring As Region = Region(outer) +ring.Exclude inner + +Dim blue As SolidBrush = New SolidBrush(Color(255, 0, 0, 255)) +g.FillRegion blue, ring +Debug.Print Hex$(bmp.Pixel(20, 5).R) & " " & Hex$(bmp.Pixel(20, 5).B) ' 0 FF +Debug.Print Hex$(bmp.Pixel(20, 20).R) & " " & Hex$(bmp.Pixel(20, 20).B) ' FF FF + +g.SetClip ring +g.Clear Color(255, 255, 0, 0) +Debug.Print Hex$(bmp.Pixel(20, 5).G) & " " & Hex$(bmp.Pixel(20, 20).G) ' 0 FF +Debug.Print ring.IsVisible(20, 5, g) & " " & ring.IsVisible(20, 20, g) ' True False +``` + +## See Also + +- [GraphicsPath](GraphicsPath) class -- a path can become a region +- [Matrix](Matrix) class -- the transformation applied by **Transform** +- [Graphics](Graphics) class -- **FillRegion** and **SetClip** use a region +- [GpCombineMode](Enumerations/GpCombineMode) enumeration -- the combining operations as the **SetClip** methods name them +- [Region class](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusheaders/nl-gdiplusheaders-region) -- Microsoft's documentation of the GDI+ class diff --git a/docs/Reference/Contributed/GdiPlus/Sharpen.md b/docs/Reference/Contributed/GdiPlus/Sharpen.md new file mode 100644 index 00000000..e2e2dd3f --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Sharpen.md @@ -0,0 +1,85 @@ +--- +title: Sharpen +parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Sharpen +--- + +# Sharpen class +{: .no_toc } + +An [**Effect**](Effect) that sharpens a picture. + +Sharpening makes the difference between a pixel and its neighbours larger, which brings out edges. The class mirrors the GDI+ [Sharpen](https://learn.microsoft.com/en-us/windows/win32/api/gdipluseffects/nl-gdipluseffects-sharpen) class and inherits the members of [**Effect**](Effect). + +* TOC +{:toc} + +## Creating + +Syntax: *fx* **= Sharpen**( ) + +Syntax: *fx* **= Sharpen**( *params* ) + +Syntax: *fx* **= Sharpen**( *radius*, *amount* ) + +Each form is also available as **New Sharpen**( ... ) with the same arguments. + +*params* +: *required* A [**SharpenParams**](Types/SharpenParams) for the parameters. + +*radius* +: *required* A **Single** from 0 to 255: the number of pixels around a pixel that the effect looks at. A larger radius sharpens broader features. + +*amount* +: *required* A **Single** from 0 to 100: the strength. 0 changes nothing, and 100 is the strongest. + +A constructor that fails creates an unusable object whose **LastResult** tells why. + +## Parameters + +Syntax: *fx*.**Parameters** [ **=** *params* ] + +Syntax: *params* **=** *fx*.**Parameters**( *size* ) + +Gets or sets the [**SharpenParams**](Types/SharpenParams). + +> [!WARNING] 0.9.45.0 +> The getter returns zeros and sets **LastResult** to 2 (**InvalidParameter**) unless it is given *size*, the size of the structure: `fx.Parameters(LenB(Of SharpenParams))`. See [**Effect**](Effect#parameters). + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim fx As Sharpen = Sharpen(5!, 50!) +Dim p As SharpenParams = fx.Parameters(LenB(Of SharpenParams)) +Debug.Print fx.LastResult & " " & p.radius & " " & p.amount +' Output: +' 0 5 50 +``` + +## Example + +A sharpened edge overshoots: the light side gets lighter and the dark side darker. The example sharpens a picture whose left half is dark gray and whose right half is light gray. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim bmp As Bitmap = Bitmap(10!, 4!) +Dim g As Graphics = Graphics(bmp) +Dim dark As SolidBrush = SolidBrush(Color(255, 100, 100, 100)) +Dim light As SolidBrush = SolidBrush(Color(255, 150, 150, 150)) +g.FillRectangle dark, 0, 0, 5, 4 +g.FillRectangle light, 5, 0, 5, 4 + +Debug.Print bmp.ApplyEffect(Sharpen(2!, 100!), GpRect(0, 0, 10, 4)) +Debug.Print (bmp.Pixel(4, 2).R < 100) & " " & (bmp.Pixel(5, 2).R > 150) +' Output: +' 0 +' True True +``` + +## See Also + +- [Sharpen](https://learn.microsoft.com/en-us/windows/win32/api/gdipluseffects/nl-gdipluseffects-sharpen) -- Microsoft's documentation of the GDI+ class +- [Effect](Effect) class +- [Blur](Blur) class +- [SharpenParams](Types/SharpenParams) type diff --git a/docs/Reference/Contributed/GdiPlus/SolidBrush.md b/docs/Reference/Contributed/GdiPlus/SolidBrush.md new file mode 100644 index 00000000..cfc35c9f --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/SolidBrush.md @@ -0,0 +1,138 @@ +--- +title: SolidBrush +parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/SolidBrush +--- + +# SolidBrush class +{: .no_toc } + +A brush that fills a shape with one colour. + +A **SolidBrush** is the simplest of the [brushes](IBrush) and implements [**IBrush**](IBrush). Its colour can have an alpha value, so a fill can be partly transparent. The class mirrors the GDI+ [SolidBrush](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusbrush/nl-gdiplusbrush-solidbrush) class. + +* TOC +{:toc} + +## Creating + +Syntax: *brush* **= SolidBrush**( *color* ) + +Syntax: *brush* **= New SolidBrush**( *color* ) + +Syntax: *brush* **= SolidBrush**( *rgb* ) + +Syntax: *brush* **= New SolidBrush**( *rgb* ) + +*color* +: *required* A **Color** for the brush. Its alpha value is kept. + +*rgb* +: *required* A **Long** for the colour, as `&H00RRGGBB`. The alpha is always 255. + +> [!WARNING] 0.9.45.0 +> The *rgb* form reads its **Long** as `&H00RRGGBB`, not as a VB colour: `SolidBrush(vbRed)` and `SolidBrush(RGB(255, 0, 0))` paint blue. The *rgb* form drops the alpha value, and a **CColor** member passed to it binds to it, so `SolidBrush(CColor.Transparent)` fills opaque white. [**IBrush**](IBrush#colours) lists what else is not translated. Use the **Color** form. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim bmp As Bitmap = Bitmap(4!, 4!) +Dim g As Graphics = Graphics(bmp) + +Dim brush As SolidBrush = SolidBrush(Color(255, 255, 0, 0)) ' red +g.FillRectangle(brush, 0, 0, 4, 4) +Debug.Print Hex$(bmp.Pixel(1, 1).argb) + +Dim wrong As SolidBrush = SolidBrush(RGB(255, 0, 0)) ' blue, not red +g.FillRectangle(wrong, 0, 0, 4, 4) +Debug.Print Hex$(bmp.Pixel(1, 1).argb) +' Output: +' FFFF0000 +' FF0000FF +``` + +### Clone + +Syntax: *copy* **=** *brush*.**Clone**( ) + +Returns a new **SolidBrush** with the same colour. Changing the copy does not change the original. + +## Colour + +### Color + +Syntax: *brush*.**Color** [ **=** *color* ] + +Gets or sets the colour of the brush, as a **Color** with its alpha value. + +### RGB + +Syntax: *brush*.**RGB** [ **=** *rgb* ] + +Gets or sets the colour as a **Long** in the form `&H00RRGGBB`. Reading it drops the alpha value, and writing it sets an opaque colour. + +> [!WARNING] 0.9.45.0 +> **RGB** reads and writes `&H00RRGGBB` and not a VB colour, so assigning `vbRed` makes the brush blue. Use [**Color**](#color). + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim brush As SolidBrush = SolidBrush(Color(128, 10, 20, 30)) +Debug.Print Hex$(brush.Color.argb) +Debug.Print Hex$(brush.RGB) + +brush.Color = Color(255, 1, 2, 3) +Debug.Print Hex$(brush.RGB) + +brush.RGB = &HFF8000 +Debug.Print Hex$(brush.Color.argb) +' Output: +' 800A141E +' A141E +' 10203 +' FFFF8000 +``` + +## Type + +### Type + +Syntax: *type* **=** *brush*.**Type** + +Returns **BrushTypeSolidColor** ([**GpBrushType**](Enumerations/GpBrushType)). The property is read-only. + +## Example + +A partly transparent fill lets what is under it show through. The example fills a bitmap with white and then with half-transparent red. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim bmp As Bitmap = Bitmap(4!, 4!) +Dim g As Graphics = Graphics(bmp) +g.Clear(Color(255, 255, 255, 255)) + +Dim glass As SolidBrush = SolidBrush(Color(128, 255, 0, 0)) +g.FillRectangle(glass, 0, 0, 2, 4) + +Dim covered As Color = bmp.Pixel(0, 0) +Dim bare As Color = bmp.Pixel(3, 0) +Debug.Print Hex$(covered.R) & " " & Hex$(covered.G) +Debug.Print Hex$(bare.R) & " " & Hex$(bare.G) + +Dim clone As SolidBrush = glass.Clone() +clone.Color = Color(255, 0, 0, 255) +Debug.Print Hex$(glass.Color.argb) & " " & Hex$(clone.Color.argb) +' Output: +' FF 7F +' FF FF +' 80FF0000 FF0000FF +``` + +## See Also + +- [SolidBrush](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusbrush/nl-gdiplusbrush-solidbrush) -- Microsoft's documentation of the GDI+ class +- [IBrush](IBrush) interface +- [HatchBrush](HatchBrush) class +- [Pen](Pen) class +- [Graphics](Graphics) class diff --git a/docs/Reference/Contributed/GdiPlus/StringFormat.md b/docs/Reference/Contributed/GdiPlus/StringFormat.md new file mode 100644 index 00000000..9eb7fec7 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/StringFormat.md @@ -0,0 +1,499 @@ +--- +title: StringFormat +parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/StringFormat +has_toc: false +--- + +# StringFormat class +{: .no_toc } + +Describes how a string is laid out when it is drawn or measured: alignment, wrapping, trimming, tab stops and more. + +A **StringFormat** is passed to the **DrawString** and **MeasureString** methods of [**Graphics**](Graphics), beside the [**Font**](Font) and the layout rectangle. A format that is omitted gives the default layout: the text is aligned to the top left, wraps at the edge of the rectangle, and is trimmed to a whole character. The settings of a format are independent of each other, and each is set by a property, or by a **Set...** method that names the value. The class mirrors the GDI+ [StringFormat](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusstringformat/nl-gdiplusstringformat-stringformat) class. + +* TOC +{:toc} + +## Creating + +Syntax: *format* **= StringFormat**( [ *flags* [, *language*] ] ) + +Syntax: *format* **= New StringFormat**( [ *flags* [, *language*] ] ) + +*flags* +: *optional* A [**GpStringFormatFlags**](Enumerations/GpStringFormatFlags) value or a combination of them. The default is 0: no flag is set. + +*language* +: *optional* An **Integer** language identifier (a `LANGID`) for the language of the strings. The default is 0, the neutral language. + +A new format has these other settings: near alignment in both directions, trimming to a whole character, no hot key processing, no tab stops, no measurable character ranges and the digit substitution method **StringDigitSubstituteUser**. + +### Clone + +Syntax: *copy* **=** *format*.**Clone**( ) + +Returns a new **StringFormat** with the same settings. + +### GenericDefaultStringFormat, GenericTypographicStringFormat + +Syntax: *format* **= GenericDefaultStringFormat**( ) + +Syntax: *format* **= GenericTypographicStringFormat**( ) + +**GenericDefaultStringFormat** returns the format that GDI+ uses when none is given. It has no flags, near alignment and trimming to a whole character. **GenericTypographicStringFormat** returns a format for typographic layout, with the flags **NoFitBlackBox**, **LineLimit** and **NoClip** and no trimming. + +> [!NOTE] 0.9.45.0 +> Both functions return the shared generic format of GDI+, not a copy. Changing the object changes the generic format for the whole program, and a later call returns the changed format. Call [**Clone**](#clone) and change the copy instead. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim d As StringFormat = GenericDefaultStringFormat() +Debug.Print d.Flags ' 0 +Debug.Print d.IsTrimmingCharacter ' True + +Dim t As StringFormat = GenericTypographicStringFormat() +Debug.Print t.NoFitBlackBox & " " & t.LineLimit & " " & t.NoClip ' True True True +Debug.Print t.IsTrimmingNone ' True + +' The generic format is shared: this change is seen by every later call. +d.NoWrap = True +Debug.Print GenericDefaultStringFormat().NoWrap ' True +d.NoWrap = False + +Dim mine As StringFormat = GenericDefaultStringFormat().Clone() +mine.NoWrap = True +Debug.Print GenericDefaultStringFormat().NoWrap ' False +``` + +## Format flags + +### Flags +{: .no_toc } + +Syntax: *format*.**Flags** [ **=** *flags* ] + +Returns or sets all the flags together, as a [**GpStringFormatFlags**](Enumerations/GpStringFormatFlags) combination. **FormatFlags** is an older name of the same property, kept for compatibility. + +### The flag properties +{: .no_toc } + +Syntax: *format*.**NoWrap** [ **=** *value* ] + +Each of these properties is a **Boolean** that reads or sets one flag and leaves the others as they are. + +| Property | Flag | When **True** | +|:---------|:-----|:--------------| +| **DirectionRightToLeft** | **StringFormatFlagsDirectionRightToLeft** | The text is laid out from right to left. | +| **DirectionVertical** | **StringFormatFlagsDirectionVertical** | The lines of text are vertical, not horizontal. | +| **NoFitBlackBox** | **StringFormatFlagsNoFitBlackBox** | Parts of a glyph may extend beyond the layout rectangle. By default GDI+ moves the glyph to keep it inside. | +| **DisplayFormatControl** | **StringFormatFlagsDisplayFormatControl** | Control characters, such as the right-to-left mark, are drawn with a representative glyph. | +| **NoFontFallback** | **StringFormatFlagsNoFontFallback** | A character that the font lacks is not drawn with another font. It is drawn with the font's missing-character glyph, usually an open square. | +| **MeasureTrailingSpaces** | **StringFormatFlagsMeasureTrailingSpaces** | The bounding box of a measured string includes the spaces at the end of each line. By default it does not. | +| **NoWrap** | **StringFormatFlagsNoWrap** | The text is not wrapped to the next line at the edge of the layout rectangle. | +| **LineLimit** | **StringFormatFlagsLineLimit** | Only whole lines are laid out in the rectangle. By default a line that fits only in part is drawn in part. | +| **NoClip** | **StringFormatFlagsNoClip** | The text is not clipped to the layout rectangle: glyphs that extend beyond it, and text that falls outside it, are drawn. | +| **BypassGDI** | **StringFormatFlagsBypassGDI** | A flag that GDI+ declares. Microsoft's documentation does not describe its effect. | + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim sf As StringFormat = StringFormat(StringFormatFlagsNoWrap) +Debug.Print sf.NoWrap & " " & sf.LineLimit ' True False + +sf.LineLimit = True +sf.DirectionRightToLeft = True +Debug.Print sf.Flags ' 12289 +Debug.Print sf.Flags = (StringFormatFlagsNoWrap Or StringFormatFlagsLineLimit Or StringFormatFlagsDirectionRightToLeft) ' True + +sf.NoWrap = False +Debug.Print sf.Flags ' 8193 +``` + +## Horizontal alignment + +The alignment places each line along its direction. **StringAlignmentNear** is the left edge for left-to-right text, the right edge for right-to-left text and the top for vertical text. **StringAlignmentFar** is the opposite edge, and **StringAlignmentCenter** the middle. The values are [**GpStringAlignment**](Enumerations/GpStringAlignment). + +### Alignment +{: .no_toc } + +Syntax: *format*.**Alignment** [ **=** *alignment* ] + +Returns or sets the alignment. + +> [!WARNING] 0.9.45.0 +> Reading **Alignment** fails. It returns **StringAlignmentNear** (0) whatever the alignment is, and sets **LastResult** to **InvalidParameter**. The read-only properties **IsAlignmentNear**, **IsAlignmentCenter** and **IsAlignmentFar** are wrong for the same reason: **IsAlignmentNear** always returns **True**, and the other two always return **False**. Setting the alignment works, with the property or with the **SetAlignment...** methods, so keep the value in a variable if the program needs to read it back. If the error strategy is **RaiseErrors**, the read raises an error. +> +> ```tb check_build check_run +> Dim user As GdiPlusUser = GdiPlusUser() +> +> Dim sf As StringFormat = StringFormat() +> sf.Alignment = StringAlignmentCenter +> Debug.Print sf.Alignment ' 0 +> Debug.Print sf.LastResult ' 2 +> Debug.Print sf.IsAlignmentNear ' True +> Debug.Print sf.IsAlignmentCenter ' False +> ``` + +### SetAlignmentNear, SetAlignmentCenter, SetAlignmentFar +{: .no_toc } + +Syntax: *format*.**SetAlignmentFar** + +Each method sets the alignment to the value in its name. + +### IsAlignmentNear, IsAlignmentCenter, IsAlignmentFar +{: .no_toc } + +Syntax: *format*.**IsAlignmentNear** + +Each read-only property returns **True** when the alignment is the value in its name. They are unreliable: see the warning on **Alignment**. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim bmp As Bitmap = Bitmap(100!, 30!) +Dim g As Graphics = Graphics(bmp) +Dim f As GdiPlus.Font = Font(GenericSansSerif(), 12!) +Dim black As SolidBrush = SolidBrush(Color(255, 0, 0, 0)) +Dim layout As GpRectF = GpRectF(0, 0, 100, 30) +Dim sf As StringFormat = StringFormat() +sf.SetAlignmentFar + +g.Clear White +g.DrawString "I", f, layout, sf, black + +' Find the dark pixels: with far alignment they are all in the right half. +Dim x As Long, y As Long, inkLeft As Boolean, inkRight As Boolean +For y = 0 To 29 + For x = 0 To 99 + If bmp.Pixel(x, y).argb <> White Then + If x < 50 Then inkLeft = True Else inkRight = True + End If + Next +Next +Debug.Print inkLeft & " " & inkRight ' False True +``` + +## Vertical alignment + +The line alignment places the block of lines across the direction of the text: **StringAlignmentNear** is the top of the layout rectangle for horizontal text, **StringAlignmentFar** the bottom, and **StringAlignmentCenter** the middle. + +### LineAlignment +{: .no_toc } + +Syntax: *format*.**LineAlignment** [ **=** *alignment* ] + +Returns or sets the line alignment, a [**GpStringAlignment**](Enumerations/GpStringAlignment) value. + +### SetLineAlignmentNear, SetLineAlignmentCenter, SetLineAlignmentFar +{: .no_toc } + +Syntax: *format*.**SetLineAlignmentCenter** + +Each method sets the line alignment to the value in its name. + +### IsLineAlignmentNear, IsLineAlignmentCenter, IsLineAlignmentFar +{: .no_toc } + +Syntax: *format*.**IsLineAlignmentNear** + +Each read-only property returns **True** when the line alignment is the value in its name. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim sf As StringFormat = StringFormat() +sf.SetLineAlignmentCenter +Debug.Print sf.LineAlignment & " " & sf.IsLineAlignmentCenter ' 1 True + +sf.LineAlignment = StringAlignmentFar +Debug.Print sf.IsLineAlignmentFar & " " & sf.IsLineAlignmentNear ' True False +``` + +## Hot key prefix + +A hot key prefix is the ampersand (`&`) that marks the character before which an access key is shown, as in `&File`. The values are [**GpHotkeyPrefix**](Enumerations/GpHotkeyPrefix). The default, **HotkeyPrefixNone**, draws the ampersand as it is. + +### HotkeyPrefix +{: .no_toc } + +Syntax: *format*.**HotkeyPrefix** [ **=** *prefix* ] + +Returns or sets how the ampersand is processed: **HotkeyPrefixNone** draws it, **HotkeyPrefixShow** removes it and underlines the next character, and **HotkeyPrefixHide** removes it and does not underline. + +### SetHotkeyPrefixNone, SetHotkeyPrefixShow, SetHotkeyPrefixHide +{: .no_toc } + +Syntax: *format*.**SetHotkeyPrefixShow** + +Each method sets the processing to the value in its name. + +### IsHotkeyPrefixNone, IsHotkeyPrefixShow, IsHotkeyPrefixHide +{: .no_toc } + +Syntax: *format*.**IsHotkeyPrefixShow** + +Each read-only property returns **True** when the processing is the value in its name. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim sf As StringFormat = StringFormat() +Debug.Print sf.IsHotkeyPrefixNone ' True + +sf.SetHotkeyPrefixShow +Debug.Print sf.HotkeyPrefix & " " & sf.IsHotkeyPrefixShow ' 1 True + +sf.HotkeyPrefix = HotkeyPrefixHide +Debug.Print sf.HotkeyPrefix & " " & sf.IsHotkeyPrefixHide ' 2 True +``` + +## Trimming + +Trimming decides what happens to the end of a line that does not fit in the layout rectangle. The values are [**GpStringTrimming**](Enumerations/GpStringTrimming). The default is **StringTrimmingCharacter**. + +| Value | The line is | +|:------|:------------| +| **StringTrimmingNone** | Not trimmed. | +| **StringTrimmingCharacter** | Cut at the last character that fits. | +| **StringTrimmingWord** | Cut at the last word that fits. | +| **StringTrimmingEllipsisCharacter** | Cut at the last character that fits, and an ellipsis is added. | +| **StringTrimmingEllipsisWord** | Cut at the last word that fits, and an ellipsis is added. | +| **StringTrimmingEllipsisPath** | Shortened in the middle: the centre is removed and replaced by an ellipsis, and as much as possible of the last part of a path is kept. | + +### Trimming +{: .no_toc } + +Syntax: *format*.**Trimming** [ **=** *trimming* ] + +Returns or sets the trimming. + +### SetTrimmingNone, SetTrimmingCharacter, SetTrimmingWord, SetTrimmingEllipsisCharacter, SetTrimmingEllipsisWord, SetTrimmingEllipsisPath +{: .no_toc } + +Syntax: *format*.**SetTrimmingEllipsisWord** + +Each method sets the trimming to the value in its name. + +### IsTrimmingNone, IsTrimmingCharacter, IsTrimmingWord, IsTrimmingEllipsisCharacter, IsTrimmingEllipsisWord, IsTrimmingEllipsisPath +{: .no_toc } + +Syntax: *format*.**IsTrimmingWord** + +Each read-only property returns **True** when the trimming is the value in its name. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim sf As StringFormat = StringFormat() +Debug.Print sf.Trimming & " " & sf.IsTrimmingCharacter ' 1 True + +sf.SetTrimmingEllipsisPath +Debug.Print sf.Trimming & " " & sf.IsTrimmingEllipsisPath ' 5 True + +sf.Trimming = StringTrimmingEllipsisWord +Debug.Print sf.IsTrimmingEllipsisWord & " " & sf.IsTrimmingEllipsisPath ' True False +``` + +## Tab stops + +Tab stops set where a tab character in the text moves the characters after it. The first tab stop is measured from an initial offset, which is measured from the string's origin, and each later tab stop from the one before it. + +### TabStopCount +{: .no_toc } + +Syntax: *format*.**TabStopCount** + +Returns a **Long** with the number of tab stops that are set. + +### SetTabStops +{: .no_toc } + +Syntax: *status* **=** *format*.**SetTabStops**( *firstTabOffset*, *tabStops*() ) + +Syntax: *status* **=** *format*.**SetTabStops**( *firstTabOffset*, *count*, *tabStops* ) + +*firstTabOffset* +: *required* A **Single** with the initial offset, the distance from the origin of the string to the point that the first tab stop is measured from. + +*tabStops* +: *required* In the first form, an array of **Single** values, each the distance between a tab stop and the one before it. The lower bound of the array does not matter. In the second form, the first element of such an array, passed **ByRef**. + +*count* +: *required* A **Long** with the number of elements to take, in the second form. + +Replaces the tab stops of the format and returns a [**GpStatus**](Enumerations/GpStatus). + +### GetTabStops +{: .no_toc } + +Syntax: *tabStops* **=** *format*.**GetTabStops**( *firstTabOffset* ) + +Syntax: *status* **=** *format*.**GetTabStops**( *count*, *firstTabOffset*, *tabStops* ) + +*firstTabOffset* +: *required* A **Single** variable that receives the first tab offset. + +*count* +: *required* A **Long** with the number of elements to read, in the second form. + +*tabStops* +: *required* In the second form, the first element of an array of **Single** values with room for *count* elements. It receives the tab stops. + +The first form returns the tab stops as a one-based array of **Single** values. The second form fills an array that the caller has made and returns a [**GpStatus**](Enumerations/GpStatus). + +> [!WARNING] 0.9.45.0 +> The first form of **GetTabStops** does not return the first tab offset: the variable passed for *firstTabOffset* receives 0, whatever offset was set. The array it returns is correct. The second form returns the offset correctly, so use it when the offset is needed. +> +> ```tb check_build check_run +> Dim user As GdiPlusUser = GdiPlusUser() +> +> Dim sf As StringFormat = StringFormat() +> Dim tabs(0 To 1) As Single +> tabs(0) = 4: tabs(1) = 8 +> Debug.Print sf.SetTabStops(5, tabs) ' 0 +> +> Dim first As Single +> Dim got() As Single = sf.GetTabStops(first) +> Debug.Print first & " " & got(1) & " " & got(2) ' 0 4 8 +> +> Dim back(0 To 1) As Single +> Debug.Print sf.GetTabStops(2, first, back(0)) ' 0 +> Debug.Print first & " " & back(0) & " " & back(1) ' 5 4 8 +> ``` + +## Digit substitution + +Digit substitution draws the digits 0 to 9 of a string with the digits of another script, such as Arabic-Indic digits. The language says which script. The methods are [**GpStringDigitSubstitute**](Enumerations/GpStringDigitSubstitute) values: **StringDigitSubstituteUser** follows the user's regional settings, **StringDigitSubstituteNone** turns the substitution off, **StringDigitSubstituteNational** uses the digits of the official language of the locale and **StringDigitSubstituteTraditional** uses the digits of the user's native script, which can be a different language. A language identifier is an **Integer**, such as 1033 for US English. + +> [!WARNING] 0.9.45.0 +> Setting one half of the substitution resets the other. **SetDigitSubstitutionUser**, **SetDigitSubstitutionNone**, **SetDigitSubstitutionNational** and **SetDigitSubstitutionTraditional** set the language to 0, and setting **DigitSubstitutionLanguage** sets the method to **StringDigitSubstituteUser**. To change one half and keep the other, set the method with **DigitSubstitutionMethod**, or set both with **SetDigitSubstitution**. +> +> ```tb check_build check_run +> Dim user As GdiPlusUser = GdiPlusUser() +> +> Dim sf As StringFormat = StringFormat() +> sf.SetDigitSubstitution 1031, StringDigitSubstituteNational +> sf.SetDigitSubstitutionTraditional +> Debug.Print sf.DigitSubstitutionLanguage & " " & sf.DigitSubstitutionMethod ' 0 3 +> +> sf.SetDigitSubstitution 1031, StringDigitSubstituteNational +> sf.DigitSubstitutionMethod = StringDigitSubstituteTraditional +> Debug.Print sf.DigitSubstitutionLanguage & " " & sf.DigitSubstitutionMethod ' 1031 3 +> +> sf.DigitSubstitutionLanguage = 1033 +> Debug.Print sf.DigitSubstitutionLanguage & " " & sf.DigitSubstitutionMethod ' 1033 0 +> ``` + +### DigitSubstitutionLanguage +{: .no_toc } + +Syntax: *format*.**DigitSubstitutionLanguage** [ **=** *language* ] + +Returns or sets the language identifier. See the warning above for what setting it does. + +### DigitSubstitutionMethod +{: .no_toc } + +Syntax: *format*.**DigitSubstitutionMethod** [ **=** *method* ] + +Returns or sets the method, a [**GpStringDigitSubstitute**](Enumerations/GpStringDigitSubstitute) value. Setting it keeps the language. + +### SetDigitSubstitution +{: .no_toc } + +Syntax: *status* **=** *format*.**SetDigitSubstitution**( *language*, *substitute* ) + +*language* +: *required* An **Integer** language identifier. + +*substitute* +: *required* A [**GpStringDigitSubstitute**](Enumerations/GpStringDigitSubstitute) value. + +Sets the language and the method together and returns a [**GpStatus**](Enumerations/GpStatus). + +### SetDigitSubstitutionUser, SetDigitSubstitutionNone, SetDigitSubstitutionNational, SetDigitSubstitutionTraditional +{: .no_toc } + +Syntax: *format*.**SetDigitSubstitutionNone** + +Each method sets the method to the value in its name. See the warning above: each also sets the language to 0. + +### IsDigitSubstitutionUser, IsDigitSubstitutionNone, IsDigitSubstitutionNational, IsDigitSubstitutionTraditional +{: .no_toc } + +Syntax: *value* **=** *format*.**IsDigitSubstitutionNone**( ) + +Each function returns **True** when the method is the value in its name. + +## Measurable character ranges + +A format can name up to 32 ranges of characters in a string. [**Graphics.MeasureCharacterRanges**](Graphics) then returns one [**Region**](Region) for each range, which covers the space that the characters of the range take when the string is laid out. A range is a [**CharacterRange**](Types/CharacterRange). + +> [!NOTE] timeless +> GDI+ accepts at most 32 ranges. A call with more returns **ValueOverflow** and leaves the earlier ranges in place. + +### MeasurableCharacterRanges +{: .no_toc } + +Syntax: *format*.**MeasurableCharacterRanges** **=** *ranges*() + +*ranges* +: An array of [**CharacterRange**](Types/CharacterRange) values. + +Sets the ranges. The property is write-only: read the number of ranges with [**MeasurableCharacterRangeCount**](#measurablecharacterrangecount). + +### SetMeasurableCharacterRanges +{: .no_toc } + +Syntax: *status* **=** *format*.**SetMeasurableCharacterRanges**( *rangeCount*, *ranges* ) + +*rangeCount* +: *required* A **Long** with the number of ranges, at most 32. + +*ranges* +: *required* The first element of an array of [**CharacterRange**](Types/CharacterRange) values, passed **ByRef**. + +Sets the ranges and returns a [**GpStatus**](Enumerations/GpStatus). + +### MeasurableCharacterRangeCount +{: .no_toc } + +Syntax: *format*.**MeasurableCharacterRangeCount** + +Returns a **Long** with the number of ranges that are set. It is 0 for a new format. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim bmp As Bitmap = Bitmap(100!, 50!) +Dim g As Graphics = Graphics(bmp) +Dim f As GdiPlus.Font = Font(GenericSansSerif(), 10!) +Dim layout As GpRectF = GpRectF(0, 0, 100, 50) +Dim sf As StringFormat = StringFormat() + +Dim ranges(0 To 1) As CharacterRange +ranges(0) = CharacterRange(0, 3) ' "abc" +ranges(1) = CharacterRange(4, 3) ' "def" +sf.MeasurableCharacterRanges = ranges +Debug.Print sf.MeasurableCharacterRangeCount ' 2 + +Dim regions() As Region = g.MeasureCharacterRanges("abc def", f, layout, sf) +Debug.Print UBound(regions) - LBound(regions) + 1 ' 2 + +' The count is limited to 32. +Dim many(0 To 32) As CharacterRange +Debug.Print sf.SetMeasurableCharacterRanges(32, many(0)) = Ok ' True +Debug.Print sf.SetMeasurableCharacterRanges(33, many(0)) = ValueOverflow ' True +Debug.Print sf.MeasurableCharacterRangeCount ' 32 +``` + +## See Also + +- [Font](Font) class -- the font the text is drawn with +- [Graphics](Graphics) class -- **DrawString**, **MeasureString** and **MeasureCharacterRanges** +- [CharacterRange](Types/CharacterRange) type -- one range of characters +- [Enumerations/GpStringFormatFlags](Enumerations/GpStringFormatFlags) -- the flags +- [StringFormat class](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusstringformat/nl-gdiplusstringformat-stringformat) -- Microsoft's GDI+ reference diff --git a/docs/Reference/Contributed/GdiPlus/TextureBrush.md b/docs/Reference/Contributed/GdiPlus/TextureBrush.md new file mode 100644 index 00000000..67d9c760 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/TextureBrush.md @@ -0,0 +1,291 @@ +--- +title: TextureBrush +parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/TextureBrush +--- + +# TextureBrush class +{: .no_toc } + +A brush that fills a shape with an image, repeated like tiles. + +A **TextureBrush** implements [**IBrush**](IBrush) and [**ITransformable**](ITransformable). The tiles start at the origin of the drawing surface, not at the corner of the shape being filled, so two shapes filled with the same brush show one continuous pattern. A transformation of the brush moves, scales or rotates the tiles. The class mirrors the GDI+ [TextureBrush](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusbrush/nl-gdiplusbrush-texturebrush) class. + +* TOC +{:toc} + +## Creating + +Syntax: *brush* **= TextureBrush**( *image* [, *wrapMode*] ) + +Syntax: *brush* **= TextureBrush**( *image*, *wrapMode*, *dstRect* ) + +Syntax: *brush* **= TextureBrush**( *image*, *dstRect* [, *imageAttributes*] ) + +Syntax: *brush* **= TextureBrush**( *image*, *wrapMode*, *dstX*, *dstY*, *dstWidth*, *dstHeight* ) + +Syntax: *brush* **= TextureBrushI**( *image*, *wrapMode*, *dstX*, *dstY*, *dstWidth*, *dstHeight* ) + +Each form of **TextureBrush** can also be written with **New**: *brush* **= New TextureBrush**( ... ). The two are one thing. + +*image* +: *required* The [**Image**](Image) that is the tile, a [**Bitmap**](Bitmap) for example. + +*wrapMode* +: *optional* A [**GpWrapMode**](Enumerations/GpWrapMode) value for what is drawn outside a tile. The default is **WrapModeTile**. + +*dstRect* +: *required* A **GpRectF** or a **GpRect**: the part of the image that is used as the tile. Without it, the whole image is the tile. For a metafile image, only the width and the height matter: they are the size at which the metafile is drawn, and the rectangle does not crop it. + +*dstX*, *dstY*, *dstWidth*, *dstHeight* +: *required* The same rectangle as four numbers. **TextureBrush** takes **Single** values and **TextureBrushI** takes **Long** values. + +*imageAttributes* +: *optional* The [**ImageAttributes**](ImageAttributes) that are applied to the image when the brush draws. The default is none. + +> [!NOTE] 0.9.45.0 +> The constructor with **Long** values has a seventh parameter, a **Long** that is ignored, so that a call with six numbers is read as the one with **Single** values. **TextureBrushI** is the function for it, and it is the only form without **New**. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +' A tile of 2 by 2 pixels: red, green / blue, white +Dim tile As Bitmap = Bitmap(2!, 2!) +tile.Pixel(0, 0) = Color(255, 255, 0, 0) +tile.Pixel(1, 0) = Color(255, 0, 255, 0) +tile.Pixel(0, 1) = Color(255, 0, 0, 255) +tile.Pixel(1, 1) = Color(255, 255, 255, 255) + +Dim brush As TextureBrush = New TextureBrush(tile) +Dim bmp As Bitmap = Bitmap(6!, 4!) +Dim g As Graphics = Graphics(bmp) +g.FillRectangle(brush, 0, 0, 6, 4) + +Dim x As Long, y As Long, a As Long, row As String +For y = 0 To 1 + row = "" + For x = 0 To 5 + a = bmp.Pixel(x, y).argb + row = row & IIf(a = &HFFFF0000, "R", IIf(a = &HFF00FF00, "G", IIf(a = &HFF0000FF, "B", "W"))) + Next + Debug.Print row +Next +Debug.Print brush.LastResult & " " & brush.Type & " " & brush.WrapMode +' Output: +' RGRGRG +' BWBWBW +' 0 2 0 +``` + +### Clone + +Syntax: *copy* **=** *brush*.**Clone**( ) + +Returns a new **TextureBrush** with the same tile, wrap mode and transformation. + +## The tile + +The example takes the 2-by-2 square at the lower right of a 4-by-4 image as the tile. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim image As Bitmap = Bitmap(4!, 4!) +Dim x As Long, y As Long +For y = 0 To 3 + For x = 0 To 3 + image.Pixel(x, y) = Color(255, x * 60, y * 60, 0) + Next +Next + +Dim brush As TextureBrush = New TextureBrush(image, WrapModeTile, GpRectF(2, 2, 2, 2)) +Dim bmp As Bitmap = Bitmap(4!, 2!) +Dim g As Graphics = Graphics(bmp) +g.FillRectangle(brush, 0, 0, 4, 2) + +Dim row As String +For x = 0 To 3 + row = row & Hex$(bmp.Pixel(x, 0).argb) & " " +Next +Debug.Print row + +Dim whole As GdiPlus.Image = brush.Image +Debug.Print whole.Width & " " & whole.Height +' Output: +' FF787800 FFB47800 FF787800 FFB47800 +' 2 2 +``` + +### Image + +Syntax: *image* **=** *brush*.**Image** + +Returns the tile as an [**Image**](Image): the part of the image that was chosen when the brush was made, which is the whole image when no rectangle was given. The property is read-only. A variable that holds it is declared **As GdiPlus.Image**, because **Image** alone names the VB control class. + +## Wrap mode + +### WrapMode + +Syntax: *brush*.**WrapMode** [ **=** *wrapMode* ] + +Gets or sets what the brush does outside the first tile: a [**GpWrapMode**](Enumerations/GpWrapMode) value. + +| Value | Outside the first tile | +|:------|:-----------------------| +| **WrapModeTile** | The tile repeats. | +| **WrapModeTileFlipX** | The tile repeats and every second tile in a row is mirrored from left to right. | +| **WrapModeTileFlipY** | The tile repeats and every second tile in a column is mirrored from top to bottom. | +| **WrapModeTileFlipXY** | Both. | +| **WrapModeClamp** | The tile is drawn once, at the origin, and nothing else is drawn. | + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim tile As Bitmap = Bitmap(2!, 2!) +tile.Pixel(0, 0) = Color(255, 255, 0, 0) +tile.Pixel(1, 0) = Color(255, 0, 255, 0) +tile.Pixel(0, 1) = Color(255, 0, 0, 255) +tile.Pixel(1, 1) = Color(255, 255, 255, 255) + +Dim bmp As Bitmap = Bitmap(6!, 2!) +Dim g As Graphics = Graphics(bmp) +Dim modes(1) As GpWrapMode +modes(0) = WrapModeTileFlipX: modes(1) = WrapModeClamp + +Dim i As Long, x As Long, y As Long, a As Long, row As String +For i = 0 To 1 + Dim brush As TextureBrush = New TextureBrush(tile, modes(i)) + g.Clear Color(255, 0, 0, 0) + g.FillRectangle(brush, 0, 0, 6, 2) + For y = 0 To 1 + row = "" + For x = 0 To 5 + a = bmp.Pixel(x, y).argb + row = row & IIf(a = &HFFFF0000, "R", IIf(a = &HFF00FF00, "G", IIf(a = &HFF0000FF, "B", IIf(a = &HFFFFFFFF, "W", ".")))) + Next + Debug.Print row + Next +Next +' Output: +' RGGRRG +' BWWBBW +' RG.... +' BW.... +``` + +## Transformations + +The brush implements [**ITransformable**](ITransformable). Its transformation moves, scales, rotates or shears the tiles, as a matrix applies to a shape. The *order* parameter of each method is a [**GpMatrixOrder**](Enumerations/GpMatrixOrder): **MatrixOrderPrepend**, the default, applies the new operation before those the brush already has, and **MatrixOrderAppend** applies it after. Each method returns a [**GpStatus**](Enumerations/GpStatus). + +### Transform + +Syntax: *brush*.**Transform** [ **=** *matrix* ] + +Sets the transformation of the brush to a [**Matrix**](Matrix). Reading it should return a copy of the matrix. + +> [!NOTE] 0.9.45.0 +> Reading **Transform** always fails: it returns **Nothing** and **LastResult** becomes **InvalidParameter**. Use [**GetTransform**](#gettransform). + +### GetTransform + +Syntax: *brush*.**GetTransform**( *matrix* ) + +Copies the transformation of the brush into *matrix*, a **Matrix** that the caller created. + +### ResetTransform + +Syntax: *brush*.**ResetTransform**( ) + +Sets the transformation to the identity matrix. + +### MultiplyTransform + +Syntax: *brush*.**MultiplyTransform**( *matrix* [, *order*] ) + +Combines the transformation with a **Matrix**. + +### TranslateTransform + +Syntax: *brush*.**TranslateTransform**( *dx*, *dy* [, *order*] ) + +Syntax: *brush*.**TranslateTransform**( *delta* [, *order*] ) + +Moves the tiles by *dx* and *dy*, or by a **GpPointF**. + +### ScaleTransform + +Syntax: *brush*.**ScaleTransform**( *sx*, *sy* [, *order*] ) + +Scales the tiles by the factors *sx* across and *sy* down. + +### RotateTransform + +Syntax: *brush*.**RotateTransform**( *angle* [, *order*] ) + +Rotates the tiles by *angle* degrees clockwise about the origin of the drawing surface. + +### RotateTransformAt + +Syntax: *brush*.**RotateTransformAt**( *angle*, *center* [, *order*] ) + +Rotates the tiles by *angle* degrees about the **GpPointF** *center*. + +### ShearTransform + +Syntax: *brush*.**ShearTransform**( *shearX*, *shearY* [, *order*] ) + +Shears the tiles: *shearX* is the amount that x grows for each unit of y, and *shearY* the amount that y grows for each unit of x. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim tile As Bitmap = Bitmap(2!, 2!) +tile.Pixel(0, 0) = Color(255, 255, 0, 0) +tile.Pixel(1, 0) = Color(255, 0, 255, 0) +tile.Pixel(0, 1) = Color(255, 0, 0, 255) +tile.Pixel(1, 1) = Color(255, 255, 255, 255) + +Dim brush As TextureBrush = New TextureBrush(tile) +brush.TranslateTransform 1, 0 + +Dim m As Matrix = New Matrix() +Debug.Print brush.GetTransform(m) & " " & m.OffsetX + +Dim bmp As Bitmap = Bitmap(6!, 2!) +Dim g As Graphics = Graphics(bmp) +g.FillRectangle(brush, 0, 0, 6, 2) + +Dim x As Long, y As Long, a As Long, row As String +For y = 0 To 1 + row = "" + For x = 0 To 5 + a = bmp.Pixel(x, y).argb + row = row & IIf(a = &HFFFF0000, "R", IIf(a = &HFF00FF00, "G", IIf(a = &HFF0000FF, "B", "W"))) + Next + Debug.Print row +Next +' Output: +' 0 1 +' GRGRGR +' WBWBWB +``` + +## Type + +### Type + +Syntax: *type* **=** *brush*.**Type** + +Returns **BrushTypeTextureFill** ([**GpBrushType**](Enumerations/GpBrushType)). The property is read-only. + +## See Also + +- [TextureBrush](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusbrush/nl-gdiplusbrush-texturebrush) -- Microsoft's documentation of the GDI+ class +- [IBrush](IBrush) interface +- [ITransformable](ITransformable) interface +- [HatchBrush](HatchBrush) class +- [Image](Image) class +- [Bitmap](Bitmap) class +- [ImageAttributes](ImageAttributes) class +- [Matrix](Matrix) class +- [GpWrapMode](Enumerations/GpWrapMode) enumeration diff --git a/docs/Reference/Contributed/GdiPlus/Tint.md b/docs/Reference/Contributed/GdiPlus/Tint.md new file mode 100644 index 00000000..a16a973f --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Tint.md @@ -0,0 +1,86 @@ +--- +title: Tint +parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Tint +--- + +# Tint class +{: .no_toc } + +An [**Effect**](Effect) that tints a picture with a hue. + +The tint pulls the colours of the picture toward the chosen hue. The class mirrors the GDI+ [Tint](https://learn.microsoft.com/en-us/windows/win32/api/gdipluseffects/nl-gdipluseffects-tint) class and inherits the members of [**Effect**](Effect). + +* TOC +{:toc} + +## Creating + +Syntax: *fx* **= Tint**( ) + +Syntax: *fx* **= Tint**( *params* ) + +Syntax: *fx* **= Tint**( *hue*, *amount* ) + +Each form is also available as **New Tint**( ... ) with the same arguments. + +*params* +: *required* A [**TintParams**](Types/TintParams) for the parameters. + +*hue* +: *required* A **Long** from -180 to 180: the hue to tint with, as an angle in degrees. 0 is the base of the colour wheel, and the angle runs around it. + +*amount* +: *required* A **Long** from -100 to 100: the strength of the tint. 0 changes nothing, and a negative value tints toward the opposite hue. + +A constructor that fails creates an unusable object whose **LastResult** tells why. + +## Parameters + +Syntax: *fx*.**Parameters** [ **=** *params* ] + +Syntax: *params* **=** *fx*.**Parameters**( *size* ) + +Gets or sets the [**TintParams**](Types/TintParams). + +> [!WARNING] 0.9.45.0 +> The getter returns zeros and sets **LastResult** to 2 (**InvalidParameter**) unless it is given *size*, the size of the structure: `fx.Parameters(LenB(Of TintParams))`. See [**Effect**](Effect#parameters). + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim fx As Tint = Tint(100, 50) +Dim p As TintParams = fx.Parameters(LenB(Of TintParams)) +Debug.Print fx.LastResult & " " & p.hue & " " & p.amount +' Output: +' 0 100 50 +``` + +## Example + +The example tints the colour 200, 100, 50 with two different settings. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim a As Bitmap = Bitmap(4!, 4!) +Dim b As Bitmap = Bitmap(4!, 4!) +Graphics(a).Clear(Color(255, 200, 100, 50)) +Graphics(b).Clear(Color(255, 200, 100, 50)) + +a.ApplyEffect Tint(0, 50), GpRect(0, 0, 4, 4) +b.ApplyEffect Tint(100, 100), GpRect(0, 0, 4, 4) +Debug.Print Hex$(a.Pixel(1, 1).argb) +Debug.Print Hex$(b.Pixel(1, 1).argb) +' Output: +' FFEC583F +' FF1BA000 +``` + +## See Also + +- [Tint](https://learn.microsoft.com/en-us/windows/win32/api/gdipluseffects/nl-gdipluseffects-tint) -- Microsoft's documentation of the GDI+ class +- [Effect](Effect) class +- [HueSaturationLightness](HueSaturationLightness) class +- [ColorBalance](ColorBalance) class +- [TintParams](Types/TintParams) type diff --git a/docs/Reference/Contributed/GdiPlus/Types/BitmapData.md b/docs/Reference/Contributed/GdiPlus/Types/BitmapData.md new file mode 100644 index 00000000..3bd120f8 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Types/BitmapData.md @@ -0,0 +1,48 @@ +--- +title: BitmapData +parent: Types +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Types/BitmapData +--- + +# BitmapData type +{: .no_toc } + +The description of the pixels that [**Bitmap.LockBits**](../Bitmap#lockbits) has locked in memory: their size, layout and address. + +The type mirrors the GDI+ [BitmapData](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusimaging/ns-gdiplusimaging-bitmapdata) structure. A program declares a variable of the type, passes it to **LockBits**, and reads the pixels from the address in **Scan0**. [**UnlockBits**](../Bitmap#unlockbits) takes it back. + +## Fields + +| Field | Type | Meaning | +|:------|:-----|:--------| +| **Width** | **Long** | The width of the locked area in pixels. | +| **Height** | **Long** | The height of the locked area in pixels. | +| **Stride** | **Long** | The number of bytes from the start of one row to the start of the next. It is a multiple of 4, and negative when the rows run from the bottom up. | +| **PixelFormat** | [**PixelFormat**](../Enumerations/PixelFormat) | The pixel format of the locked data. | +| **Scan0** | **LongPtr** | The address of the first pixel. The pixel (*x*, *y*) of a format with *b* bytes per pixel is at `Scan0 + y * Stride + x * b`. | +| **Reserved** | **LongPtr** | Reserved by GDI+. A program leaves it alone. | + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim bmp As Bitmap = Bitmap(4!, 4!) +bmp.Pixel(2, 1) = Color(255, 1, 2, 3) + +Dim bd As BitmapData +bmp.LockBits GpRect(0, 0, 4, 4), ImageLockModeRead, PixelFormat32bppARGB, bd +Dim v As Long +GetMem4 bd.Scan0 + 1 * bd.Stride + 2 * 4, v ' the pixel (2, 1) +bmp.UnlockBits bd +Debug.Print bd.Width & " " & bd.Height & " " & bd.Stride +Debug.Print Hex$(v) +' Output: +' 4 4 16 +' FF010203 +``` + +## See Also + +- [BitmapData](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusimaging/ns-gdiplusimaging-bitmapdata) -- Microsoft's documentation of the GDI+ structure +- [Bitmap](../Bitmap) class +- [ImageLockMode](../Enumerations/ImageLockMode) enumeration diff --git a/docs/Reference/Contributed/GdiPlus/Types/BlurParams.md b/docs/Reference/Contributed/GdiPlus/Types/BlurParams.md new file mode 100644 index 00000000..344a461a --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Types/BlurParams.md @@ -0,0 +1,48 @@ +--- +title: BlurParams +parent: Types +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Types/BlurParams +--- + +# BlurParams type +{: .no_toc } + +The parameters of a [**Blur**](../Blur) effect: the radius and whether the blur spreads past the edges. + +The type mirrors the GDI+ [BlurParams](https://learn.microsoft.com/en-us/windows/win32/api/gdipluseffects/ns-gdipluseffects-blurparams) structure. A **Blur** takes it in its constructor and in its **Parameters** property. + +## Fields + +| Field | Type | Meaning | +|:------|:-----|:--------| +| **radius** | **Single** | The blur radius in pixels, from 0 to 255. | +| **expandEdge** | a Boolean-like enumeration | Whether the blur spreads beyond the edges of the picture. 0 is false, and any other value is true. | + +## Creating + +Syntax: *params* **= BlurParams**( *radius*, *expandEdge* ) + +*radius* +: *required* A **Single** for **radius**. + +*expandEdge* +: *required* A **Boolean** for **expandEdge**. **True** is stored as -1. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim p As BlurParams = BlurParams(2.5!, True) +Debug.Print p.radius & " " & p.expandEdge + +Dim fx As Blur = Blur(p) +Debug.Print fx.LastResult +' Output: +' 2.5 -1 +' 0 +``` + +## See Also + +- [BlurParams](https://learn.microsoft.com/en-us/windows/win32/api/gdipluseffects/ns-gdipluseffects-blurparams) -- Microsoft's documentation of the GDI+ structure +- [Blur](../Blur) class diff --git a/docs/Reference/Contributed/GdiPlus/Types/BrightnessContrastParams.md b/docs/Reference/Contributed/GdiPlus/Types/BrightnessContrastParams.md new file mode 100644 index 00000000..70888d32 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Types/BrightnessContrastParams.md @@ -0,0 +1,45 @@ +--- +title: BrightnessContrastParams +parent: Types +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Types/BrightnessContrastParams +--- + +# BrightnessContrastParams type +{: .no_toc } + +The parameters of a [**BrightnessContrast**](../BrightnessContrast) effect: the brightness and the contrast. + +The type mirrors the GDI+ [BrightnessContrastParams](https://learn.microsoft.com/en-us/windows/win32/api/gdipluseffects/ns-gdipluseffects-brightnesscontrastparams) structure. A **BrightnessContrast** takes it in its constructor and in its **Parameters** property. + +## Fields + +| Field | Type | Meaning | +|:------|:-----|:--------| +| **brightness** | **Long** | The change of brightness, from -255 to 255. 0 changes nothing. | +| **contrast** | **Long** | The change of contrast, from -100 to 100. 0 changes nothing. | + +## Creating + +Syntax: *params* **= BrightnessContrastParams**( *brightness*, *contrast* ) + +*brightness*, *contrast* +: *required* **Long** values for the fields. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim p As BrightnessContrastParams = BrightnessContrastParams(40, -10) +Debug.Print p.brightness & " " & p.contrast + +Dim fx As BrightnessContrast = BrightnessContrast(p) +Debug.Print fx.LastResult +' Output: +' 40 -10 +' 0 +``` + +## See Also + +- [BrightnessContrastParams](https://learn.microsoft.com/en-us/windows/win32/api/gdipluseffects/ns-gdipluseffects-brightnesscontrastparams) -- Microsoft's documentation of the GDI+ structure +- [BrightnessContrast](../BrightnessContrast) class diff --git a/docs/Reference/Contributed/GdiPlus/Types/CharacterRange.md b/docs/Reference/Contributed/GdiPlus/Types/CharacterRange.md new file mode 100644 index 00000000..2431acdd --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Types/CharacterRange.md @@ -0,0 +1,55 @@ +--- +title: CharacterRange +parent: Types +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Types/CharacterRange +--- + +# CharacterRange type +{: .no_toc } + +A range of characters in a string: the position of the first character and the number of characters. + +A **CharacterRange** names the part of a string whose layout is wanted. A [**StringFormat**](../StringFormat) holds up to 32 of them ([**MeasurableCharacterRanges**](../StringFormat#measurablecharacterranges)), and [**Graphics.MeasureCharacterRanges**](../Graphics) returns the space that each one takes when the string is drawn. The type mirrors the GDI+ [CharacterRange](https://learn.microsoft.com/en-us/windows/win32/api/gdiplustypes/nl-gdiplustypes-characterrange) structure. + +## Fields + +| Field | Type | Meaning | +|:------|:-----|:--------| +| **First** | **Long** | The position of the first character of the range, counted from 0. | +| **Length** | **Long** | The number of characters in the range. | + +## Creating + +Syntax: *range* **= CharacterRange**( ) + +Syntax: *range* **= CharacterRange**( *first*, *length* ) + +*first* +: *required* A **Long** for **First**. + +*length* +: *required* A **Long** for **Length**. + +**CharacterRange**( ) returns a range with both fields 0. A variable declared **As CharacterRange** starts the same way, so the function is a convenience for setting both fields in one expression. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim r As CharacterRange = CharacterRange(4, 3) +Debug.Print r.First & " " & r.Length ' 4 3 + +Dim zero As CharacterRange = CharacterRange() +Debug.Print zero.First & " " & zero.Length ' 0 0 + +' The word "world" in "Hello world": +Dim text As String = "Hello world" +Dim word As CharacterRange = CharacterRange(InStr(text, "world") - 1, Len("world")) +Debug.Print Mid$(text, word.First + 1, word.Length) ' world +``` + +## See Also + +- [StringFormat](../StringFormat) class -- holds the ranges to measure +- [Graphics](../Graphics) class -- **MeasureCharacterRanges** +- [CharacterRange structure](https://learn.microsoft.com/en-us/windows/win32/api/gdiplustypes/nl-gdiplustypes-characterrange) -- Microsoft's GDI+ reference diff --git a/docs/Reference/Contributed/GdiPlus/Types/Color.md b/docs/Reference/Contributed/GdiPlus/Types/Color.md new file mode 100644 index 00000000..7ce42b36 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Types/Color.md @@ -0,0 +1,323 @@ +--- +title: Color +parent: Types +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Types/Color +has_toc: false +--- + +# Color type +{: .no_toc } + +A colour with an alpha (opacity) channel and red, green and blue channels of 8 bits each. + +**Color** is the colour that pens, brushes, **Clear** and the drawing methods take, and that **GetPixel** returns. It holds one **Long** field, **argb**, laid out as `&HAARRGGBB`: alpha in the top byte, then red, green and blue. Alpha 255 is opaque and 0 is fully transparent. It mirrors the `Color` class of the GDI+ C++ wrapper. + +| Byte of **argb** | Channel | Shift | +|---|---|---| +| top | alpha | 24 ([**AlphaShift**](../Enumerations/ColorShift)) | +| second | red | 16 | +| third | green | 8 | +| lowest | blue | 0 | + +The common named colours (`CColor.Red`, `CColor.AliceBlue`, ...) are in the enumeration [**CColor**](../Enumerations/CColor); each is an opaque colour in this layout, except **Transparent**. + +> [!NOTE] 0.9.45.0 +> A variable declared with `Dim c As Color` holds 0: a fully transparent black, not black. Drawing with it shows nothing. Create colours with the module function **Color**, which gives an opaque colour. + +## Creating + +Syntax: **Color**( ) \ +Syntax: **NoColor**( ) \ +Syntax: **Color**( *r*, *g*, *b* ) \ +Syntax: **Color**( *a*, *r*, *g*, *b* ) \ +Syntax: **Color**( *argb* ) + +The module functions **Color** and **NoColor** return a new colour. + +**Color**( ) returns opaque black, `&HFF000000`. **NoColor**( ) returns 0, which is transparent black and is what **IsNull** tests for. + +*r*, *g*, *b* +: *required* **Long** values for the red, green and blue channels, 0 to 255. The alpha channel is 255. + +*a* +: *required* A **Long** for the alpha channel, 0 to 255. + +*argb* +: *required* A **Long** that is stored as it is, in the layout `&HAARRGGBB`. A member of [**CColor**](../Enumerations/CColor) is accepted. + +> [!NOTE] 0.9.45.0 +> The channel arguments are masked with `&HFF` and are not checked: `Color(300, -1, 0, 256)` is `&H2CFF0000`. No error is raised. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Debug.Print Hex$(Color(&H22, &H33, &H44).Value) ' FF223344 +Debug.Print Hex$(Color(&H11, &H22, &H33, &H44).Value) ' 11223344 +Debug.Print Hex$(Color(&H80112233).Value) ' 80112233 +Debug.Print Hex$(Color(CColor.Red).Value) ' FFFF0000 +Debug.Print Hex$(Color().Value) ' FF000000 +Debug.Print NoColor().IsNull ' True +Dim blank As Color +Debug.Print blank.IsNull ' True +Debug.Print Hex$(Color(300, -1, 0, 256).Value) ' 2CFF0000 +``` + +## Channels + +### Alpha, Red, Green, Blue + +Syntax: *color*.**Alpha** [ = *value* ] As **Integer** + +Returns or sets one channel. **A**, **R**, **G** and **B** are the same four properties under shorter names. + +The getters return an **Integer** from 0 to 255. The setters take a **Byte**: a value outside 0 to 255 raises error 6, *Overflow*, and the colour is not changed. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim c As Color = Color(&H11, &H22, &H33, &H44) +Debug.Print c.Alpha & " " & c.Red & " " & c.Green & " " & c.Blue ' 17 34 51 68 +Debug.Print c.A & " " & c.R & " " & c.G & " " & c.B ' 17 34 51 68 +c.Red = 200: c.Green = 100: c.Blue = 50: c.Alpha = 25 +Debug.Print Hex$(c.Value) ' 19C86432 +On Error Resume Next +c.Alpha = 300 +Debug.Print Err.Number ' 6 +``` + +## The whole value + +### Value + +Syntax: *color*.**Value** [ = *argb* ] As **Long** + +Returns or sets the colour as `&HAARRGGBB`. The field **argb** holds the same number. + +### IsNull + +Syntax: *color*.**IsNull** As **Boolean** + +Read-only. **True** when the value is 0. + +### IsTransparent + +Syntax: *color*.**IsTransparent** As **Boolean** + +Read-only. **True** only when the value is exactly `&H00FFFFFF`, the value of **CColor.Transparent**. A colour with alpha 0 and other channels is not reported as transparent. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim c As Color +c.Value = &H80FF0000 +Debug.Print Hex$(c.argb) ' 80FF0000 +Debug.Print c.IsNull ' False +Debug.Print Color(CColor.Transparent).IsTransparent ' True +Debug.Print Color(0, 0, 0, 0).IsTransparent ' False +``` + +## Windows colours + +Windows and Visual Basic keep a colour as a `COLORREF`, `&H00BBGGRR`, with red in the lowest byte. **Color** keeps it as `&HAARRGGBB`. + +### RGB + +Syntax: *color*.**RGB** As **Long** + +Read-only. Returns the colour as `&H00RRGGBB`, without the alpha channel. + +### BGR + +Syntax: *color*.**BGR** [ = *colorref* ] As **Long** + +Returns the colour as a `COLORREF`, `&H00BBGGRR`, which is the value of the `RGB` function and of a Visual Basic colour constant such as `vbRed`. Setting it takes a `COLORREF` and gives an opaque colour. This is the conversion to use for Windows colours. + +> [!NOTE] 0.9.45.0 +> **BGR** converts the colour values only. The system colours of Visual Basic, such as `vbButtonFace` (`&H8000000F`), are not translated to the colours that Windows currently uses: the setter gives a nearly black blue. Translate them first with the Windows function `OleTranslateColor`. + +> [!NOTE] 0.9.45.0 +> The methods of the package that take a plain **Long** colour (such as the constructors of **SolidBrush** and **Pen**) read it as `&H00RRGGBB`, not as a `COLORREF`, and make it opaque. `SolidBrush(vbRed)` is blue. Pass `Color(...)`, or a **Color** whose **BGR** you have set, to draw a Visual Basic colour. + +### AsCOLORREF + +Syntax: *color*.**AsCOLORREF**( ) As **Long** + +> [!WARNING] 0.9.45.0 +> **AsCOLORREF** returns `&H00RRGGBB`, the same as **RGB**, and not a `COLORREF`: red and blue are the wrong way round for Windows. Use **BGR**. + +### FromCOLORREF, SetFromCOLORREF + +Syntax: **FromCOLORREF**( *colorref* ) As **Color** \ +Syntax: *color*.**SetFromCOLORREF**( *colorref* ) + +> [!WARNING] 0.9.45.0 +> Both read the argument as `&H00RRGGBB` and swap red and blue: `FromCOLORREF(vbRed)` is blue. To convert a `COLORREF`, set **BGR** on a colour, or write `Color(255, c And &HFF, (c And &HFF00&) \ &H100, (c And &HFF0000) \ &H10000)`. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim c As Color = Color(&H22, &H33, &H44) +Debug.Print Hex$(c.RGB) ' 223344 +Debug.Print Hex$(c.BGR) ' 443322 +Dim fromWindows As Color +fromWindows.BGR = RGB(&H22, &H33, &H44) +Debug.Print Hex$(fromWindows.Value) ' FF223344 +Dim cr As Long = &H443322 +Dim byHand As Color = Color(255, cr And &HFF, (cr And &HFF00&) \ &H100, (cr And &HFF0000) \ &H10000) +Debug.Print Hex$(byHand.Value) ' FF223344 +``` + +## Red, green and blue as numbers + +### GetRGBB, GetRGBI, GetRGBL + +Syntax: *color*.**GetRGBB**( *r* As **Byte**, *g* As **Byte**, *b* As **Byte** ) \ +Syntax: *color*.**GetRGBI**( *r* As **Integer**, *g* As **Integer**, *b* As **Integer** ) \ +Syntax: *color*.**GetRGBL**( *r* As **Long**, *g* As **Long**, *b* As **Long** ) + +Return the three channels, 0 to 255, in variables of the given type. + +### GetRGBS, GetRGBD + +Syntax: *color*.**GetRGBS**( *r* As **Single**, *g* As **Single**, *b* As **Single** ) \ +Syntax: *color*.**GetRGBD**( *r* As **Double**, *g* As **Double**, *b* As **Double** ) + +Return the three channels as percentages: 0 to 100. + +### SetRGB + +Syntax: *color*.**SetRGB**( *r*, *g*, *b* ) + +Sets the three channels from **Long** values, 0 to 255. A value outside the range is clamped to it. The alpha channel is not changed. + +### SetRGBD + +Syntax: *color*.**SetRGBD**( *r*, *g*, *b* ) + +Sets the three channels from **Double** values given as percentages, 0 to 100, clamped to that range. The alpha channel is not changed. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim c As Color = Color(&H80, 255, 0, 0) +Dim r As Long, g As Long, b As Long +c.GetRGBL r, g, b +Debug.Print r & " " & g & " " & b ' 255 0 0 +Dim rs As Single, gs As Single, bs As Single +c.GetRGBS rs, gs, bs +Debug.Print rs & " " & gs & " " & bs ' 100 0 0 +c.SetRGB 300, -5, 128 +Debug.Print Hex$(c.Value) ' 80FF0080 +c.SetRGBD 100, 0, 0 +Debug.Print Hex$(c.Value) ' 80FF0000 +``` + +## Hexadecimal text + +### AsHexRGB, AsHexRGBA + +Syntax: *color*.**AsHexRGB**( ) As **String** \ +Syntax: *color*.**AsHexRGBA**( ) As **String** + +Return the colour as `#rrggbb`, or as `#rrggbbaa`, in upper case hexadecimal. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim c As Color = Color(&H11, &H22, &H33, &H44) +Debug.Print c.AsHexRGB() ' #223344 +Debug.Print c.AsHexRGBA() ' #22334411 +``` + +## Hue, saturation and lightness + +Hue is in degrees, from 0 up to but not including 360. Saturation, lightness and alpha are percentages, 0 to 100. + +### GetHSL, GetHSLA + +Syntax: *color*.**GetHSL**( *h* As **Single**, *s* As **Single**, *l* As **Single** ) \ +Syntax: *color*.**GetHSLA**( *h* As **Single**, *s* As **Single**, *l* As **Single**, *a* As **Single** ) + +Return the hue, saturation and lightness, and for **GetHSLA** the alpha as well. + +### SetHSL, SetHSLA + +Syntax: *color*.**SetHSL**( *h*, *s*, *l* ) \ +Syntax: *color*.**SetHSLA**( *h*, *s*, *l*, *a* ) + +Set the channels from a hue, saturation and lightness, clamped to their ranges. **SetHSL** keeps the alpha of the colour; **SetHSLA** sets it from *a*. A colour declared with `Dim` has alpha 0, so call **SetHSLA**, or set **Alpha**, to make it visible. + +### RotatedHue, RotateHue + +Syntax: *color*.**RotatedHue**( *degrees* ) As **Color** \ +Syntax: *color*.**RotateHue**( *degrees* ) + +**RotatedHue** returns the colour with its hue turned by *degrees*, which may be negative or above 360. **RotateHue** changes the colour itself. + +> [!WARNING] 0.9.45.0 +> For any angle other than 0 the result has alpha 0, so it is invisible: `Color(255, 0, 0).RotatedHue(120)` is `&H0000FF00`. After **RotateHue** the colour itself is transparent. Set **Alpha** again on the result. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim orange As Color = Color(255, 128, 0) +Dim h As Single, s As Single, l As Single +orange.GetHSL h, s, l +Debug.Print Round(h) & " " & Round(s) & " " & Round(l) ' 30 100 50 +Dim c As Color = Color(255, 255, 255) +c.SetHSL 120, 100, 50 +Debug.Print Hex$(c.Value) ' FF00FF00 +c.SetHSLA 240, 100, 50, 100 +Debug.Print Hex$(c.Value) ' FF0000FF +Dim red As Color = Color(255, 0, 0) +Dim green As Color = red.RotatedHue(120) +green.Alpha = red.Alpha +Debug.Print Hex$(green.Value) ' FF00FF00 +``` + +## Inverting + +### Inverse + +Syntax: *color*.**Inverse** [ = *source* ] As **Color** + +Returns the colour with each of red, green and blue replaced by 255 less its value: the negative of the colour. The alpha channel is kept. Setting it makes the colour the inverse of *source*. + +### Invert + +Syntax: *color*.**Invert** + +Replaces the colour by its inverse. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim c As Color = Color(&H22, &H33, &H44) +Debug.Print Hex$(c.Inverse.Value) ' FFDDCCBB +c.Invert +Debug.Print Hex$(c.Value) ' FFDDCCBB +Dim z As Color +z.Inverse = Color(10, 20, 30) +Debug.Print Hex$(z.Value) ' FFF5EBE1 +``` + +## Functions + +### MakeARGB + +Syntax: **MakeARGB**( *a*, *r*, *g*, *b* ) As **Long** + +Returns `&HAARRGGBB` from four **Long** values. Each is masked with `&HFF`. + +### HueToValue + +Syntax: **HueToValue**( *hue*, *m1*, *m2* ) As **Single** + +The helper step of the conversion from hue to a channel, as in the HSL algorithm of CSS. *hue* is a fraction of a full turn from -1 to 1; *m1* and *m2* are the two lightness-derived values, 0 to 1, and the result is in the same range. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Debug.Print Hex$(MakeARGB(1, 2, 3, 4)) ' 1020304 +Debug.Print Hex$(MakeARGB(256, -1, 3, 4)) ' FF0304 +Debug.Print HueToValue(0.1, 0.2, 0.8) ' 0.56 +``` + +## See Also + +- [CColor](../Enumerations/CColor) enumeration -- the named colours +- [ColorMatrix](ColorMatrix) type -- transformations of colours +- [Types](.) -- the types of the package +- [Color](https://learn.microsoft.com/en-us/windows/win32/api/gdipluscolor/nl-gdipluscolor-color) -- the GDI+ class on Microsoft Learn diff --git a/docs/Reference/Contributed/GdiPlus/Types/ColorBalanceParams.md b/docs/Reference/Contributed/GdiPlus/Types/ColorBalanceParams.md new file mode 100644 index 00000000..ec583d2a --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Types/ColorBalanceParams.md @@ -0,0 +1,47 @@ +--- +title: ColorBalanceParams +parent: Types +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Types/ColorBalanceParams +--- + +# ColorBalanceParams type +{: .no_toc } + +The parameters of a [**ColorBalance**](../ColorBalance) effect: the shift between cyan and red, magenta and green, and yellow and blue. + +The type mirrors the GDI+ [ColorBalanceParams](https://learn.microsoft.com/en-us/windows/win32/api/gdipluseffects/ns-gdipluseffects-colorbalanceparams) structure. A **ColorBalance** takes it in its constructor and in its **Parameters** property. + +## Fields + +| Field | Type | Meaning | +|:------|:-----|:--------| +| **cyanRed** | **Long** | From -100 (more cyan) to 100 (more red). | +| **magentaGreen** | **Long** | From -100 (more magenta) to 100 (more green). | +| **yellowBlue** | **Long** | From -100 (more yellow) to 100 (more blue). | + +## Creating + +Syntax: *params* **= ColorBalanceParams**( *cyanRed*, *magentaGreen*, *yellowBlue* ) + +*cyanRed*, *magentaGreen*, *yellowBlue* +: *required* **Long** values for the fields. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim p As ColorBalanceParams = ColorBalanceParams(10, -20, 30) +Debug.Print p.cyanRed & " " & p.magentaGreen & " " & p.yellowBlue + +Dim fx As ColorBalance = ColorBalance() +fx.Parameters = p +Debug.Print fx.LastResult +' Output: +' 10 -20 30 +' 0 +``` + +## See Also + +- [ColorBalanceParams](https://learn.microsoft.com/en-us/windows/win32/api/gdipluseffects/ns-gdipluseffects-colorbalanceparams) -- Microsoft's documentation of the GDI+ structure +- [ColorBalance](../ColorBalance) class diff --git a/docs/Reference/Contributed/GdiPlus/Types/ColorChannelLUT.md b/docs/Reference/Contributed/GdiPlus/Types/ColorChannelLUT.md new file mode 100644 index 00000000..3d711f56 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Types/ColorChannelLUT.md @@ -0,0 +1,33 @@ +--- +title: ColorChannelLUT +parent: Types +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Types/ColorChannelLUT +has_toc: false +--- + +# ColorChannelLUT type +{: .no_toc } + +A lookup table that maps each value of one colour channel to a new value. + +A **ColorChannelLUT** has one field, the array **b**(0 To 255) of **Byte**, and no methods: element **b**(*n*) is the value that a channel value of *n* is changed to. It is 256 bytes. A [**ColorLUTParams**](ColorLUTParams) holds one table for each of the blue, green, red and alpha channels, and the [**ColorLUT**](../ColorLUT) effect applies them to a bitmap. + +A variable declared with `Dim` holds all zeros, which maps every value to 0. Fill the table before using it; a table with **b**(*n*) equal to *n* leaves the channel as it is. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim negative As ColorChannelLUT +Dim n As Long +For n = 0 To 255 + negative.b(n) = 255 - n +Next +Debug.Print negative.b(0) & " " & negative.b(255) ' 255 0 +Debug.Print LenB(Of ColorChannelLUT) ' 256 +``` + +## See Also + +- [ColorMatrix](ColorMatrix) type -- a transformation of colours by a matrix +- [ColorLUT](../ColorLUT) class -- the effect that uses the tables +- [Types](.) -- the types of the package diff --git a/docs/Reference/Contributed/GdiPlus/Types/ColorCurveParams.md b/docs/Reference/Contributed/GdiPlus/Types/ColorCurveParams.md new file mode 100644 index 00000000..c6971e0b --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Types/ColorCurveParams.md @@ -0,0 +1,50 @@ +--- +title: ColorCurveParams +parent: Types +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Types/ColorCurveParams +--- + +# ColorCurveParams type +{: .no_toc } + +The parameters of a [**ColorCurve**](../ColorCurve) effect: the kind of adjustment, the channel and the strength. + +The type mirrors the GDI+ [CurveAdjustments](https://learn.microsoft.com/en-us/windows/win32/api/gdipluseffects/ne-gdipluseffects-curveadjustments) parameters. A **ColorCurve** takes it in its constructor and in its **Parameters** property. + +## Fields + +| Field | Type | Meaning | +|:------|:-----|:--------| +| **adjustment** | [**CurveAdjustments**](../Enumerations/CurveAdjustments) | The kind of adjustment. | +| **channel** | [**CurveChannel**](../Enumerations/CurveChannel) | The channel that is adjusted: all, or one of red, green and blue. | +| **value** | **Long** | The strength. The range depends on **adjustment**, as the page of [**ColorCurve**](../ColorCurve#creating) lists. | + +## Properties + +**adjustValue** is another name for **value**: the name of the C++ structure. It can be read and written. + +## Creating + +Syntax: *params* **= ColorCurveParams**( *adjustment*, *channel*, *value* ) + +*adjustment*, *channel*, *value* +: *required* Values for the fields. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim p As ColorCurveParams = ColorCurveParams(AdjustContrast, CurveChannelBlue, 9) +Debug.Print p.adjustment & " " & p.channel & " " & p.value & " " & p.adjustValue + +p.adjustValue = 11 +Debug.Print p.value +' Output: +' 2 3 9 9 +' 11 +``` + +## See Also + +- [CurveAdjustments](https://learn.microsoft.com/en-us/windows/win32/api/gdipluseffects/ne-gdipluseffects-curveadjustments) -- Microsoft's documentation of the GDI+ enumeration +- [ColorCurve](../ColorCurve) class diff --git a/docs/Reference/Contributed/GdiPlus/Types/ColorLUTParams.md b/docs/Reference/Contributed/GdiPlus/Types/ColorLUTParams.md new file mode 100644 index 00000000..d515809a --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Types/ColorLUTParams.md @@ -0,0 +1,60 @@ +--- +title: ColorLUTParams +parent: Types +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Types/ColorLUTParams +--- + +# ColorLUTParams type +{: .no_toc } + +The parameters of a [**ColorLUT**](../ColorLUT) effect: one lookup table for each of blue, green, red and alpha. + +The type mirrors the GDI+ [ColorLUTParams](https://learn.microsoft.com/en-us/windows/win32/api/gdipluseffects/ns-gdipluseffects-colorlutparams) structure. A **ColorLUT** takes it in its **Parameters** property. + +## Fields + +| Field | Type | Meaning | +|:------|:-----|:--------| +| **lutB** | a table of 256 bytes | The table for the blue channel. | +| **lutG** | a table of 256 bytes | The table for the green channel. | +| **lutR** | a table of 256 bytes | The table for the red channel. | +| **lutA** | a table of 256 bytes | The table for the alpha channel. | + +Each table is a [**ColorChannelLUT**](ColorChannelLUT), a structure with one field, **b**, an array of 256 **Byte** values numbered 0 to 255: the channel value *v* becomes `table.b(v)`. A variable declared **As ColorLUTParams** has all-zero tables, which turn every channel to 0, so a program fills every table, with the identity `b(i) = i` for a channel that stays as it is. + +## Creating + +Syntax: *params* **= ColorLUTParams**( *lutB*, *lutG*, *lutR*, *lutA* ) + +*lutB*, *lutG*, *lutR*, *lutA* +: *required* Arrays of **Byte** with 256 elements, any lower bound. If one of the arrays has another length, the function returns a structure of zeros. + +> [!WARNING] 0.9.45.0 +> The function copies the alpha table from the array *lutB*. The structure it returns maps alpha through the blue table. Fill the fields yourself instead, as the example does. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim p As ColorLUTParams +Dim i As Long +For i = 0 To 255 + p.lutB.b(i) = 255 - i + p.lutG.b(i) = i + p.lutR.b(i) = i + p.lutA.b(i) = i +Next +Debug.Print p.lutB.b(0) & " " & p.lutB.b(255) & " " & p.lutG.b(100) + +Dim fx As ColorLUT = ColorLUT() +fx.Parameters = p +Debug.Print fx.LastResult +' Output: +' 255 0 100 +' 0 +``` + +## See Also + +- [ColorLUTParams](https://learn.microsoft.com/en-us/windows/win32/api/gdipluseffects/ns-gdipluseffects-colorlutparams) -- Microsoft's documentation of the GDI+ structure +- [ColorLUT](../ColorLUT) class diff --git a/docs/Reference/Contributed/GdiPlus/Types/ColorMap.md b/docs/Reference/Contributed/GdiPlus/Types/ColorMap.md new file mode 100644 index 00000000..4f513ff6 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Types/ColorMap.md @@ -0,0 +1,42 @@ +--- +title: ColorMap +parent: Types +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Types/ColorMap +--- + +# ColorMap type +{: .no_toc } + +A pair of colours: one to replace and the colour that takes its place. + +An array of **ColorMap** is a remap table, which [**ImageAttributes.SetRemapTable**](../ImageAttributes#setremaptable) applies while an image is drawn. The type mirrors the GDI+ [ColorMap](https://learn.microsoft.com/en-us/windows/win32/api/gdipluscolormatrix/ns-gdipluscolormatrix-colormap) structure. + +## Fields + +| Field | Type | Meaning | +|:------|:-----|:--------| +| **oldColor** | [**Color**](Color) | The colour to replace. | +| **newColor** | [**Color**](Color) | The colour to put in its place. | + +## Creating + +Syntax: *map* **= ColorMap**( *oldColor*, *newColor* ) + +*oldColor*, *newColor* +: *required* [**Color**](Color) values for the fields. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim map As ColorMap = ColorMap(Color(1, 2, 3, 4), Color(5, 6, 7, 8)) +Debug.Print Hex$(map.oldColor.argb) & " " & Hex$(map.newColor.argb) +' Output: +' 1020304 5060708 +``` + +## See Also + +- [ColorMap](https://learn.microsoft.com/en-us/windows/win32/api/gdipluscolormatrix/ns-gdipluscolormatrix-colormap) -- Microsoft's documentation of the GDI+ structure +- [ImageAttributes](../ImageAttributes) class +- [Color](Color) type diff --git a/docs/Reference/Contributed/GdiPlus/Types/ColorMatrix.md b/docs/Reference/Contributed/GdiPlus/Types/ColorMatrix.md new file mode 100644 index 00000000..ef2f402f --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Types/ColorMatrix.md @@ -0,0 +1,76 @@ +--- +title: ColorMatrix +parent: Types +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Types/ColorMatrix +has_toc: false +--- + +# ColorMatrix type +{: .no_toc } + +A 5 by 5 matrix of **Single** values that transforms colours. + +A **ColorMatrix** has one field, the array **m**(0 To 4, 0 To 4) of **Single**, and no methods. Handing one to [**ImageAttributes**](../ImageAttributes) with **SetColorMatrix** transforms every colour that is drawn with those attributes. A [**ColorMatrixEffect**](../ColorMatrixEffect) applies one to a bitmap. It mirrors the `ColorMatrix` structure of GDI+. + +## How the matrix is read + +A colour is a row of five numbers: red, green, blue and alpha, each from 0 to 1 (the channel divided by 255), and a fifth number that is always 1. The new colour is that row multiplied by the matrix. The five positions, numbered 0 to 4, are red, green, blue, alpha and the translation (the amount added). + +The array is indexed by the **output** component first and the **input** component second: + +*new component* **j** = sum over **i** of *old component* **i** times **m**(**j**, **i**) + +| Element | Effect | +|---|---| +| **m**(**j**, **j**) | the factor that channel **j** is multiplied by (1 leaves it) | +| **m**(**j**, **i**) for **i** other than **j** and 4 | adds channel **i**, times the value, to channel **j** | +| **m**(**j**, 4) | adds the value, as a fraction of 255, to channel **j** | +| **m**(4, 4) | 1 | + +> [!NOTE] 0.9.45.0 +> The two indexes are the reverse of the C++ `ColorMatrix`, where `m[i][j]` has the input row first: the array is stored so that its memory layout is the one GDI+ expects. To add a value to red, set **m**(0, 4), not `m[4][0]`. + +A variable declared with `Dim` holds all zeros, which turns every colour into transparent black. Start from the identity matrix, with 1 on the diagonal. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim src As Bitmap = Bitmap(4!, 4!) +src.Pixel(1, 1) = Color(255, 200, 100, 40) +Dim dst As Bitmap = Bitmap(4!, 4!) +Dim g As Graphics = Graphics(dst) +Dim ia As ImageAttributes = New ImageAttributes() +Dim cm As ColorMatrix +Dim i As Long +For i = 0 To 4 + cm.m(i, i) = 1 +Next + +ia.SetColorMatrix cm +g.DrawImage src, GpRect(0, 0, 4, 4), GpRect(0, 0, 4, 4), UnitPixel, ia +Debug.Print Hex$(dst.Pixel(1, 1).Value) ' FFC86428 + +cm.m(0, 0) = 0.5 ' half the red +ia.SetColorMatrix cm +g.Clear Color(0, 0, 0, 0) +g.DrawImage src, GpRect(0, 0, 4, 4), GpRect(0, 0, 4, 4), UnitPixel, ia +Debug.Print Hex$(dst.Pixel(1, 1).Value) ' FF646428 + +cm.m(0, 0) = 1 +cm.m(2, 2) = 0: cm.m(2, 0) = 1 ' blue = red +ia.SetColorMatrix cm +g.Clear Color(0, 0, 0, 0) +g.DrawImage src, GpRect(0, 0, 4, 4), GpRect(0, 0, 4, 4), UnitPixel, ia +Debug.Print Hex$(dst.Pixel(1, 1).Value) ' FFC864C8 +``` + +The related enumerations are [**ColorMatrixFlags**](../Enumerations/ColorMatrixFlags), which says how grays are treated, and [**ColorAdjustType**](../Enumerations/ColorAdjustType), which says what kind of drawing the matrix applies to. + +## See Also + +- [ColorChannelLUT](ColorChannelLUT) type -- a lookup table for one channel +- [Color](Color) type -- a colour +- [ImageAttributes](../ImageAttributes) class -- **SetColorMatrix** and **SetColorMatrices** +- [ColorMatrixEffect](../ColorMatrixEffect) class -- the matrix as an effect +- [Types](.) -- the types of the package +- [ColorMatrix](https://learn.microsoft.com/en-us/windows/win32/api/gdipluscolormatrix/ns-gdipluscolormatrix-colormatrix) -- the GDI+ structure on Microsoft Learn diff --git a/docs/Reference/Contributed/GdiPlus/Types/ColorPalette.md b/docs/Reference/Contributed/GdiPlus/Types/ColorPalette.md new file mode 100644 index 00000000..d6e0d08f --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Types/ColorPalette.md @@ -0,0 +1,64 @@ +--- +title: ColorPalette +parent: Types +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Types/ColorPalette +--- + +# ColorPalette type +{: .no_toc } + +A palette of up to 256 colours for a bitmap with an indexed pixel format. + +An indexed bitmap stores, for each pixel, the number of an entry of its palette instead of a colour. A **ColorPalette** holds such a palette, and goes to [**Bitmap.ConvertFormat**](../Bitmap#convertformat) and [**ImageAttributes.GetAdjustedPalette**](../ImageAttributes#getadjustedpalette). The type mirrors the GDI+ [ColorPalette](https://learn.microsoft.com/en-us/windows/win32/api/gdipluspixelformats/ns-gdipluspixelformats-colorpalette) structure, with room for 256 entries always. + +## Fields + +| Field | Type | Meaning | +|:------|:-----|:--------| +| **flags** | [**PaletteFlags**](../Enumerations/PaletteFlags) | Whether the palette has alpha values, is a grayscale or is a halftone palette. | +| **count** | **Long** | The number of entries that are in use. | +| **entries** | **Long** array, 0 to 255 | The colours, each as `&HAARRGGBB`. | + +## Creating + +Syntax: *pal* **= ColorPalette**( *flags*, *entries*( ) ) + +*flags* +: *required* A [**PaletteFlags**](../Enumerations/PaletteFlags) value for **flags**. + +*entries* +: *required* An array of **Long** colours, `&HAARRGGBB`. + +The function sets **flags** and sets **count** to the smaller of 256 and the length of *entries*. + +> [!WARNING] 0.9.45.0 +> The function does not copy the colours: every element of **entries** of the result is 0. Set **entries** one element at a time, as below. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim colours(0 To 1) As Long +colours(0) = &HFF000000 +colours(1) = &HFFFFFFFF + +Dim made As ColorPalette = ColorPalette(PaletteFlagsGrayScale, colours) +Debug.Print made.count & " " & Hex$(made.entries(1)) ' the colours are not there + +Dim pal As ColorPalette +pal.flags = PaletteFlagsGrayScale +pal.count = 2 +pal.entries(0) = colours(0) +pal.entries(1) = colours(1) +Debug.Print pal.count & " " & Hex$(pal.entries(1)) +' Output: +' 2 0 +' 2 FFFFFFFF +``` + +## See Also + +- [ColorPalette](https://learn.microsoft.com/en-us/windows/win32/api/gdipluspixelformats/ns-gdipluspixelformats-colorpalette) -- Microsoft's documentation of the GDI+ structure +- [Bitmap](../Bitmap) class +- [ImageAttributes](../ImageAttributes) class +- [PaletteFlags](../Enumerations/PaletteFlags) enumeration diff --git a/docs/Reference/Contributed/GdiPlus/Types/GdiplusStartupInput.md b/docs/Reference/Contributed/GdiPlus/Types/GdiplusStartupInput.md new file mode 100644 index 00000000..463094c0 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Types/GdiplusStartupInput.md @@ -0,0 +1,77 @@ +--- +title: GdiplusStartupInput +parent: Types +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Types/GdiplusStartupInput +has_toc: false +--- + +# GdiplusStartupInput type +{: .no_toc } + +The settings that GDI+ is started with. + +Pass a **GdiplusStartupInput** to the [**GdiPlusUser**](../GdiPlusUser) constructor to start GDI+ with other settings than the default ones. It mirrors the `GdiplusStartupInput` structure of GDI+ and has five fields and no methods. + +A variable declared with `Dim` has every field 0, and its version 0 is not valid: a **GdiPlusUser** created from it fails with status 17, *UnsupportedGdiplusVersion*. Set **GdiplusVersion** before use, or take the structure from one of the module functions. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim blank As GdiplusStartupInput +Debug.Print blank.GdiplusVersion ' 0 +Dim failed As GdiPlusUser = GdiPlusUser(blank) +Debug.Print failed.LastResult ' 17 +Dim settings As GdiplusStartupInput +settings.GdiplusVersion = 2 +settings.StartupParameters = GdiplusStartupNoSetRound +Dim custom As GdiPlusUser = GdiPlusUser(settings) +Debug.Print settings.StartupParameters ' 1 +``` + +## Fields + +### GdiplusVersion + +A **Long** naming the version of GDI+ to start. The values are 1, which is available from Windows XP, 2, from Windows 10, and 3, which is the same as 2 and also turns on the HEIF and AVIF image codecs. Those two codecs need COM to be initialised, and the package does not do it. + +### DebugEventCallback + +A [**DebugEventProc**](#debugeventproc) that GDI+ calls with assertion and warning messages. Only debug builds of GDI+ call it. Leave it 0 to get no calls. + +### SuppressBackgroundThread + +A flag that takes **True** or **False**. **True** stops GDI+ from creating its own background thread, and the program must then call the two functions of a [**GdiplusStartupOutput**](GdiplusStartupOutput) itself. Leave it **False** unless the program does that. + +> [!NOTE] 0.9.45.0 +> The constructor that takes only an input, `GdiPlusUser(settings)`, fails with status 2, *InvalidParameter*, when this flag is **True**, because it gives GDI+ nowhere to return the two functions. Use the constructor that also takes a **GdiplusStartupOutput**. + +### SuppressExternalCodecs + +A flag that takes **True** or **False**. **True** makes GDI+ use only its own image codecs. + +### StartupParameters + +A [**GdiplusStartupParams**](../Enumerations/GdiplusStartupParams) value. It is read only when **GdiplusVersion** is 2 or higher, on a Windows 10 build that supports it, and ignored otherwise. + +## Creating + +Syntax: **GdiplusStartupInput**( [ *debugEventCallback* [, *suppressBackgroundThread* [, *suppressExternalCodecs* ]]] ) \ +Syntax: **GdiplusStartupInput**( *startupParameters* [, *debugEventCallback* [, *suppressBackgroundThread* [, *suppressExternalCodecs* ]]] ) \ +Syntax: **GdiplusStartupInput**( *gdiplusVersion*, *startupParameters* [, *debugEventCallback* [, *suppressBackgroundThread* [, *suppressExternalCodecs* ]]] ) + +The module function **GdiplusStartupInput** returns a structure with the fields set. The first form sets the version to 1, the second to 2, and the third to *gdiplusVersion*. + +> [!WARNING] 0.9.45.0 +> The forms cannot be told apart by an integer or an enumeration member as the first argument. `GdiplusStartupInput(GdiplusStartupNoSetRound)` returns version 1 with no startup parameters, as if the value were a callback, and `GdiplusStartupInput(3, GdiplusStartupDefault)` returns version 2. Set the fields one by one, as in the sample above. + +## DebugEventProc + +A delegate, **Sub**( *level* As [**GdiplusDebugEventLevel**](../Enumerations/GdiplusDebugEventLevel), *message* As **Any** ). GDI+ passes the level and a pointer to the text of the message. + +## See Also + +- [GdiPlusUser](../GdiPlusUser) class -- starts GDI+ +- [GdiplusStartupOutput](GdiplusStartupOutput) type -- the functions returned when the background thread is suppressed +- [GdiplusStartupParams](../Enumerations/GdiplusStartupParams) enumeration +- [Types](.) -- the types of the package +- [GdiplusStartupInput](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusinit/ns-gdiplusinit-gdiplusstartupinput) -- the GDI+ structure on Microsoft Learn diff --git a/docs/Reference/Contributed/GdiPlus/Types/GdiplusStartupOutput.md b/docs/Reference/Contributed/GdiPlus/Types/GdiplusStartupOutput.md new file mode 100644 index 00000000..03c5f368 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Types/GdiplusStartupOutput.md @@ -0,0 +1,68 @@ +--- +title: GdiplusStartupOutput +parent: Types +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Types/GdiplusStartupOutput +has_toc: false +--- + +# GdiplusStartupOutput type +{: .no_toc } + +The two functions that GDI+ returns when it is started without its background thread. + +When [**SuppressBackgroundThread**](GdiplusStartupInput#suppressbackgroundthread) is **True**, GDI+ runs no thread of its own for its background work, and the program must call a hook function before it enters its message loop and an unhook function after it leaves it. GDI+ returns the two functions in a **GdiplusStartupOutput**, which the [**GdiPlusUser**](../GdiPlusUser) constructor fills in. It mirrors the `GdiplusStartupOutput` structure of GDI+ and has two fields and no methods. + +A program that leaves the background thread on never needs this type. + +## Fields + +### NotificationHook + +A [**NotificationHookProc**](#notificationhookproc). **0** until GDI+ has been started with the output. + +### NotificationUnhook + +A [**NotificationUnhookProc**](#notificationunhookproc). **0** until GDI+ has been started with the output. + +## Delegates + +### NotificationHookProc + +**Function**( *token* As **ULONG** ) As [**GpStatus**](../Enumerations/GpStatus). Starts the background work and returns a token. + +### NotificationUnhookProc + +**Sub**( *token* As **ULONG** ). Stops it. Pass the token that the hook returned. + +> [!WARNING] 0.9.45.0 +> The token is declared as a 32-bit **Long**, and in a 64-bit program GDI+ writes a 64-bit value into it. **NotificationHookProc** overwrites the four bytes after the variable. Use the module functions **NotificationHook** and **NotificationUnhook** below, whose token is a **LongPtr**. + +## Module functions + +Syntax: **NotificationHook**( *token* As **LongPtr** ) As **GpStatus** \ +Syntax: **NotificationUnhook**( *token* As **LongPtr** ) + +Call the two functions of GDI+ directly. They work only after GDI+ has been started with a [**GdiplusStartupInput**](GdiplusStartupInput) whose **SuppressBackgroundThread** is **True**, through the constructor that takes an output. + +```tb check_build check_run +Dim settings As GdiplusStartupInput +settings.GdiplusVersion = 1 +settings.SuppressBackgroundThread = True +Dim output As GdiplusStartupOutput +Dim user As GdiPlusUser = GdiPlusUser(settings, output) +Debug.Print user.LastResult ' 0 +Debug.Print output.NotificationHook <> 0 ' True +Debug.Print output.NotificationUnhook <> 0 ' True +Dim token As LongPtr +Dim status As GpStatus = NotificationHook(token) +' ... the program's message loop runs here ... +NotificationUnhook token +``` + +## See Also + +- [GdiplusStartupInput](GdiplusStartupInput) type -- the settings, including **SuppressBackgroundThread** +- [GdiPlusUser](../GdiPlusUser) class -- starts GDI+ +- [Types](.) -- the types of the package +- [GdiplusStartupOutput](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusinit/ns-gdiplusinit-gdiplusstartupoutput) -- the GDI+ structure on Microsoft Learn diff --git a/docs/Reference/Contributed/GdiPlus/Types/GpEncoderParameter.md b/docs/Reference/Contributed/GdiPlus/Types/GpEncoderParameter.md new file mode 100644 index 00000000..f520f234 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Types/GpEncoderParameter.md @@ -0,0 +1,105 @@ +--- +title: GpEncoderParameter +parent: Types +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Types/GpEncoderParameter +--- + +# GpEncoderParameter type +{: .no_toc } + +One parameter of an image encoder: an identifier, a type, and a list of values. + +Encoder parameters tell an encoder how to write a picture, for instance the quality of a JPEG. [**Image.GetEncoderParameterList**](../Image#getencoderparameterlist) returns the parameters an encoder accepts, and [**Image.Save**](../Image#save) takes an array of them. The identifiers come from the functions of [**ImageCodec**](../ImageCodec#encoder-parameters). The type mirrors the GDI+ [EncoderParameter](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusimaging/ns-gdiplusimaging-encoderparameter) structure. It is 28 bytes long in a 32-bit program and 32 bytes in a 64-bit one. + +> [!WARNING] 0.9.45.0 +> **Image.Save** and **Image.GetEncoderParameterList** do not work, so a program cannot pass these parameters to an encoder or get them from one. See the warnings on [**Image**](../Image#save). + +* TOC +{:toc} + +## Fields + +| Field | Type | Meaning | +|:------|:-----|:--------| +| **Guid** | **UUID** | The identifier of the parameter, such as the value of **EncoderQuality**( ). | + +The count, the type and the address of the values are kept in fields that begin with an underscore (`_count`, `_type`, `_address`), which a program sets to describe values it supplies. They are read through the properties below. + +## Properties + +### Type, Count + +Syntax: *t* **=** *param*.**Type** + +Syntax: *n* **=** *param*.**Count** + +**Type** is the [**GpEncoderParameterValueType**](../Enumerations/GpEncoderParameterValueType) of the values: byte, ASCII, short, long, rational, long range, rational range, undefined or pointer. **Count** is the number of values. + +### IsASCII, IsByte, IsShort, IsLong, IsRational, IsLongRange, IsRationalRange, IsBinary, IsUndefined + +Syntax: *b* **=** *param*.**IsLong** + +Each is **True** when **Type** is the type its name gives. **IsBinary** is for the pointer type. **IsUndefined** is **True** for the undefined type and for a type number that is out of range. + +### ASCII, Byte, Short, Long, Rational, Binary + +Syntax: *v* **=** *param*.**Long**( *index* ) + +*index* +: *required* The number of the value, from 1 to **Count**. + +Return the value with that number, or 0 (an empty string for **ASCII**) when the parameter is not of that type. **Byte** returns an **Integer** and **Short** a **Long**, so that the unsigned values fit. **Long** returns a **LongLong** for the same reason. **Rational** returns the quotient of the two numbers of the pair as a **Double**. **Binary** returns the pointer. + +### LongRange, RationalRange + +Syntax: *v* **=** *param*.**LongRange**( *index* ) + +Return a range as an array of two values with the lower bound 1: two **LongLong** values for **LongRange**, and the two quotients as **Double** values for **RationalRange**. + +### AsDouble + +Syntax: *v* **=** *param*.**AsDouble**( *index* ) + +Returns a byte, short, long or rational value as a **Double**. + +## Methods + +### GetRational, GetLongRange, GetRationalRange + +Syntax: *param*.**GetRational**( *index*, *num*, *denom* ) + +Syntax: *param*.**GetLongRange**( *index*, *from*, *to* ) + +Syntax: *param*.**GetRationalRange**( *index*, *values*( ) ) + +Read a rational as its numerator and denominator, a long range as its two ends, and a rational range as an array of its four numbers (lower bound 1), without dividing. All the numbers are **LongLong** values. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim qualities(0 To 1) As Long +qualities(0) = 70 +qualities(1) = 80 + +Dim ep As GpEncoderParameter +ep.Guid = EncoderQuality() +ep._count = 2 +ep._type = EncoderParameterValueTypeLong +ep._address = VarPtr(qualities(0)) + +Debug.Print ep.Count & " " & ep.Type & " " & ep.IsLong & " " & ep.IsByte +Debug.Print ep.Long(1) & " " & ep.Long(2) & " " & ep.AsDouble(2) +Debug.Print ep.Short(1) ' not a short parameter +' Output: +' 2 4 True False +' 70 80 80 +' 0 +``` + +## See Also + +- [EncoderParameter](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusimaging/ns-gdiplusimaging-encoderparameter) -- Microsoft's documentation of the GDI+ structure +- [Image](../Image) class +- [ImageCodec](../ImageCodec) -- the parameter identifiers +- [GpEncoderParameterValueType](../Enumerations/GpEncoderParameterValueType) enumeration diff --git a/docs/Reference/Contributed/GdiPlus/Types/GpImageCodecInfo.md b/docs/Reference/Contributed/GdiPlus/Types/GpImageCodecInfo.md new file mode 100644 index 00000000..4aa51cd4 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Types/GpImageCodecInfo.md @@ -0,0 +1,96 @@ +--- +title: GpImageCodecInfo +parent: Types +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Types/GpImageCodecInfo +--- + +# GpImageCodecInfo type +{: .no_toc } + +A description of an image codec: its class ID, the format it handles, its names and its capabilities. + +The codec lists of [**ImageCodec**](../ImageCodec#listing-the-codecs) are arrays of this type. It mirrors the GDI+ [ImageCodecInfo](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusimaging/nl-gdiplusimaging-imagecodecinfo) class, and has the same layout. The text properties read strings in the buffer that GDI+ filled, so the buffer has to stay alive. + +> [!WARNING] 0.9.45.0 +> The text properties (**CodecName**, **DllName**, **FormatDescription**, **FilenameExtension** and **MimeType**) return their string with the terminating null character included, so `info.MimeType = "image/png"` is **False**. Remove it with `Replace(text, vbNullChar, "")`. + +* TOC +{:toc} + +## Fields + +| Field | Type | Meaning | +|:------|:-----|:--------| +| **Clsid** | **UUID** | The class ID of the codec. For an encoder it is the *clsidEncoder* argument of [**Image.Save**](../Image#save). | +| **FormatID** | **UUID** | The ID of the file format, such as the value of **ImageFormatPNG**( ). | +| **Flags** | [**GpImageCodecFlags**](../Enumerations/GpImageCodecFlags) | The capabilities, as a combination of flags. | +| **Version** | **Long** | The version of the codec. | + +## Text properties + +Syntax: *s* **=** *info*.**CodecName** + +**CodecName** is the name of the codec, for example `Built-in PNG Codec`. **DllName** is the file that holds it, and is empty for the built-in codecs. **FormatDescription** names the format, for example `PNG`. **FilenameExtension** lists the file name patterns, separated by semicolons, for example `*.PNG`. **MimeType** is the MIME type, for example `image/png`. The properties are read-only. + +## Capability properties + +Syntax: *b* **=** *info*.**IsEncoder** + +Each property is **True** when the matching flag of [**GpImageCodecFlags**](../Enumerations/GpImageCodecFlags) is set in **Flags**: + +| Property | Means | +|:---------|:------| +| **IsEncoder** | The codec can write the format. | +| **IsDecoder** | The codec can read the format. | +| **IsSupportBitmap** | It handles raster pictures. | +| **IsSupportVector** | It handles vector pictures. | +| **IsSeekableEncode** | The encoder needs a stream that can seek. | +| **IsBlockingDecode** | The decoder reads the whole stream before it returns. | +| **IsBuiltin** | The codec is built into GDI+. | +| **IsSystem** | The codec is installed in the system. | +| **IsUser** | The codec is installed by a user. | + +## Signature properties + +Syntax: *bytes* **=** *info*.**SigPattern**( *index* ) + +Syntax: *bytes* **=** *info*.**SigMask**( *index* ) + +*index* +: *required* The number of the signature, from 1. + +A decoder recognises a file by its first bytes: a signature is a pattern of bytes and a mask that selects the bytes that count. Both properties return an array of **Byte**, with the lower bound 1, as a view into the buffer. The PNG decoder has one signature, with the eight bytes `&H89 &H50 &H4E &H47 &H0D &H0A &H1A &H0A`. + +```tb check_build hidden +Public Declare PtrSafe Sub InfoCopyMemory Lib "kernel32" Alias "RtlMoveMemory" (ByVal dst As LongPtr, ByVal src As LongPtr, ByVal cb As LongPtr) +``` + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim count As UINT, size As UINT +GetImageEncodersSize count, size +Dim buffer() As Byte +ReDim buffer(0 To size - 1) +GetImageEncoders count, size, buffer(0) + +Dim info As GpImageCodecInfo +InfoCopyMemory VarPtr(info), VarPtr(buffer(0)) + 4 * LenB(Of GpImageCodecInfo), LenB(Of GpImageCodecInfo) ' the fifth: PNG + +Dim mime As String = info.MimeType +Debug.Print (mime = "image/png") & " " & (Replace(mime, vbNullChar, "") = "image/png") +Debug.Print info.IsEncoder & " " & info.IsDecoder & " " & info.IsBuiltin & " " & info.IsSystem +Dim sig() As Byte = info.SigPattern(1) +Debug.Print UBound(sig) & " " & Hex$(sig(1)) & " " & Hex$(sig(2)) & " " & Hex$(sig(3)) +' Output: +' False True +' True True True False +' 8 89 50 4E +``` + +## See Also + +- [ImageCodecInfo](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusimaging/nl-gdiplusimaging-imagecodecinfo) -- Microsoft's documentation of the GDI+ class +- [ImageCodec](../ImageCodec) -- the codec lists +- [GpImageCodecFlags](../Enumerations/GpImageCodecFlags) enumeration diff --git a/docs/Reference/Contributed/GdiPlus/Types/GpImageItemData.md b/docs/Reference/Contributed/GdiPlus/Types/GpImageItemData.md new file mode 100644 index 00000000..16576570 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Types/GpImageItemData.md @@ -0,0 +1,40 @@ +--- +title: GpImageItemData +parent: Types +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Types/GpImageItemData +--- + +# GpImageItemData type +{: .no_toc } + +An item of extra data stored with an image: a block of bytes, its description and the way it is to be saved. + +[**Image.FindFirstItem**](../Image#findfirstitem), **FindNextItem** and [**GetItemData**](../Image#getitemdata) enumerate and read such items; an array of one element holds the item and the memory its **Desc** and **Data** fields point to. The type mirrors the GDI+ [ImageItemData](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusimaging/ns-gdiplusimaging-imageitemdata) structure and needs GDI+ 1.1. The array that those methods return cannot be read in 0.9.45.0; see [**Image**](../Image#items-of-image-data). + +## Fields + +| Field | Type | Meaning | +|:------|:-----|:--------| +| **Size** | **Long** | The size of the structure and the data after it, in bytes. | +| **Position** | **Long** | Where the data goes in the saved file, an [**ItemDataPosition**](../Enumerations/ItemDataPosition) value. | +| **Desc** | **LongPtr** | The address of a description of how to save the data. It differs for every codec. | +| **DescSize** | **Long** | The size of the description in bytes. | +| **Data** | **LongPtr** | The address of the data, which a codec saves as it is. | +| **DataSize** | **Long** | The size of the data in bytes. | +| **Cookie** | **Long** | A value that GDI+ uses while it enumerates the items. A program leaves it alone. | + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim item As GpImageItemData +Debug.Print item.Size & " " & item.DataSize & " " & (item.Data = 0) +' Output: +' 0 0 True +``` + +## See Also + +- [ImageItemData](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusimaging/ns-gdiplusimaging-imageitemdata) -- Microsoft's documentation of the GDI+ structure +- [Image](../Image) class +- [ItemDataPosition](../Enumerations/ItemDataPosition) enumeration diff --git a/docs/Reference/Contributed/GdiPlus/Types/GpPoint.md b/docs/Reference/Contributed/GdiPlus/Types/GpPoint.md new file mode 100644 index 00000000..2b66a7be --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Types/GpPoint.md @@ -0,0 +1,170 @@ +--- +title: GpPoint +parent: Types +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Types/GpPoint +has_toc: false +--- + +# GpPoint type +{: .no_toc } + +A point or two-dimensional vector with **Long** coordinates. + +**GpPoint** is the point that the integer overloads of the drawing methods take. It is 8 bytes: the fields **X** and **Y**, followed by methods that read and change them. The floating-point counterpart is [**GpPointF**](GpPointF); a size is a [**GpSize**](GpSize) and a rectangle a [**GpRect**](GpRect). It mirrors the `Point` class of the GDI+ C++ wrapper. + +A variable declared with `Dim` starts at (0, 0). + +## Creating + +Syntax: **GpPoint**( ) \ +Syntax: **GpPoint**( *x*, *y* ) \ +Syntax: **GpPoint**( *point* ) \ +Syntax: **GpPoint**( *size* ) + +The module function **GpPoint** returns a new point. + +*x*, *y* +: *required* A **Long** giving each coordinate. + +*point* +: *required* A [**GpPointF**](GpPointF). Its coordinates are rounded to whole numbers, halves to the even number (2.5 becomes 2, 3.5 becomes 4). + +*size* +: *required* A [**GpSize**](GpSize). The new point takes **X** from its **Width** and **Y** from its **Height**. + +With no arguments the point is (0, 0). + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim p As GpPoint = GpPoint(3, 4) +Debug.Print p.X & "," & p.Y ' 3,4 +Dim rounded As GpPoint = GpPoint(GpPointF(2.5, 3.5)) +Debug.Print rounded.X & "," & rounded.Y ' 2,4 +Dim fromSize As GpPoint = GpPoint(GpSize(7, 8)) +Debug.Print fromSize.X & "," & fromSize.Y ' 7,8 +``` + +## Fields and properties + +### X, Y + +The coordinates, as **Long** fields. Assign them directly. + +### Zero + +Syntax: *point*.**Zero** As **Boolean** + +Read-only. **True** when both coordinates are 0. + +### Transposed + +Syntax: *point*.**Transposed** As **GpPoint** + +Read-only. Returns a point with **X** and **Y** exchanged. + +## Conversion + +### AsGpPointF + +Syntax: *point*.**AsGpPointF**( ) As **GpPointF** + +Returns the same coordinates as **Single** values. + +### SetFrom + +Syntax: *point*.**SetFrom**( *source* ) + +Sets both coordinates from a [**GpPointF**](GpPointF), rounded as the constructor does. + +### AsPOINT, SetFromPOINT + +Syntax: *point*.**AsPOINT**( ) As **GDIP_POINT** \ +Syntax: *point*.**SetFromPOINT**( *source* As **GDIP_POINT** ) + +Convert to and from a structure of two **Long** fields `x` and `y`, which is the layout of the Windows `POINT`. The structure is declared as **GDIP_POINT**. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim p As GpPoint = GpPoint(3, 4) +Dim f As GpPointF = p.AsGpPointF() +Debug.Print f.X + f.Y ' 7 +p.SetFrom GpPointF(2.6, -2.6) +Debug.Print p.X & "," & p.Y ' 3,-3 +Debug.Print p.Transposed.X ' -3 +Dim winPoint As GDIP_POINT = p.AsPOINT() +Debug.Print winPoint.x & "," & winPoint.y ' 3,-3 +``` + +## Modifying methods + +These change the point they are called on. + +> [!NOTE] 0.9.45.0 +> **Add** and **Sub** change the point they are called on. Before version 0.9.0.43 they returned the result and left the point alone. Use [**Sum**](#sum-diff) and [**Diff**](#sum-diff) to get a new point. + +### Add, Sub + +Syntax: *point*.**Add**( *other* As **GpPoint** ) \ +Syntax: *point*.**Sub**( *other* As **GpPoint** ) + +Adds *other* to the point, or subtracts it. + +### Transpose + +Syntax: *point*.**Transpose** + +Exchanges **X** and **Y**. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim p As GpPoint = GpPoint(3, 4) +p.Add GpPoint(10, 10) +Debug.Print p.X & "," & p.Y ' 13,14 +p.Sub GpPoint(1, 1) +p.Transpose +Debug.Print p.X & "," & p.Y ' 13,12 +``` + +## Query methods + +These return a new value and leave the point unchanged. + +### Sum, Diff + +Syntax: *point*.**Sum**( *other* As **GpPoint** ) As **GpPoint** \ +Syntax: *point*.**Diff**( *other* As **GpPoint** ) As **GpPoint** + +Returns the sum of the two vectors, or the point less *other*. + +### DotProd + +Syntax: *point*.**DotProd**( *other* As **GpPoint** ) As **LongLong** + +Returns the dot product, `X * other.X + Y * other.Y`. + +> [!NOTE] 0.9.45.0 +> Each product is calculated as a **Long**, and a product above 2,147,483,647 raises error 6, *Overflow*, although the result is a **LongLong**. + +### Equals + +Syntax: *point*.**Equals**( *other* As **GpPoint** ) As **Boolean** + +**True** when both coordinates equal those of *other*. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim p As GpPoint = GpPoint(3, 4) +Debug.Print p.Sum(GpPoint(1, 1)).X ' 4 +Debug.Print p.Diff(GpPoint(1, 1)).Y ' 3 +Debug.Print p.DotProd(GpPoint(100000, 100000)) ' 700000 +Debug.Print p.Equals(GpPoint(3, 4)) ' True +``` + +## See Also + +- [GpPointF](GpPointF) type -- the floating-point point +- [GpSize](GpSize) type -- a size +- [GpRect](GpRect) type -- a rectangle +- [Types](.) -- the types of the package +- [Point](https://learn.microsoft.com/en-us/windows/win32/api/gdiplustypes/nl-gdiplustypes-point) -- the GDI+ class on Microsoft Learn diff --git a/docs/Reference/Contributed/GdiPlus/Types/GpPointF.md b/docs/Reference/Contributed/GdiPlus/Types/GpPointF.md new file mode 100644 index 00000000..2b399c7a --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Types/GpPointF.md @@ -0,0 +1,245 @@ +--- +title: GpPointF +parent: Types +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Types/GpPointF +has_toc: false +--- + +# GpPointF type +{: .no_toc } + +A point or two-dimensional vector with **Single** coordinates. + +**GpPointF** is the point that the **Single** overloads of the drawing methods take. It is 8 bytes: the fields **X** and **Y**, followed by methods that read and change them. The integer counterpart is [**GpPoint**](GpPoint); a size is a [**GpSizeF**](GpSizeF) and a rectangle a [**GpRectF**](GpRectF). It mirrors the `PointF` class of the GDI+ C++ wrapper. + +A variable declared with `Dim` starts at (0, 0). + +## Creating + +Syntax: **GpPointF**( ) \ +Syntax: **GpPointF**( *x*, *y* ) \ +Syntax: **GpPointF**( *point* ) \ +Syntax: **GpPointF**( *size* ) + +The module function **GpPointF** returns a new point. A **GpPointF** has no constructor of the `New` form. + +*x*, *y* +: *required* A **Single** giving each coordinate. + +*point* +: *required* A [**GpPoint**](GpPoint). The new point has the same coordinates. + +*size* +: *required* A [**GpSizeF**](GpSizeF). The new point takes **X** from its **Width** and **Y** from its **Height**. + +With no arguments the point is (0, 0). + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim p As GpPointF = GpPointF(3, 4) +Debug.Print p.X & "," & p.Y ' 3,4 +Debug.Print GpPointF().Zero ' True +Dim fromInt As GpPointF = GpPointF(GpPoint(7, 8)) +Debug.Print fromInt.X & "," & fromInt.Y ' 7,8 +Dim fromSize As GpPointF = GpPointF(GpSizeF(1.5, 2.5)) +Debug.Print fromSize.X & "," & fromSize.Y ' 1.5,2.5 +``` + +## Fields and properties + +### X, Y + +The coordinates, as **Single** fields. Assign them directly. + +### Zero + +Syntax: *point*.**Zero** As **Boolean** + +Read-only. **True** when both coordinates are exactly 0. + +### Length + +Syntax: *point*.**Length** [ = *value* ] As **Single** + +Returns the length of the vector, the square root of **X** squared plus **Y** squared. Setting it scales the vector to the given length and keeps its direction. + +Setting **Length** to 0 sets both coordinates to 0, and the direction is lost. Setting the length of a zero vector, or of one shorter than twice [**REAL_EPSILON**](../Helpers#real_epsilon), changes nothing. + +### Normalized + +Syntax: *point*.**Normalized** As **GpPointF** + +Returns the vector scaled to length 1. + +> [!NOTE] 0.9.45.0, BETA 1005 +> A program that names **Normalized** does not link: the linker reports a code generation error in `Types.Normalized`. Use [**Normalize**](#normalize) on a copy of the point instead. + +### Transposed + +Syntax: *point*.**Transposed** As **GpPointF** + +Read-only. Returns a point with **X** and **Y** exchanged. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim p As GpPointF = GpPointF(3, 4) +Debug.Print p.Length ' 5 +p.Length = 10 +Debug.Print p.X & "," & p.Y ' 6,8 +p.Length = 0 +Debug.Print p.Zero ' True +Debug.Print GpPointF(1, 2).Transposed.X ' 2 +``` + +## Conversion + +### AsGpPoint + +Syntax: *point*.**AsGpPoint**( ) As **GpPoint** + +Returns the point with its coordinates rounded to whole numbers. Halves go to the even number: 2.5 becomes 2 and 3.5 becomes 4. + +### SetFrom + +Syntax: *point*.**SetFrom**( *source* ) + +Sets both coordinates from a [**GpPoint**](GpPoint). + +### AsPOINT, SetFromPOINT + +Syntax: *point*.**AsPOINT**( ) As **GDIP_POINT** \ +Syntax: *point*.**SetFromPOINT**( *source* As **GDIP_POINT** ) + +Convert to and from a structure of two **Long** fields `x` and `y`, which is the layout of the Windows `POINT`. The structure is declared as **GDIP_POINT**. **AsPOINT** rounds as **AsGpPoint** does. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim whole As GpPoint = GpPointF(2.5, 3.5).AsGpPoint() +Debug.Print whole.X & "," & whole.Y ' 2,4 +Dim p As GpPointF +p.SetFrom GpPoint(5, 6) +Debug.Print p.X & "," & p.Y ' 5,6 +Dim winPoint As GDIP_POINT = GpPointF(9.2, 1.7).AsPOINT() +Debug.Print winPoint.x & "," & winPoint.y ' 9,2 +``` + +## Modifying methods + +These change the point they are called on. + +> [!NOTE] 0.9.45.0 +> **Add** and **Sub** change the point they are called on. Before version 0.9.0.43 they returned the result and left the point alone. Use [**Sum**](#sum-diff) and [**Diff**](#sum-diff) to get a new point. + +> [!NOTE] 0.9.45.0, BETA 1005 +> The compiler reads `p.Scale(2)` as the start of a `Scale` statement and reports a syntax error. Write `p.Scale 2` or `Call p.Scale(2)`. **Scale2**, **InvScale** and the other methods are not affected. + +### Add, Sub + +Syntax: *point*.**Add**( *other* As **GpPointF** ) \ +Syntax: *point*.**Sub**( *other* As **GpPointF** ) + +Adds *other* to the point, or subtracts it. + +### Scale, Scale2 + +Syntax: *point*.**Scale** *factor* \ +Syntax: *point*.**Scale2**( *xFactor*, *yFactor* ) + +Multiplies both coordinates by *factor* (**Single**), or **X** by *xFactor* and **Y** by *yFactor*. + +### InvScale, InvScale2 + +Syntax: *point*.**InvScale**( *divisor* ) \ +Syntax: *point*.**InvScale2**( *xDivisor*, *yDivisor* ) + +Divides both coordinates by *divisor*, or **X** by *xDivisor* and **Y** by *yDivisor*. + +### Transpose + +Syntax: *point*.**Transpose** + +Exchanges **X** and **Y**. + +### Normalize + +Syntax: *point*.**Normalize** + +Sets the length to 1 and keeps the direction. A zero vector stays as it is. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim p As GpPointF = GpPointF(3, 4) +p.Add GpPointF(1, 1) +Debug.Print p.X & "," & p.Y ' 4,5 +p.Sub GpPointF(1, 1) +p.Scale 2 +Debug.Print p.X & "," & p.Y ' 6,8 +p.Scale2 1, 3 +Debug.Print p.X & "," & p.Y ' 6,24 +p.InvScale 2 +p.InvScale2 3, 12 +Debug.Print p.X & "," & p.Y ' 1,1 +p.Transpose +p = GpPointF(3, 4) +p.Normalize +Debug.Print p.X & "," & p.Y ' 0.6,0.8 +``` + +## Query methods + +These return a new value and leave the point unchanged. + +### Sum, Diff + +Syntax: *point*.**Sum**( *other* As **GpPointF** ) As **GpPointF** \ +Syntax: *point*.**Diff**( *other* As **GpPointF** ) As **GpPointF** + +Returns the sum of the two vectors, or the point less *other*. + +### Prod, Prod2 + +Syntax: *point*.**Prod**( *factor* ) As **GpPointF** \ +Syntax: *point*.**Prod2**( *xFactor*, *yFactor* ) As **GpPointF** + +Returns the point with its coordinates multiplied. + +### Quot, Quot2 + +Syntax: *point*.**Quot**( *divisor* ) As **GpPointF** \ +Syntax: *point*.**Quot2**( *xDivisor*, *yDivisor* ) As **GpPointF** + +Returns the point with its coordinates divided. + +### DotProd + +Syntax: *point*.**DotProd**( *other* As **GpPointF** ) As **Single** + +Returns the dot product, `X * other.X + Y * other.Y`. + +### Equals + +Syntax: *point*.**Equals**( *other* As **GpPointF** ) As **Boolean** + +**True** when both coordinates are exactly equal to those of *other*. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim p As GpPointF = GpPointF(3, 4) +Dim s As GpPointF = p.Sum(GpPointF(1, 1)) +Debug.Print s.X & "," & s.Y ' 4,5 +Debug.Print p.X & "," & p.Y ' 3,4 +Debug.Print p.Diff(GpPointF(1, 1)).X ' 2 +Debug.Print p.Prod(2).Y ' 8 +Debug.Print p.Quot2(2, 4).Y ' 1 +Debug.Print p.DotProd(GpPointF(2, 1)) ' 10 +Debug.Print p.Equals(GpPointF(3, 4)) ' True +``` + +## See Also + +- [GpPoint](GpPoint) type -- the integer point +- [GpSizeF](GpSizeF) type -- a size +- [GpRectF](GpRectF) type -- a rectangle +- [Types](.) -- the types of the package +- [PointF](https://learn.microsoft.com/en-us/windows/win32/api/gdiplustypes/nl-gdiplustypes-pointf) -- the GDI+ class on Microsoft Learn diff --git a/docs/Reference/Contributed/GdiPlus/Types/GpPropertyItem.md b/docs/Reference/Contributed/GdiPlus/Types/GpPropertyItem.md new file mode 100644 index 00000000..e36e7989 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Types/GpPropertyItem.md @@ -0,0 +1,99 @@ +--- +title: GpPropertyItem +parent: Types +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Types/GpPropertyItem +--- + +# GpPropertyItem type +{: .no_toc } + +One property of an image file: an identifier, a type, and a value. + +Image files hold properties such as the camera model, the date a photograph was taken or the delay of a GIF frame. [**Image.PropertyItem**](../Image#propertyitem) sets one, and [**GetAllPropertyItems**](../Image#getallpropertyitems) returns all of them. The `PropertyTag...` constants of the package name the identifiers of the common properties, and the type of the value is a [**GpPropertyTagType**](../Enumerations/GpPropertyTagType). The type mirrors the GDI+ [PropertyItem](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusimaging/ns-gdiplusimaging-propertyitem) class. + +* TOC +{:toc} + +## Fields + +| Field | Type | Meaning | +|:------|:-----|:--------| +| **Id** | **Long** | The identifier of the property. | + +The length of the value in bytes, the type and the address of the value are kept in fields that begin with an underscore (`_length`, `_type`, `_address`), which a program sets to describe a value it supplies. They are read through the properties below. + +## Type tests + +Syntax: *t* **=** *item*.**Type** + +Syntax: *b* **=** *item*.**IsASCII** + +**Type** returns the [**GpPropertyTagType**](../Enumerations/GpPropertyTagType) of the value. **IsASCII**, **IsByte**, **IsShort**, **IsLong**, **IsRational**, **IsSByte**, **IsSShort**, **IsSLong**, **IsSRational**, **IsSingle** and **IsDouble** are **True** when **Type** is the type the name gives, and **IsUndefined** is **True** for the undefined type and for a type number out of range. + +## Reading the value + +Syntax: *v* **=** *item*.**TheLong** + +| Property | Reads | +|:---------|:------| +| **TheASCII** | A **String**, from the ASCII text. | +| **TheByte** | An unsigned byte, as an **Integer**. | +| **TheSByte** | A signed byte, as a **Byte**. | +| **TheShort** | An unsigned 16-bit number, as a **Long**. | +| **TheSShort** | A signed 16-bit number, as an **Integer**. | +| **TheLong** | An unsigned 32-bit number, as a **LongLong**. | +| **TheSLong** | A signed 32-bit number, as a **Long**. | +| **TheRational** | A pair of unsigned 32-bit numbers, as their quotient, a **Double**. | +| **TheSRational** | A pair of signed 32-bit numbers, as their quotient, a **Double**. | +| **TheSingle** | A 32-bit floating-point number. | +| **TheDouble** | A 64-bit floating-point number. | +| **AsDouble** | Any of the byte, short, long and floating-point types, as a **Double**. | + +A property returns 0 when the type of the value is not the one it reads. + +> [!WARNING] 0.9.45.0 +> Several of the readers test the wrong type and so return 0 for the values they are meant to read: **TheSByte** works only for a byte (not signed), **TheSLong** only for a short, **TheSShort** only for an unsigned short, and **TheDouble** only for a single. **AsDouble** returns 0 for the signed byte, signed short, signed long and double types for the same reason. **TheSRational** and the other readers work. + +### GetRational, GetSRational + +Syntax: *item*.**GetRational**( *num*, *denom* ) + +Syntax: *item*.**GetSRational**( *num*, *denom* ) + +Read a rational value as its numerator and denominator without dividing: **GetRational** as unsigned numbers (**LongLong**), **GetSRational** as signed ones (**Long**). + +> [!WARNING] 0.9.45.0 +> **GetSRational** tests for an unsigned rational, so it reads nothing from a signed one. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim ratio(0 To 1) As Long +ratio(0) = 7 +ratio(1) = 2 + +Dim item As GpPropertyItem +item.Id = PropertyTagXResolution +item._type = PropertyTagTypeRational +item._length = 8 +item._address = VarPtr(ratio(0)) + +Debug.Print Hex$(item.Id) & " " & item.IsRational & " " & item.IsLong +Debug.Print item.TheRational +Dim num As LongLong, denom As LongLong +item.GetRational num, denom +Debug.Print num & "/" & denom +Debug.Print item.AsDouble ' a rational is not covered by AsDouble +' Output: +' 11A True False +' 3.5 +' 7/2 +' 0 +``` + +## See Also + +- [PropertyItem](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusimaging/ns-gdiplusimaging-propertyitem) -- Microsoft's documentation of the GDI+ class +- [Image](../Image) class +- [GpPropertyTagType](../Enumerations/GpPropertyTagType) enumeration diff --git a/docs/Reference/Contributed/GdiPlus/Types/GpRect.md b/docs/Reference/Contributed/GdiPlus/Types/GpRect.md new file mode 100644 index 00000000..39fce2de --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Types/GpRect.md @@ -0,0 +1,293 @@ +--- +title: GpRect +parent: Types +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Types/GpRect +has_toc: false +--- + +# GpRect type +{: .no_toc } + +A rectangle with **Long** coordinates, whose sides are parallel to the axes. + +**GpRect** is the rectangle that the integer overloads of the drawing methods take and return. It is 16 bytes: the fields **X**, **Y**, **Width** and **Height**, followed by methods that read and change them. The floating-point counterpart is [**GpRectF**](GpRectF); a point is a [**GpPoint**](GpPoint) and a size a [**GpSize**](GpSize). It mirrors the `Rect` class of the GDI+ C++ wrapper. + +A variable declared with `Dim` starts as an empty rectangle at (0, 0). + +## Creating + +Syntax: **GpRect**( ) \ +Syntax: **GpRect**( *x*, *y* ) \ +Syntax: **GpRect**( *x*, *y*, *width*, *height* ) \ +Syntax: **GpRect**( *location* ) \ +Syntax: **GpRect**( *location*, *size* ) \ +Syntax: **GpRect**( *rect* ) \ +Syntax: **GpRectFrom**( *rect* ) + +The module function **GpRect** returns a new rectangle. The forms without a size give a rectangle of width 0 and height 0. + +*x*, *y*, *width*, *height* +: *required* **Long** values: the top left corner and the dimensions. + +*location* +: *required* A [**GpPoint**](GpPoint) giving the top left corner. + +*size* +: *required* A [**GpSize**](GpSize) giving the dimensions. + +*rect* +: *required* For **GpRect**, a [**GpRectF**](GpRectF), whose values are rounded to whole numbers (halves to the even number), or a structure of four **Long** fields `Left`, `Top`, `Right` and `Bottom`, which is the layout of the Windows `RECT` and is declared as **GDIP_RECT**. For **GpRectFrom**, a structure of four **Single** fields with the same names, declared as **GDIP_RECTF**. The rectangle has the same position, and the width and height are the differences of the edges. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim r As GpRect = GpRect(10, 20, 30, 40) +Debug.Print r.X & "," & r.Y & "," & r.Width & "," & r.Height ' 10,20,30,40 +Dim p As GpRect = GpRect(GpPoint(5, 6), GpSize(7, 8)) +Debug.Print p.X & "," & p.Y & "," & p.Width & "," & p.Height ' 5,6,7,8 +Dim q As GpRect = GpRect(GpRectF(1.5, 2.5, 3.5, 4.5)) +Debug.Print q.X & "," & q.Y & "," & q.Width & "," & q.Height ' 2,2,4,4 +Dim edges As GDIP_RECT +edges.Left = 1: edges.Top = 2: edges.Right = 11: edges.Bottom = 22 +Dim e As GpRect = GpRect(edges) +Debug.Print e.X & "," & e.Y & "," & e.Width & "," & e.Height ' 1,2,10,20 +``` + +## Fields and properties + +> [!NOTE] 0.9.45.0 +> The location and the size are independent. Setting **Location** does not change the size, and setting **Size** does not change the location. + +### X, Y, Width, Height + +The top left corner and the dimensions, as **Long** fields. Assign them directly. + +### Location + +Syntax: *rect*.**Location** [ = *value* ] As **GpPoint** + +Returns or sets the top left corner. + +### Size + +Syntax: *rect*.**Size** [ = *value* ] As **GpSize** + +Returns or sets the width and height. + +### Left, Top, Right, Bottom + +Syntax: *rect*.**Left** As **Long** + +Read-only. The coordinates of the four edges: **Left** is **X**, **Top** is **Y**, **Right** is **X** plus **Width** and **Bottom** is **Y** plus **Height**. + +### TopLeft, TopRight, BottomLeft, BottomRight + +Syntax: *rect*.**TopLeft** As **GpPoint** + +Read-only. The corners of the rectangle. + +### IsEmptyArea + +Syntax: *rect*.**IsEmptyArea** As **Boolean** + +Read-only. **True** when the width or the height is 0 or negative. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim r As GpRect = GpRect(10, 20, 30, 40) +Debug.Print r.Left & "," & r.Top & "," & r.Right & "," & r.Bottom ' 10,20,40,60 +Debug.Print r.TopRight.X & "," & r.BottomLeft.Y ' 40,60 +r.Location = GpPoint(0, 0) +Debug.Print r.Width ' 30 +r.Size = GpSize(3, 4) +Debug.Print r.Right & "," & r.Bottom ' 3,4 +Debug.Print GpRect(1, 1, 0, 5).IsEmptyArea ' True +Debug.Print r.IsEmptyArea ' False +``` + +## Conversion + +### AsGpRectF + +Syntax: *rect*.**AsGpRectF**( ) As **GpRectF** + +Returns the same rectangle with **Single** values. + +### SetFrom + +Syntax: *rect*.**SetFrom**( *source* As **GpRectF** ) + +Sets the rectangle from a [**GpRectF**](GpRectF), rounded as the constructor does. + +### AsRECT, AsRECTF + +Syntax: *rect*.**AsRECT**( ) As **GDIP_RECT** \ +Syntax: *rect*.**AsRECTF**( ) As **GDIP_RECTF** + +Return the rectangle as the four edges. + +### SetFromRECT, SetFromRECTF + +Syntax: *rect*.**SetFromRECT**( *source* As **GDIP_RECT** ) \ +Syntax: *rect*.**SetFromRECTF**( *source* As **GDIP_RECTF** ) + +Set the position and size from the four edges of *source*. **SetFromRECTF** rounds. + +### ToRECT + +Syntax: *rect*.**ToRECT**( *destination* As **GDIP_RECT** ) + +Writes the four edges into *destination*. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim r As GpRect = GpRect(10, 20, 30, 40) +Dim f As GpRectF = r.AsGpRectF() +Debug.Print f.Right & "," & f.Bottom ' 40,60 +Dim edges As GDIP_RECT +r.ToRECT edges +Debug.Print edges.Left & "," & edges.Top & "," & edges.Right & "," & edges.Bottom ' 10,20,40,60 +Dim edgesF As GDIP_RECTF +edgesF.Left = 1.5: edgesF.Top = 2.5: edgesF.Right = 11.5: edgesF.Bottom = 22.5 +r.SetFromRECTF edgesF +Debug.Print r.X & "," & r.Y & "," & r.Width & "," & r.Height ' 2,2,10,20 +``` + +## Modifying methods + +These change the rectangle they are called on. + +### Offset, OffsetPt + +Syntax: *rect*.**Offset**( *dx*, *dy* ) \ +Syntax: *rect*.**OffsetPt**( *point* As **GpPoint** ) + +Moves the rectangle by the given distance. + +### Inflate, InflatePt + +Syntax: *rect*.**Inflate**( *dx*, *dy* ) \ +Syntax: *rect*.**InflatePt**( *point* As **GpPoint** ) + +Moves the left and right edges apart by *dx* each and the top and bottom edges apart by *dy* each. **X** and **Y** decrease by *dx* and *dy*, and **Width** and **Height** increase by twice as much. A negative value shrinks the rectangle. **InflatePt** takes *dx* and *dy* from the point. + +### Intersect + +Syntax: *rect*.**Intersect**( *other* As **GpRect** ) As **Boolean** + +Sets the rectangle to its intersection with *other*, and returns **True** when the result is not empty. When the two do not overlap the rectangle is set to one with a negative width or height. + +### Unite + +Syntax: *rect*.**Unite**( *other* As **GpRect** ) As **Boolean** + +Sets the rectangle to the smallest rectangle that holds both it and *other*. Returns **False** when the result is empty, which happens only when both are empty rectangles at the same location: an empty rectangle counts as the single point at its location. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim r As GpRect = GpRect(10, 20, 30, 40) +r.Offset 1, 2 +Debug.Print r.X & "," & r.Y ' 11,22 +r.OffsetPt GpPoint(-1, -2) +r.Inflate 5, 6 +Debug.Print r.X & "," & r.Y & "," & r.Width & "," & r.Height ' 5,14,40,52 +r.InflatePt GpPoint(-5, -6) +Debug.Print r.X & "," & r.Y & "," & r.Width & "," & r.Height ' 10,20,30,40 +Dim a As GpRect = GpRect(0, 0, 10, 10) +Dim b As GpRect = GpRect(5, 5, 10, 10) +Dim u As GpRect = a +Debug.Print a.Intersect(b) ' True +Debug.Print a.X & "," & a.Y & "," & a.Width & "," & a.Height ' 5,5,5,5 +Debug.Print u.Unite(b) ' True +Debug.Print u.X & "," & u.Y & "," & u.Width & "," & u.Height ' 0,0,15,15 +Debug.Print GpRect(1, 1).Unite(GpRect(1, 1)) ' False +``` + +## Query methods + +These return a new value and leave the rectangle unchanged. + +### Equals + +Syntax: *rect*.**Equals**( *other* As **GpRect** ) As **Boolean** + +**True** when the position and the size equal those of *other*. + +### Contains2, ContainsPt + +Syntax: *rect*.**Contains2**( *x*, *y* ) As **Boolean** \ +Syntax: *rect*.**ContainsPt**( *point* As **GpPoint** ) As **Boolean** + +**True** when the point is inside the rectangle. The left and top edges are inside; the right and bottom edges are not. + +### Contains + +Syntax: *rect*.**Contains**( *other* As **GpRect** ) As **Boolean** + +**True** when *other* lies entirely within the rectangle. Sharing an edge counts as within. + +### IntersectsWith + +Syntax: *rect*.**IntersectsWith**( *other* As **GpRect** ) As **Boolean** + +**True** when the two rectangles overlap. Rectangles that only touch at an edge do not overlap. + +### IntersectedWith, UnitedWith + +Syntax: *rect*.**IntersectedWith**( *other* As **GpRect** ) As **GpRect** \ +Syntax: *rect*.**UnitedWith**( *other* As **GpRect** ) As **GpRect** + +Return the intersection or the bounding rectangle. As with [**Intersect**](#intersect) and [**Unite**](#unite), the intersection of rectangles that do not overlap has a negative width or height. + +### OffsetBy, OffsetByPt, InflatedBy, InflatedByPt + +Syntax: *rect*.**OffsetBy**( *dx*, *dy* ) As **GpRect** \ +Syntax: *rect*.**OffsetByPt**( *point* As **GpPoint** ) As **GpRect** \ +Syntax: *rect*.**InflatedBy**( *dx*, *dy* ) As **GpRect** \ +Syntax: *rect*.**InflatedByPt**( *point* As **GpPoint** ) As **GpRect** + +Return a copy of the rectangle moved or inflated as [**Offset**](#offset-offsetpt) and [**Inflate**](#inflate-inflatept) do. + +> [!NOTE] 0.9.45.0, BETA 1005 +> A program that names any of these four methods does not link: the linker reports a code generation error in the method. Copy the rectangle and call **Offset**, **OffsetPt**, **Inflate** or **InflatePt** on the copy. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim r As GpRect = GpRect(10, 20, 30, 40) +Debug.Print r.Contains2(10, 20) ' True +Debug.Print r.Contains2(40, 60) ' False +Debug.Print r.ContainsPt(GpPoint(39, 59)) ' True +Debug.Print r.Contains(GpRect(11, 21, 5, 5)) ' True +Debug.Print r.IntersectsWith(GpRect(40, 60, 5, 5)) ' False +Dim i As GpRect = r.IntersectedWith(GpRect(30, 40, 30, 40)) +Debug.Print i.X & "," & i.Y & "," & i.Width & "," & i.Height ' 30,40,10,20 +Dim u As GpRect = r.UnitedWith(GpRect(30, 40, 30, 40)) +Debug.Print u.X & "," & u.Y & "," & u.Width & "," & u.Height ' 10,20,50,60 +Debug.Print r.Equals(GpRect(10, 20, 30, 40)) ' True +``` + +## Free-standing functions + +### Intersection, Union + +Syntax: **Intersection**( *result* As **GpRect**, *a* As **GpRect**, *b* As **GpRect** ) As **Boolean** \ +Syntax: **Union**( *result* As **GpRect**, *a* As **GpRect**, *b* As **GpRect** ) As **Boolean** + +Set *result* to the intersection of *a* and *b*, or to the smallest rectangle that holds both. Each returns **True** when the result is not empty. The functions also exist for [**GpRectF**](GpRectF) arguments. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim c As GpRect +Debug.Print Intersection(c, GpRect(0, 0, 10, 10), GpRect(5, 5, 10, 10)) ' True +Debug.Print c.X & "," & c.Y & "," & c.Width & "," & c.Height ' 5,5,5,5 +Debug.Print Union(c, GpRect(0, 0, 10, 10), GpRect(5, 5, 10, 10)) ' True +Debug.Print c.X & "," & c.Y & "," & c.Width & "," & c.Height ' 0,0,15,15 +``` + +## See Also + +- [GpRectF](GpRectF) type -- the floating-point rectangle +- [GpPoint](GpPoint) type -- a point +- [GpSize](GpSize) type -- a size +- [Types](.) -- the types of the package +- [Rect](https://learn.microsoft.com/en-us/windows/win32/api/gdiplustypes/nl-gdiplustypes-rect) -- the GDI+ class on Microsoft Learn diff --git a/docs/Reference/Contributed/GdiPlus/Types/GpRectF.md b/docs/Reference/Contributed/GdiPlus/Types/GpRectF.md new file mode 100644 index 00000000..434142ef --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Types/GpRectF.md @@ -0,0 +1,307 @@ +--- +title: GpRectF +parent: Types +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Types/GpRectF +has_toc: false +--- + +# GpRectF type +{: .no_toc } + +A rectangle with **Single** coordinates, whose sides are parallel to the axes. + +**GpRectF** is the rectangle that the **Single** overloads of the drawing methods take and return. It is 16 bytes: the fields **X**, **Y**, **Width** and **Height**, followed by methods that read and change them. The integer counterpart is [**GpRect**](GpRect); a point is a [**GpPointF**](GpPointF) and a size a [**GpSizeF**](GpSizeF). It mirrors the `RectF` class of the GDI+ C++ wrapper. + +A variable declared with `Dim` starts as an empty rectangle at (0, 0). + +## Creating + +Syntax: **GpRectF**( ) \ +Syntax: **GpRectF**( *x*, *y* ) \ +Syntax: **GpRectF**( *x*, *y*, *width*, *height* ) \ +Syntax: **GpRectF**( *location* ) \ +Syntax: **GpRectF**( *location*, *size* ) \ +Syntax: **GpRectF**( *rect* ) \ +Syntax: **GpRectFFrom**( *rect* ) + +The module function **GpRectF** returns a new rectangle. The forms without a size give a rectangle of width 0 and height 0. + +*x*, *y*, *width*, *height* +: *required* **Single** values: the top left corner and the dimensions. + +*location* +: *required* A [**GpPointF**](GpPointF) giving the top left corner. + +*size* +: *required* A [**GpSizeF**](GpSizeF) giving the dimensions. + +*rect* +: *required* For **GpRectF**, a [**GpRect**](GpRect) or a structure of four **Single** fields `Left`, `Top`, `Right` and `Bottom`, declared as **GDIP_RECTF**. For **GpRectFFrom**, a structure of four **Long** fields with the same names, which is the layout of the Windows `RECT` and is declared as **GDIP_RECT**. The rectangle has the same position, and the width and height are the differences of the edges. + +> [!WARNING] 0.9.45.0 +> **GpRectFFrom** returns an empty rectangle at (0, 0) whatever its argument holds. Use [**SetFromRECT**](#setfromrect-setfromrectf) instead. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim r As GpRectF = GpRectF(10, 20, 30, 40) +Debug.Print r.X & "," & r.Y & "," & r.Width & "," & r.Height ' 10,20,30,40 +Dim p As GpRectF = GpRectF(GpPointF(5, 6), GpSizeF(7, 8)) +Debug.Print p.X & "," & p.Y & "," & p.Width & "," & p.Height ' 5,6,7,8 +Dim q As GpRectF = GpRectF(GpRect(1, 2, 3, 4)) +Debug.Print q.X & "," & q.Y & "," & q.Width & "," & q.Height ' 1,2,3,4 +Dim edges As GDIP_RECTF +edges.Left = 1.5: edges.Top = 2.5: edges.Right = 11.5: edges.Bottom = 22.5 +Dim e As GpRectF = GpRectF(edges) +Debug.Print e.X & "," & e.Y & "," & e.Width & "," & e.Height ' 1.5,2.5,10,20 +``` + +## Fields and properties + +> [!NOTE] 0.9.45.0 +> The location and the size are independent. Setting **Location** does not change the size, and setting **Size** does not change the location. + +### X, Y, Width, Height + +The top left corner and the dimensions, as **Single** fields. Assign them directly. + +### Location + +Syntax: *rect*.**Location** [ = *value* ] As **GpPointF** + +Returns or sets the top left corner. + +### Size + +Syntax: *rect*.**Size** [ = *value* ] As **GpSizeF** + +Returns or sets the width and height. + +### Left, Top, Right, Bottom + +Syntax: *rect*.**Left** As **Single** + +Read-only. The coordinates of the four edges: **Left** is **X**, **Top** is **Y**, **Right** is **X** plus **Width** and **Bottom** is **Y** plus **Height**. + +### TopLeft, TopRight, BottomLeft, BottomRight + +Syntax: *rect*.**TopLeft** As **GpPointF** + +Read-only. The corners of the rectangle. + +### IsEmptyArea + +Syntax: *rect*.**IsEmptyArea** As **Boolean** + +Read-only. **True** when the width or the height is at most [**REAL_EPSILON**](../Helpers#real_epsilon), which includes a negative one. + +### Diagonal + +Syntax: *rect*.**Diagonal** [ = *value* ] As **Single** + +Returns the length of the diagonal. Setting it scales **Width** and **Height** by the same factor so that the diagonal has the given length; the location does not change. A rectangle whose diagonal is shorter than twice [**REAL_EPSILON**](../Helpers#real_epsilon) is not changed. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim r As GpRectF = GpRectF(10, 20, 30, 40) +Debug.Print r.Left & "," & r.Top & "," & r.Right & "," & r.Bottom ' 10,20,40,60 +Debug.Print r.TopRight.X & "," & r.BottomLeft.Y ' 40,60 +r.Location = GpPointF(0, 0) +Debug.Print r.Width ' 30 +r.Size = GpSizeF(3, 4) +Debug.Print r.Diagonal ' 5 +r.Diagonal = 10 +Debug.Print r.Width & "," & r.Height ' 6,8 +Debug.Print GpRectF(1, 1, 0, 5).IsEmptyArea ' True +Debug.Print GpRectF(1, 1, -2, 5).IsEmptyArea ' True +Debug.Print r.IsEmptyArea ' False +``` + +## Conversion + +### AsGpRect + +Syntax: *rect*.**AsGpRect**( ) As **GpRect** + +Returns the rectangle with all four values rounded to whole numbers, halves to the even number. + +### SetFrom + +Syntax: *rect*.**SetFrom**( *source* As **GpRect** ) + +Sets the rectangle from a [**GpRect**](GpRect). + +### AsRECT, AsRECTF + +Syntax: *rect*.**AsRECT**( ) As **GDIP_RECT** \ +Syntax: *rect*.**AsRECTF**( ) As **GDIP_RECTF** + +Return the rectangle as the four edges. **AsRECT** rounds each edge as **AsGpRect** does. + +### SetFromRECT, SetFromRECTF + +Syntax: *rect*.**SetFromRECT**( *source* As **GDIP_RECT** ) \ +Syntax: *rect*.**SetFromRECTF**( *source* As **GDIP_RECTF** ) + +Set the position and size from the four edges of *source*. + +### ToRECTF + +Syntax: *rect*.**ToRECTF**( *destination* As **GDIP_RECTF** ) + +Writes the four edges into *destination*. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim r As GpRectF = GpRectF(1.5, 2.5, 3.5, 4.5) +Dim whole As GpRect = r.AsGpRect() +Debug.Print whole.X & "," & whole.Y & "," & whole.Width & "," & whole.Height ' 2,2,4,4 +Dim edges As GDIP_RECTF +r.ToRECTF edges +Debug.Print edges.Left & "," & edges.Top & "," & edges.Right & "," & edges.Bottom ' 1.5,2.5,5,7 +Dim winRect As GDIP_RECT +winRect.Left = 1: winRect.Top = 2: winRect.Right = 11: winRect.Bottom = 22 +r.SetFromRECT winRect +Debug.Print r.X & "," & r.Y & "," & r.Width & "," & r.Height ' 1,2,10,20 +``` + +## Modifying methods + +These change the rectangle they are called on. + +### Offset, OffsetPt + +Syntax: *rect*.**Offset**( *dx*, *dy* ) \ +Syntax: *rect*.**OffsetPt**( *point* As **GpPointF** ) + +Moves the rectangle by the given distance. + +### Inflate, InflatePt + +Syntax: *rect*.**Inflate**( *dx*, *dy* ) \ +Syntax: *rect*.**InflatePt**( *point* As **GpPointF** ) + +Moves the left and right edges apart by *dx* each and the top and bottom edges apart by *dy* each. **X** and **Y** decrease by *dx* and *dy*, and **Width** and **Height** increase by twice as much. A negative value shrinks the rectangle. **InflatePt** takes *dx* and *dy* from the point. + +### Intersect + +Syntax: *rect*.**Intersect**( *other* As **GpRectF** ) As **Boolean** + +Sets the rectangle to its intersection with *other*, and returns **True** when the result is not empty. When the two do not overlap the rectangle is set to one with a negative width or height. + +### Unite + +Syntax: *rect*.**Unite**( *other* As **GpRectF** ) As **Boolean** + +Sets the rectangle to the smallest rectangle that holds both it and *other*. Returns **False** when the result is empty, which happens only when both are empty rectangles at the same location: an empty rectangle counts as the single point at its location. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim r As GpRectF = GpRectF(10, 20, 30, 40) +r.Offset 1, 2 +Debug.Print r.X & "," & r.Y ' 11,22 +r.OffsetPt GpPointF(-1, -2) +r.Inflate 5, 6 +Debug.Print r.X & "," & r.Y & "," & r.Width & "," & r.Height ' 5,14,40,52 +Dim a As GpRectF = GpRectF(0, 0, 10, 10) +Dim b As GpRectF = GpRectF(5, 5, 10, 10) +Dim u As GpRectF = a +Debug.Print a.Intersect(b) ' True +Debug.Print a.X & "," & a.Y & "," & a.Width & "," & a.Height ' 5,5,5,5 +Debug.Print u.Unite(b) ' True +Debug.Print u.X & "," & u.Y & "," & u.Width & "," & u.Height ' 0,0,15,15 +Dim far As GpRectF = GpRectF(100, 100, 5, 5) +Debug.Print b.Intersect(far) ' False +Debug.Print b.Width & "," & b.Height ' -85,-85 +``` + +## Query methods + +These return a new value and leave the rectangle unchanged. + +### Equals + +Syntax: *rect*.**Equals**( *other* As **GpRectF** ) As **Boolean** + +**True** when the position and the size are exactly those of *other*. + +### Contains2, ContainsPt + +Syntax: *rect*.**Contains2**( *x*, *y* ) As **Boolean** \ +Syntax: *rect*.**ContainsPt**( *point* As **GpPointF** ) As **Boolean** + +**True** when the point is inside the rectangle. The left and top edges are inside; the right and bottom edges are not. + +### Contains + +Syntax: *rect*.**Contains**( *other* As **GpRectF** ) As **Boolean** + +**True** when *other* lies entirely within the rectangle. Sharing an edge counts as within. + +### IntersectsWith + +Syntax: *rect*.**IntersectsWith**( *other* As **GpRectF** ) As **Boolean** + +**True** when the two rectangles overlap. Rectangles that only touch at an edge do not overlap. + +### IntersectedWith, UnitedWith + +Syntax: *rect*.**IntersectedWith**( *other* As **GpRectF** ) As **GpRectF** \ +Syntax: *rect*.**UnitedWith**( *other* As **GpRectF** ) As **GpRectF** + +Return the intersection or the bounding rectangle. As with [**Intersect**](#intersect) and [**Unite**](#unite), the intersection of rectangles that do not overlap has a negative width or height. + +### OffsetBy, OffsetByPt, InflatedBy, InflatedByPt + +Syntax: *rect*.**OffsetBy**( *dx*, *dy* ) As **GpRectF** \ +Syntax: *rect*.**OffsetByPt**( *point* As **GpPointF** ) As **GpRectF** \ +Syntax: *rect*.**InflatedBy**( *dx*, *dy* ) As **GpRectF** \ +Syntax: *rect*.**InflatedByPt**( *point* As **GpPointF** ) As **GpRectF** + +Return a copy of the rectangle moved or inflated as [**Offset**](#offset-offsetpt) and [**Inflate**](#inflate-inflatept) do. + +> [!NOTE] 0.9.45.0, BETA 1005 +> A program that names any of these four methods does not link: the linker reports a code generation error in the method. Copy the rectangle and call **Offset**, **OffsetPt**, **Inflate** or **InflatePt** on the copy. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim r As GpRectF = GpRectF(10, 20, 30, 40) +Debug.Print r.Contains2(10, 20) ' True +Debug.Print r.Contains2(40, 60) ' False +Debug.Print r.ContainsPt(GpPointF(39.5, 59.5)) ' True +Debug.Print r.Contains(GpRectF(11, 21, 5, 5)) ' True +Debug.Print r.Contains(GpRectF(5, 5, 30, 40)) ' False +Debug.Print r.IntersectsWith(GpRectF(40, 60, 5, 5)) ' False +Debug.Print r.IntersectsWith(GpRectF(30, 40, 30, 40)) ' True +Dim i As GpRectF = r.IntersectedWith(GpRectF(30, 40, 30, 40)) +Debug.Print i.X & "," & i.Y & "," & i.Width & "," & i.Height ' 30,40,10,20 +Dim u As GpRectF = r.UnitedWith(GpRectF(30, 40, 30, 40)) +Debug.Print u.X & "," & u.Y & "," & u.Width & "," & u.Height ' 10,20,50,60 +Debug.Print r.Equals(GpRectF(10, 20, 30, 40)) ' True +``` + +## Free-standing functions + +### Intersection, Union + +Syntax: **Intersection**( *result* As **GpRectF**, *a* As **GpRectF**, *b* As **GpRectF** ) As **Boolean** \ +Syntax: **Union**( *result* As **GpRectF**, *a* As **GpRectF**, *b* As **GpRectF** ) As **Boolean** + +Set *result* to the intersection of *a* and *b*, or to the smallest rectangle that holds both. Each returns **True** when the result is not empty. The functions also exist for [**GpRect**](GpRect) arguments. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim c As GpRectF +Debug.Print Intersection(c, GpRectF(0, 0, 10, 10), GpRectF(5, 5, 10, 10)) ' True +Debug.Print c.X & "," & c.Y & "," & c.Width & "," & c.Height ' 5,5,5,5 +Debug.Print Union(c, GpRectF(0, 0, 10, 10), GpRectF(5, 5, 10, 10)) ' True +Debug.Print c.X & "," & c.Y & "," & c.Width & "," & c.Height ' 0,0,15,15 +``` + +## See Also + +- [GpRect](GpRect) type -- the integer rectangle +- [GpPointF](GpPointF) type -- a point +- [GpSizeF](GpSizeF) type -- a size +- [Types](.) -- the types of the package +- [RectF](https://learn.microsoft.com/en-us/windows/win32/api/gdiplustypes/nl-gdiplustypes-rectf) -- the GDI+ class on Microsoft Learn diff --git a/docs/Reference/Contributed/GdiPlus/Types/GpSize.md b/docs/Reference/Contributed/GdiPlus/Types/GpSize.md new file mode 100644 index 00000000..54ac6e40 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Types/GpSize.md @@ -0,0 +1,145 @@ +--- +title: GpSize +parent: Types +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Types/GpSize +has_toc: false +--- + +# GpSize type +{: .no_toc } + +A width and a height as **Long** values. + +**GpSize** is the size that the integer overloads of the drawing and measuring methods take and return. It is 8 bytes: the fields **Width** and **Height**, followed by methods that read and change them. The floating-point counterpart is [**GpSizeF**](GpSizeF); a point is a [**GpPoint**](GpPoint) and a rectangle a [**GpRect**](GpRect). It mirrors the `Size` class of the GDI+ C++ wrapper. + +A variable declared with `Dim` starts at 0 by 0. + +## Creating + +Syntax: **GpSize**( ) \ +Syntax: **GpSize**( *width*, *height* ) \ +Syntax: **GpSize**( *size* ) \ +Syntax: **GpSizeFrom**( *size* ) + +The module function **GpSize** returns a new size. + +*width*, *height* +: *required* A **Long** giving each dimension. + +*size* +: *required* For **GpSize**, a [**GpSizeF**](GpSizeF); its dimensions are rounded to whole numbers, halves to the even number (2.5 becomes 2, 3.5 becomes 4). For **GpSizeFrom**, a structure of two **Long** fields `cx` and `cy`, which is the layout of the Windows `SIZE` and is declared as **GDIP_SIZE**. + +With no arguments the size is 0 by 0. + +> [!WARNING] 0.9.45.0 +> **GpSizeFrom** returns a size of 0 by 0 whatever its argument holds. Set the size with [**SetFromSIZE**](#assize-setfromsize) instead. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim s As GpSize = GpSize(3, 4) +Debug.Print s.Width & "," & s.Height ' 3,4 +Dim rounded As GpSize = GpSize(GpSizeF(2.5, 3.5)) +Debug.Print rounded.Width & "," & rounded.Height ' 2,4 +Debug.Print GpSize().Empty ' True +``` + +## Fields and properties + +### Width, Height + +The dimensions, as **Long** fields. Assign them directly. + +### Empty + +Syntax: *size*.**Empty** As **Boolean** + +Read-only. **True** when both dimensions are 0. + +## Conversion + +### AsGpSizeF + +Syntax: *size*.**AsGpSizeF**( ) As **GpSizeF** + +Returns the same dimensions as **Single** values. + +### SetFrom + +Syntax: *size*.**SetFrom**( *source* ) + +Sets both dimensions from a [**GpSizeF**](GpSizeF), rounded as the constructor does. + +### AsSIZE, SetFromSIZE + +Syntax: *size*.**AsSIZE**( ) As **GDIP_SIZE** \ +Syntax: *size*.**SetFromSIZE**( *source* As **GDIP_SIZE** ) + +Convert to and from the `SIZE`-shaped structure described under [Creating](#creating). + +### AsGpRect, AsGpRectF, AsRECT + +Syntax: *size*.**AsGpRect**( ) As **GpRect** \ +Syntax: *size*.**AsGpRectF**( ) As **GpRectF** \ +Syntax: *size*.**AsRECT**( ) As **GDIP_RECT** + +Return a rectangle of this size with its top left corner at (0, 0). **AsRECT** returns the structure of four **Long** fields `Left`, `Top`, `Right` and `Bottom`, which is the layout of the Windows `RECT`; it is declared as **GDIP_RECT**. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim s As GpSize = GpSize(5, 6) +Dim r As GpRect = s.AsGpRect() +Debug.Print r.X & "," & r.Y & "," & r.Width & "," & r.Height ' 0,0,5,6 +Debug.Print s.AsGpSizeF().Width ' 5 +Dim winSize As GDIP_SIZE +winSize.cx = 9: winSize.cy = 10 +s.SetFromSIZE winSize +Debug.Print s.AsSIZE().cx & "," & s.AsSIZE().cy ' 9,10 +``` + +## Modifying methods + +> [!NOTE] 0.9.45.0 +> **Add** and **Sub** change the size they are called on. Before version 0.9.0.43 they returned the result and left the size alone. Use [**Sum**](#sum-diff) and [**Diff**](#sum-diff) to get a new size. + +### Add, Sub + +Syntax: *size*.**Add**( *other* As **GpSize** ) \ +Syntax: *size*.**Sub**( *other* As **GpSize** ) + +Adds *other* to the size, or subtracts it. + +## Query methods + +### Sum, Diff + +Syntax: *size*.**Sum**( *other* As **GpSize** ) As **GpSize** \ +Syntax: *size*.**Diff**( *other* As **GpSize** ) As **GpSize** + +Returns the sum of the two sizes, or the size less *other*. + +### Equals + +Syntax: *size*.**Equals**( *other* As **GpSize** ) As **Boolean** + +**True** when both dimensions equal those of *other*. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim s As GpSize = GpSize(3, 4) +s.Add GpSize(1, 1) +Debug.Print s.Width & "," & s.Height ' 4,5 +s.Sub GpSize(2, 2) +Debug.Print s.Width & "," & s.Height ' 2,3 +Debug.Print s.Sum(GpSize(10, 10)).Width ' 12 +Debug.Print s.Diff(GpSize(1, 1)).Height ' 2 +Debug.Print s.Equals(GpSize(2, 3)) ' True +``` + +## See Also + +- [GpSizeF](GpSizeF) type -- the floating-point size +- [GpPoint](GpPoint) type -- a point +- [GpRect](GpRect) type -- a rectangle +- [Types](.) -- the types of the package +- [Size](https://learn.microsoft.com/en-us/windows/win32/api/gdiplustypes/nl-gdiplustypes-size) -- the GDI+ class on Microsoft Learn diff --git a/docs/Reference/Contributed/GdiPlus/Types/GpSizeF.md b/docs/Reference/Contributed/GdiPlus/Types/GpSizeF.md new file mode 100644 index 00000000..6d53c9d6 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Types/GpSizeF.md @@ -0,0 +1,208 @@ +--- +title: GpSizeF +parent: Types +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Types/GpSizeF +has_toc: false +--- + +# GpSizeF type +{: .no_toc } + +A width and a height as **Single** values. + +**GpSizeF** is the size that the **Single** overloads of the drawing and measuring methods take and return. It is 8 bytes: the fields **Width** and **Height**, followed by methods that read and change them. The integer counterpart is [**GpSize**](GpSize); a point is a [**GpPointF**](GpPointF) and a rectangle a [**GpRectF**](GpRectF). It mirrors the `SizeF` class of the GDI+ C++ wrapper. + +A variable declared with `Dim` starts at 0 by 0. + +## Creating + +Syntax: **GpSizeF**( ) \ +Syntax: **GpSizeF**( *width*, *height* ) \ +Syntax: **GpSizeF**( *size* ) \ +Syntax: **GpSizeFFrom**( *size* ) + +The module function **GpSizeF** returns a new size. + +*width*, *height* +: *required* A **Single** giving each dimension. + +*size* +: *required* For **GpSizeF**, a [**GpSize**](GpSize) with the same dimensions. For **GpSizeFFrom**, a structure of two **Long** fields `cx` and `cy`, which is the layout of the Windows `SIZE` and is declared as **GDIP_SIZE**. + +With no arguments the size is 0 by 0. + +> [!WARNING] 0.9.45.0 +> **GpSizeFFrom** returns a size of 0 by 0 whatever its argument holds. Set the size with [**SetFromSIZE**](#assize-setfromsize) instead. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim s As GpSizeF = GpSizeF(3, 4) +Debug.Print s.Width & "," & s.Height ' 3,4 +Debug.Print GpSizeF().Empty ' True +Dim fromInt As GpSizeF = GpSizeF(GpSize(7, 8)) +Debug.Print fromInt.Width & "," & fromInt.Height ' 7,8 +``` + +## Fields and properties + +### Width, Height + +The dimensions, as **Single** fields. Assign them directly. + +### Empty + +Syntax: *size*.**Empty** As **Boolean** + +Read-only. **True** when both dimensions are exactly 0. + +### Diagonal + +Syntax: *size*.**Diagonal** [ = *value* ] As **Single** + +Returns the length of the diagonal of a rectangle of this size. Setting it scales both dimensions so that the diagonal has the given length. Setting the diagonal of a size whose diagonal is shorter than twice [**REAL_EPSILON**](../Helpers#real_epsilon) changes nothing. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim s As GpSizeF = GpSizeF(3, 4) +Debug.Print s.Diagonal ' 5 +s.Diagonal = 10 +Debug.Print s.Width & "," & s.Height ' 6,8 +``` + +## Conversion + +### AsGpSize + +Syntax: *size*.**AsGpSize**( ) As **GpSize** + +Returns the size with both dimensions rounded to whole numbers, halves to the even number (2.5 becomes 2, 3.5 becomes 4). + +### SetFrom + +Syntax: *size*.**SetFrom**( *source* ) + +Sets both dimensions from a [**GpSize**](GpSize). + +### AsSIZE, SetFromSIZE + +Syntax: *size*.**AsSIZE**( ) As **GDIP_SIZE** \ +Syntax: *size*.**SetFromSIZE**( *source* As **GDIP_SIZE** ) + +Convert to and from the `SIZE`-shaped structure described under [Creating](#creating). **AsSIZE** rounds as **AsGpSize** does. + +### AsGpRectF, AsGpRect, AsRECT + +Syntax: *size*.**AsGpRectF**( ) As **GpRectF** \ +Syntax: *size*.**AsGpRect**( ) As **GpRect** \ +Syntax: *size*.**AsRECT**( ) As **GDIP_RECT** + +Return a rectangle of this size with its top left corner at (0, 0). **AsRECT** returns the structure of four **Long** fields `Left`, `Top`, `Right` and `Bottom`, which is the layout of the Windows `RECT`; it is declared as **GDIP_RECT**. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim s As GpSizeF = GpSizeF(2.5, 3.5) +Dim whole As GpSize = s.AsGpSize() +Debug.Print whole.Width & "," & whole.Height ' 2,4 +Dim r As GpRectF = s.AsGpRectF() +Debug.Print r.X & "," & r.Y & "," & r.Width & "," & r.Height ' 0,0,2.5,3.5 +Dim winSize As GDIP_SIZE +winSize.cx = 9: winSize.cy = 10 +s.SetFromSIZE winSize +Debug.Print s.Width & "," & s.Height ' 9,10 +Debug.Print s.AsRECT().Right & "," & s.AsRECT().Bottom ' 9,10 +``` + +## Modifying methods + +These change the size they are called on. + +> [!NOTE] 0.9.45.0 +> **Add** and **Sub** change the size they are called on. Before version 0.9.0.43 they returned the result and left the size alone. Use [**Sum**](#sum-diff) and [**Diff**](#sum-diff) to get a new size. + +> [!NOTE] 0.9.45.0, BETA 1005 +> The compiler reads `s.Scale(2)` as the start of a `Scale` statement and reports a syntax error. Write `s.Scale 2` or `Call s.Scale(2)`. **Scale2**, **InvScale** and the other methods are not affected. + +### Add, Sub + +Syntax: *size*.**Add**( *other* As **GpSizeF** ) \ +Syntax: *size*.**Sub**( *other* As **GpSizeF** ) + +Adds *other* to the size, or subtracts it. + +### Scale, Scale2 + +Syntax: *size*.**Scale** *factor* \ +Syntax: *size*.**Scale2**( *widthFactor*, *heightFactor* ) + +Multiplies both dimensions by *factor*, or **Width** by *widthFactor* and **Height** by *heightFactor*. + +### InvScale, InvScale2 + +Syntax: *size*.**InvScale**( *divisor* ) \ +Syntax: *size*.**InvScale2**( *widthDivisor*, *heightDivisor* ) + +Divides both dimensions by *divisor*, or **Width** by *widthDivisor* and **Height** by *heightDivisor*. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim s As GpSizeF = GpSizeF(3, 4) +s.Add GpSizeF(1, 1) +s.Sub GpSizeF(0, 2) +Debug.Print s.Width & "," & s.Height ' 4,3 +s.Scale 2 +s.Scale2 1, 3 +Debug.Print s.Width & "," & s.Height ' 8,18 +s.InvScale 2 +s.InvScale2 2, 9 +Debug.Print s.Width & "," & s.Height ' 2,1 +``` + +## Query methods + +These return a new value and leave the size unchanged. + +### Sum, Diff + +Syntax: *size*.**Sum**( *other* As **GpSizeF** ) As **GpSizeF** \ +Syntax: *size*.**Diff**( *other* As **GpSizeF** ) As **GpSizeF** + +Returns the sum of the two sizes, or the size less *other*. + +### Prod, Prod2 + +Syntax: *size*.**Prod**( *factor* ) As **GpSizeF** \ +Syntax: *size*.**Prod2**( *widthFactor*, *heightFactor* ) As **GpSizeF** + +Returns the size with its dimensions multiplied. + +### Quot, Quot2 + +Syntax: *size*.**Quot**( *divisor* ) As **GpSizeF** \ +Syntax: *size*.**Quot2**( *widthDivisor*, *heightDivisor* ) As **GpSizeF** + +Returns the size with its dimensions divided. + +### Equals + +Syntax: *size*.**Equals**( *other* As **GpSizeF** ) As **Boolean** + +**True** when both dimensions are exactly equal to those of *other*. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim s As GpSizeF = GpSizeF(3, 4) +Debug.Print s.Sum(GpSizeF(1, 1)).Width ' 4 +Debug.Print s.Diff(GpSizeF(1, 1)).Height ' 3 +Debug.Print s.Prod2(2, 3).Height ' 12 +Debug.Print s.Quot(2).Width ' 1.5 +Debug.Print s.Equals(GpSizeF(3, 4)) ' True +``` + +## See Also + +- [GpSize](GpSize) type -- the integer size +- [GpPointF](GpPointF) type -- a point +- [GpRectF](GpRectF) type -- a rectangle +- [Types](.) -- the types of the package +- [SizeF](https://learn.microsoft.com/en-us/windows/win32/api/gdiplustypes/nl-gdiplustypes-sizef) -- the GDI+ class on Microsoft Learn diff --git a/docs/Reference/Contributed/GdiPlus/Types/HueSaturationLightnessParams.md b/docs/Reference/Contributed/GdiPlus/Types/HueSaturationLightnessParams.md new file mode 100644 index 00000000..77932608 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Types/HueSaturationLightnessParams.md @@ -0,0 +1,52 @@ +--- +title: HueSaturationLightnessParams +parent: Types +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Types/HueSaturationLightnessParams +--- + +# HueSaturationLightnessParams type +{: .no_toc } + +The parameters of a [**HueSaturationLightness**](../HueSaturationLightness) effect: the change of hue, saturation and lightness. + +The type mirrors the GDI+ [HueSaturationLightnessParams](https://learn.microsoft.com/en-us/windows/win32/api/gdipluseffects/ns-gdipluseffects-huesaturationlightnessparams) structure. A **HueSaturationLightness** takes it in its constructor and in its **Parameters** property. + +## Fields + +| Field | Type | Meaning | +|:------|:-----|:--------| +| **hue** | **Long** | The turn of the hue, in degrees from -180 to 180. | +| **saturation** | **Long** | The change of saturation, from -100 to 100. | +| **lightness** | **Long** | The change of lightness, from -100 to 100. | + +## Properties + +**hueLevel**, **saturationLevel** and **lightnessLevel** are other names for **hue**, **saturation** and **lightness**, the names that the C++ structure has. They are declared as object properties, so the value is read with `params.hueLevel` and written with the **Set** statement: `Set params.hueLevel = 5`. + +## Creating + +Syntax: *params* **= HueSaturationLightnessParams**( *hue*, *saturation*, *lightness* ) + +*hue*, *saturation*, *lightness* +: *required* **Long** values for the fields. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim p As HueSaturationLightnessParams = HueSaturationLightnessParams(30, -10, 5) +Debug.Print p.hue & " " & p.saturation & " " & p.lightness +Debug.Print p.hueLevel + +Set p.hueLevel = 45 +Debug.Print p.hue +' Output: +' 30 -10 5 +' 30 +' 45 +``` + +## See Also + +- [HueSaturationLightnessParams](https://learn.microsoft.com/en-us/windows/win32/api/gdipluseffects/ns-gdipluseffects-huesaturationlightnessparams) -- Microsoft's documentation of the GDI+ structure +- [HueSaturationLightness](../HueSaturationLightness) class diff --git a/docs/Reference/Contributed/GdiPlus/Types/LevelsParams.md b/docs/Reference/Contributed/GdiPlus/Types/LevelsParams.md new file mode 100644 index 00000000..eed3ef16 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Types/LevelsParams.md @@ -0,0 +1,50 @@ +--- +title: LevelsParams +parent: Types +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Types/LevelsParams +--- + +# LevelsParams type +{: .no_toc } + +The parameters of a [**Levels**](../Levels) effect: the highlight, midtone and shadow levels. + +The type mirrors the GDI+ [LevelsParams](https://learn.microsoft.com/en-us/windows/win32/api/gdipluseffects/ns-gdipluseffects-levelsparams) structure. A **Levels** takes it in its constructor and in its **Parameters** property. + +## Fields + +| Field | Type | Meaning | +|:------|:-----|:--------| +| **highight** | **Long** | The highlight level, from 0 to 100. 100 leaves the top of the range alone. | +| **midtone** | **Long** | The midtone adjustment, from -100 to 100. 0 changes nothing. | +| **shadow** | **Long** | The shadow level, from 0 to 100. 0 leaves the bottom of the range alone. It has to be lower than the highlight level. | + +> [!NOTE] 0.9.45.0 +> The first field is named **highight**, with the letter l missing, and the field **highlight** does not exist. The argument of the function **LevelsParams** is spelled correctly. + +## Creating + +Syntax: *params* **= LevelsParams**( *highlight*, *midtone*, *shadow* ) + +*highlight*, *midtone*, *shadow* +: *required* **Long** values for the fields. *highlight* goes into **highight**. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim p As LevelsParams = LevelsParams(90, 10, 5) +Debug.Print p.highight & " " & p.midtone & " " & p.shadow + +Dim fx As Levels = Levels() +fx.Parameters = p +Debug.Print fx.LastResult +' Output: +' 90 10 5 +' 0 +``` + +## See Also + +- [LevelsParams](https://learn.microsoft.com/en-us/windows/win32/api/gdipluseffects/ns-gdipluseffects-levelsparams) -- Microsoft's documentation of the GDI+ structure +- [Levels](../Levels) class diff --git a/docs/Reference/Contributed/GdiPlus/Types/Marker.md b/docs/Reference/Contributed/GdiPlus/Types/Marker.md new file mode 100644 index 00000000..480c0843 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Types/Marker.md @@ -0,0 +1,39 @@ +--- +title: Marker +parent: Types +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Types/Marker +--- + +# Marker type +{: .no_toc } + +The extent of one section of a path between markers. + +[**PathIterator.NextMarker**](../PathIterator#nextmarker) returns a **Marker**. The section ends at a point set with [**SetMarker**](../GraphicsPath#setmarker), or at the end of the path. + +## Fields + +| Field | Type | Meaning | +|:------|:-----|:--------| +| **startIndex** | **Long** | The index of the first point of the section, counted from 0. | +| **endIndex** | **Long** | The index of the last point of the section. | +| **resultCount** | **Long** | The number of points in the section. It is 0 when the iterator has no more sections, and then the other fields are not changed. | + +```tb check_build +Dim user As GdiPlusUser = GdiPlusUser() +Dim p As GraphicsPath = GraphicsPath() +p.AddLine 0, 0, 10, 0 +p.SetMarker +p.AddLine 20, 0, 20, 10 +Dim it As PathIterator = PathIterator(p) +Dim mk As Marker = it.NextMarker() +Debug.Print mk.startIndex & " " & mk.endIndex & " " & mk.resultCount ' 0 1 2 +mk = it.NextMarker() +Debug.Print mk.startIndex & " " & mk.endIndex & " " & mk.resultCount ' 2 3 2 +``` + +## See Also + +- [PathIterator](../PathIterator) class +- [MarkerPath](MarkerPath) type -- the section as a path diff --git a/docs/Reference/Contributed/GdiPlus/Types/MarkerPath.md b/docs/Reference/Contributed/GdiPlus/Types/MarkerPath.md new file mode 100644 index 00000000..c40dbebd --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Types/MarkerPath.md @@ -0,0 +1,25 @@ +--- +title: MarkerPath +parent: Types +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Types/MarkerPath +--- + +# MarkerPath type +{: .no_toc } + +One section of a path between markers, as a path of its own. + +[**PathIterator.NextMarkerPath**](../PathIterator#nextmarkerpath) is meant to return a **MarkerPath**. That method does not work in this version; see the warning on the [**PathIterator**](../PathIterator) page. + +## Fields + +| Field | Type | Meaning | +|:------|:-----|:--------| +| **path** | [**GraphicsPath**](../GraphicsPath) | A new path that holds the section. | +| **resultCount** | **Long** | The number of points in the section. It is 0 when the iterator has no more sections. | + +## See Also + +- [PathIterator](../PathIterator) class +- [Marker](Marker) type -- the indexes of a section diff --git a/docs/Reference/Contributed/GdiPlus/Types/MetafileHeader.md b/docs/Reference/Contributed/GdiPlus/Types/MetafileHeader.md new file mode 100644 index 00000000..49c17f29 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Types/MetafileHeader.md @@ -0,0 +1,111 @@ +--- +title: MetafileHeader +parent: Types +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Types/MetafileHeader +--- + +# MetafileHeader type +{: .no_toc } + +The header of a [**Metafile**](../Metafile): its kind, size, resolution and bounds. + +[**Metafile.MetafileHeader**](../Metafile#metafileheader) returns one, and so do the functions **GetMetafileHeader**, **GetMetafileHeaderFromEmf** and **GetMetafileHeaderFromWmf**, which read the header of a file, a stream or a handle. The type mirrors the GDI+ [MetafileHeader](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusmetaheader/nl-gdiplusmetaheader-metafileheader) class. Besides its fields it has properties that answer the usual questions about the kind of metafile. + +* TOC +{:toc} + +```tb check_build hidden +Module HeaderEmf + Private Declare PtrSafe Function CreateEnhMetaFileW Lib "gdi32" (ByVal hdcRef As LongPtr, ByVal fileName As LongPtr, ByVal rc As LongPtr, ByVal desc As LongPtr) As LongPtr + Private Declare PtrSafe Function CloseEnhMetaFile Lib "gdi32" (ByVal hdc As LongPtr) As LongPtr + Private Declare PtrSafe Function Rectangle Lib "gdi32" (ByVal hdc As LongPtr, ByVal l As Long, ByVal t As Long, ByVal r As Long, ByVal b As Long) As Long + + Public Function MakeEmf(ByVal width As Long, ByVal height As Long) As LongPtr + Dim dc As LongPtr = CreateEnhMetaFileW(0, 0, 0, 0) + Rectangle dc, 0, 0, width, height + Return CloseEnhMetaFile(dc) + End Function +End Module +``` + +## Fields + +| Field | Type | Meaning | +|:------|:-----|:--------| +| **Type** | [**GpMetafileType**](../Enumerations/GpMetafileType) | The kind of metafile: WMF, placeable WMF, EMF, EMF+ only or EMF+ dual. | +| **Size** | **UINT** | The size of the metafile in bytes. | +| **Version** | **UINT** | The version of the EMF+, EMF or WMF format. | +| **EmfPlusFlags** | **UINT** | The EMF+ flags. Bit 0 is set when the metafile was recorded for a display. | +| **DpiX**, **DpiY** | **Single** | The horizontal and vertical resolution of the metafile, in dots per inch. | +| **X**, **Y**, **Width**, **Height** | **Long** | The bounds of the metafile in device units. | +| **EmfPlusHeaderSize** | **Long** | The size of the EMF+ header in the file. | +| **LogicalDpiX**, **LogicalDpiY** | **Long** | The logical resolution of the reference device context. Usually valid only for EMF+. | + +The structure has one more field, which holds the WMF or EMF header and is read through the properties **WmfHeader** and **EmfHeader**. + +## Properties + +### Bounds + +Syntax: *r* **=** *header*.**Bounds** + +Returns **X**, **Y**, **Width** and **Height** as a [**GpRect**](GpRect). + +### IsWmf, IsWmfPlaceable + +Syntax: *b* **=** *header*.**IsWmf** + +Syntax: *b* **=** *header*.**IsWmfPlaceable** + +**IsWmf** is **True** for a Windows metafile of either kind, and **IsWmfPlaceable** only for one with a [placeable header](WmfPlaceableFileHeader). + +### IsEmf, IsEmfOrEmfPlus, IsEmfPlus, IsEmfPlusDual, IsEmfPlusOnly + +Syntax: *b* **=** *header*.**IsEmf** + +**IsEmf** is **True** for an EMF that has no EMF+ records. **IsEmfOrEmfPlus** is **True** for an EMF or either kind of EMF+. **IsEmfPlus** is **True** for both kinds of EMF+, **IsEmfPlusDual** for an EMF+ that also holds the records an EMF reader understands, and **IsEmfPlusOnly** for one that does not. + +### IsDisplay + +Syntax: *b* **=** *header*.**IsDisplay** + +**True** for an EMF+ metafile that was recorded for a display device context. + +### WmfHeader + +Syntax: *h* **=** *header*.**WmfHeader** + +Returns the WMF header of a Windows metafile as a structure of the package, or a structure of zeros for another kind of metafile. + +### EmfHeader + +Syntax: *h* **=** *header*.**EmfHeader** + +Returns the EMF header of an EMF or EMF+ metafile as a structure of the package whose fields (`nBytes`, `nRecords`, `nHandles` and others) are those of the Windows `ENHMETAHEADER` structure, or a structure of zeros for a WMF. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim mf As Metafile = Metafile(HeaderEmf.MakeEmf(40, 30), True) +Dim header As MetafileHeader = mf.MetafileHeader + +Debug.Print header.Type +Debug.Print header.IsEmf & " " & header.IsEmfOrEmfPlus & " " & header.IsEmfPlus & " " & header.IsWmf +Debug.Print header.X & " " & header.Y & " " & header.Width & " " & header.Height +Debug.Print header.Bounds.Width +Debug.Print header.EmfHeader.nRecords +' Output: +' 3 +' True True False False +' 0 0 40 30 +' 40 +' 3 +``` + +## See Also + +- [MetafileHeader](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusmetaheader/nl-gdiplusmetaheader-metafileheader) -- Microsoft's documentation of the GDI+ class +- [Metafile](../Metafile) class +- [WmfPlaceableFileHeader](WmfPlaceableFileHeader) type +- [GpMetafileType](../Enumerations/GpMetafileType) enumeration diff --git a/docs/Reference/Contributed/GdiPlus/Types/PWMFRect16.md b/docs/Reference/Contributed/GdiPlus/Types/PWMFRect16.md new file mode 100644 index 00000000..5ce2218c --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Types/PWMFRect16.md @@ -0,0 +1,40 @@ +--- +title: PWMFRect16 +parent: Types +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Types/PWMFRect16 +--- + +# PWMFRect16 type +{: .no_toc } + +A rectangle of 16-bit coordinates: the bounding box in the header of a placeable Windows metafile. + +It is the type of the **BoundingBox** field of a [**WmfPlaceableFileHeader**](WmfPlaceableFileHeader). The type mirrors the GDI+ `PWMFRect16` structure, and is 8 bytes long. + +## Fields + +| Field | Type | Meaning | +|:------|:-----|:--------| +| **Left** | **Integer** | The left edge, in metafile units. | +| **Top** | **Integer** | The top edge. | +| **Right** | **Integer** | The right edge. | +| **Bottom** | **Integer** | The bottom edge. | + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim box As PWMFRect16 +box.Left = 0 +box.Top = 0 +box.Right = 2880 +box.Bottom = 1440 +Debug.Print (box.Right - box.Left) & " " & (box.Bottom - box.Top) & " " & LenB(box) +' Output: +' 2880 1440 8 +``` + +## See Also + +- [WmfPlaceableFileHeader](WmfPlaceableFileHeader) type +- [Metafile](../Metafile) class diff --git a/docs/Reference/Contributed/GdiPlus/Types/PathPointType.md b/docs/Reference/Contributed/GdiPlus/Types/PathPointType.md new file mode 100644 index 00000000..8415cece --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Types/PathPointType.md @@ -0,0 +1,67 @@ +--- +title: PathPointType +parent: Types +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Types/PathPointType +--- + +# PathPointType type +{: .no_toc } + +The type of one point of a path: whether it starts a figure, ends a line or is part of a curve, with the flags that the point has. + +A [**GraphicsPath**](../GraphicsPath) keeps one byte for each point. The three low bits hold the kind of point, and the higher bits are flags: the point closes its figure, it is a marker, or it is in a dash. A **PathPointType** wraps that byte and reads it through properties. Types come from [**GetTypes**](../GraphicsPath#gettypes), from [**PathData**](../PathData), from a [**TypedPoint**](TypedPoint) and from [**PathIterator**](../PathIterator). + +## Field + +| Field | Type | Meaning | +|:------|:-----|:--------| +| **_value** | **Byte** | The type byte, as GDI+ stores it. | + +The name of the field begins with an underscore because the package treats it as internal. It is public, and it is the only way for a program to make a type: assign a member of [**GpPathPointType**](../Enumerations/GpPathPointType), or members combined with **Or**, to it. + +## Properties + +All the properties are read-only and return a value from the byte. + +**PointType** +: A [**GpPathPointType**](../Enumerations/GpPathPointType): **PathPointTypeStart** (0) for the first point of a figure, **PathPointTypeLine** (1) for the end of a line, **PathPointTypeBezier** (3) for a point of a cubic Bézier curve. The value 2 is reserved. It is the three low bits of the byte. + +**CloseSubpath** +: A **Boolean**, **True** for the last point of a closed figure. + +**PathMarker** +: A **Boolean**, **True** for a point set as a marker with [**SetMarker**](../GraphicsPath#setmarker). + +**DashMode** +: A **Boolean** for the dash flag. GDI+ does not use it. + +**ReservedFlag1**, **ReservedFlag2** +: **Boolean** values of the two reserved flags. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim t As PathPointType +t._value = PathPointTypeBezier Or PathPointTypeCloseSubpath +Debug.Print CLng(t.PointType) & " " & t.CloseSubpath & " " & t.PathMarker ' 3 True False +``` + +> [!WARNING] BETA 1005 +> Reading a property of an element of an array, as in `types(i).CloseSubpath`, stops the program with an access violation. Copy the element to a variable and read the property of that. A type held in a variable or in a field of a **TypedPoint** is read without trouble. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim p As GraphicsPath = GraphicsPath() +p.AddRectangle 0, 0, 5, 5 +Dim types() As PathPointType +p.GetTypes types +Dim t As PathPointType = types(4) +Debug.Print CLng(t.PointType) & " " & t.CloseSubpath ' 1 True +``` + +## See Also + +- [GpPathPointType](../Enumerations/GpPathPointType) enumeration +- [TypedPoint](TypedPoint) type -- a point with its type +- [GraphicsPath](../GraphicsPath) class -- **GetTypes** +- [PathData](../PathData) class -- holds the types of a path diff --git a/docs/Reference/Contributed/GdiPlus/Types/PathType.md b/docs/Reference/Contributed/GdiPlus/Types/PathType.md new file mode 100644 index 00000000..7de3fb1a --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Types/PathType.md @@ -0,0 +1,38 @@ +--- +title: PathType +parent: Types +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Types/PathType +--- + +# PathType type +{: .no_toc } + +A run of points of one type in a figure: the type, and where the run starts and ends. + +[**PathIterator.NextPathType**](../PathIterator#nextpathtype) returns a **PathType**. + +## Fields + +| Field | Type | Meaning | +|:------|:-----|:--------| +| **type** | [**PathPointType**](PathPointType) | The type of the points in the run. | +| **startIndex** | **Long** | The index of the first point of the run, counted from 0. | +| **endIndex** | **Long** | The index of the last point of the run. | +| **resultCount** | **Long** | The number of points in the run. It is 0 when the figure has no more runs, and then the other fields are not changed. | + +```tb check_build +Dim user As GdiPlusUser = GdiPlusUser() +Dim p As GraphicsPath = GraphicsPath() +p.AddLine 0, 0, 10, 0 +p.AddBezier 10, 0, 12, 5, 14, 5, 16, 0 +Dim it As PathIterator = PathIterator(p) +Dim sp As SubPath = it.NextSubpath() +Dim run As PathType = it.NextPathType() +Debug.Print CLng(run.type.PointType) & " " & run.startIndex & " " & run.endIndex & " " & run.resultCount ' 1 0 1 2 +``` + +## See Also + +- [PathIterator](../PathIterator) class +- [PathPointType](PathPointType) type diff --git a/docs/Reference/Contributed/GdiPlus/Types/RedEyeCorrectionParams.md b/docs/Reference/Contributed/GdiPlus/Types/RedEyeCorrectionParams.md new file mode 100644 index 00000000..8038cf40 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Types/RedEyeCorrectionParams.md @@ -0,0 +1,97 @@ +--- +title: RedEyeCorrectionParams +parent: Types +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Types/RedEyeCorrectionParams +--- + +# RedEyeCorrectionParams type +{: .no_toc } + +The parameters of a [**RedEyeCorrection**](../RedEyeCorrection) effect: the rectangles of the picture in which red eyes are corrected. + +The type mirrors the GDI+ [RedEyeCorrectionParams](https://learn.microsoft.com/en-us/windows/win32/api/gdipluseffects/ns-gdipluseffects-redeyecorrectionparams) structure. The rectangles are stored in memory that the structure points to, so a program allocates the memory, fills it, and releases it when it is done. + +## Fields + +| Field | Type | Meaning | +|:------|:-----|:--------| +| **numberOfAreas** | **UINT** | The number of rectangles. | +| **areas** | **LongPtr** | The address of the rectangles. | + +## Methods + +### Allocate + +Syntax: *status* **=** *params*.**Allocate**( *newCount* ) + +Frees the memory the structure held, allocates room for *newCount* rectangles with the GDI+ allocator, and sets **numberOfAreas** to *newCount*. The rectangles are not initialised. Returns **OutOfMemory** when the allocation fails. + +### Area + +Syntax: *rect* **=** *params*.**Area**( *index* ) + +Syntax: **Set** *params*.**Area**( *index* ) **=** *rect* + +*index* +: *required* The number of the rectangle, from 1 to **numberOfAreas**. + +Gets or sets one rectangle, as a [**GpRect**](GpRect). The property is declared as an object property, so a rectangle is written with the **Set** statement. An index outside the range reads as an empty rectangle and writes nothing. + +### GetGpAreas + +Syntax: *rects* **=** *params*.**GetGpAreas**( ) + +Returns copies of the rectangles as an array of [**GpRect**](GpRect) with the lower bound 1. + +### GetAreas + +Syntax: *rects* **=** *params*.**GetAreas**( ) + +Returns a view of the rectangle memory as an array of the package's own RECT structure, with the lower bound 1. The view is valid only while the structure keeps its memory. + +### Free + +Syntax: *params*.**Free** + +Releases the memory and sets **numberOfAreas** and **areas** to 0. A program must call it for every structure whose memory it allocated. + +## Creating + +Syntax: *params* **= RedEyeCorrectionParams**( *areas*( ) ) + +*areas* +: *required* An array of [**GpRect**](GpRect): the rectangles to copy into newly allocated memory. + +> [!WARNING] 0.9.45.0 +> The function stops the program with an access violation when the array has elements. Allocate and fill the structure with **Allocate** and **Area**, as the example does. A [**RedEyeCorrection**](../RedEyeCorrection) effect built from the structure does not work either. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim p As RedEyeCorrectionParams +Debug.Print p.Allocate(2) & " " & p.numberOfAreas +Set p.Area(1) = GpRect(0, 0, 5, 5) +Set p.Area(2) = GpRect(5, 5, 8, 6) + +Debug.Print p.Area(1).Width & " " & p.Area(2).X & " " & p.Area(2).Height +Debug.Print p.Area(3).Width + +Dim copies() As GpRect = p.GetGpAreas() +Debug.Print LBound(copies) & " " & UBound(copies) & " " & copies(2).Y + +p.Free +Debug.Print p.numberOfAreas +' Output: +' 0 2 +' 5 5 6 +' 0 +' 1 2 5 +' 0 +``` + +## See Also + +- [RedEyeCorrectionParams](https://learn.microsoft.com/en-us/windows/win32/api/gdipluseffects/ns-gdipluseffects-redeyecorrectionparams) -- Microsoft's documentation of the GDI+ structure +- [RedEyeCorrection](../RedEyeCorrection) class +- [GpRect](GpRect) type diff --git a/docs/Reference/Contributed/GdiPlus/Types/SharpenParams.md b/docs/Reference/Contributed/GdiPlus/Types/SharpenParams.md new file mode 100644 index 00000000..41fdcc3a --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Types/SharpenParams.md @@ -0,0 +1,45 @@ +--- +title: SharpenParams +parent: Types +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Types/SharpenParams +--- + +# SharpenParams type +{: .no_toc } + +The parameters of a [**Sharpen**](../Sharpen) effect: the radius and the amount. + +The type mirrors the GDI+ [SharpenParams](https://learn.microsoft.com/en-us/windows/win32/api/gdipluseffects/ns-gdipluseffects-sharpenparams) structure. A **Sharpen** takes it in its constructor and in its **Parameters** property. + +## Fields + +| Field | Type | Meaning | +|:------|:-----|:--------| +| **radius** | **Single** | The sharpening radius in pixels, from 0 to 255. | +| **amount** | **Single** | The strength, from 0 to 100. 0 changes nothing. | + +## Creating + +Syntax: *params* **= SharpenParams**( *radius*, *amount* ) + +*radius*, *amount* +: *required* **Single** values for the fields. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim p As SharpenParams = SharpenParams(3!, 40!) +Debug.Print p.radius & " " & p.amount + +Dim fx As Sharpen = Sharpen(p) +Debug.Print fx.LastResult +' Output: +' 3 40 +' 0 +``` + +## See Also + +- [SharpenParams](https://learn.microsoft.com/en-us/windows/win32/api/gdipluseffects/ns-gdipluseffects-sharpenparams) -- Microsoft's documentation of the GDI+ structure +- [Sharpen](../Sharpen) class diff --git a/docs/Reference/Contributed/GdiPlus/Types/SubPath.md b/docs/Reference/Contributed/GdiPlus/Types/SubPath.md new file mode 100644 index 00000000..904bba0c --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Types/SubPath.md @@ -0,0 +1,36 @@ +--- +title: SubPath +parent: Types +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Types/SubPath +--- + +# SubPath type +{: .no_toc } + +The extent of one figure of a path: where it starts and ends, and whether it is closed. + +[**PathIterator.NextSubpath**](../PathIterator#nextsubpath) returns a **SubPath**. + +## Fields + +| Field | Type | Meaning | +|:------|:-----|:--------| +| **startIndex** | **Long** | The index of the first point of the figure, counted from 0. | +| **endIndex** | **Long** | The index of the last point of the figure. | +| **isClosed** | **Boolean** | **True** when the figure is closed. | +| **resultCount** | **Long** | The number of points in the figure. It is 0 when the iterator has no more figures, and then the other fields are not changed. | + +```tb check_build +Dim user As GdiPlusUser = GdiPlusUser() +Dim p As GraphicsPath = GraphicsPath() +p.AddLine 0, 0, 10, 10 +Dim it As PathIterator = PathIterator(p) +Dim sp As SubPath = it.NextSubpath() +Debug.Print sp.startIndex & " " & sp.endIndex & " " & sp.isClosed & " " & sp.resultCount ' 0 1 False 2 +``` + +## See Also + +- [PathIterator](../PathIterator) class +- [SubPathPath](SubPathPath) type -- the figure as a path diff --git a/docs/Reference/Contributed/GdiPlus/Types/SubPathPath.md b/docs/Reference/Contributed/GdiPlus/Types/SubPathPath.md new file mode 100644 index 00000000..e12fa879 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Types/SubPathPath.md @@ -0,0 +1,26 @@ +--- +title: SubPathPath +parent: Types +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Types/SubPathPath +--- + +# SubPathPath type +{: .no_toc } + +One figure of a path, as a path of its own, with whether it is closed. + +[**PathIterator.NextSubpathPath**](../PathIterator#nextsubpathpath) is meant to return a **SubPathPath**. That method does not work in this version; see the warning on the [**PathIterator**](../PathIterator) page. + +## Fields + +| Field | Type | Meaning | +|:------|:-----|:--------| +| **path** | [**GraphicsPath**](../GraphicsPath) | A new path that holds the figure. | +| **isClosed** | **Boolean** | **True** when the figure is closed. | +| **resultCount** | **Long** | The number of points in the figure. It is 0 when the iterator has no more figures. | + +## See Also + +- [PathIterator](../PathIterator) class +- [SubPath](SubPath) type -- the indexes of a figure diff --git a/docs/Reference/Contributed/GdiPlus/Types/TintParams.md b/docs/Reference/Contributed/GdiPlus/Types/TintParams.md new file mode 100644 index 00000000..b8e9a3c2 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Types/TintParams.md @@ -0,0 +1,45 @@ +--- +title: TintParams +parent: Types +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Types/TintParams +--- + +# TintParams type +{: .no_toc } + +The parameters of a [**Tint**](../Tint) effect: the hue and the amount. + +The type mirrors the GDI+ [TintParams](https://learn.microsoft.com/en-us/windows/win32/api/gdipluseffects/ns-gdipluseffects-tintparams) structure. A **Tint** takes it in its constructor and in its **Parameters** property. + +## Fields + +| Field | Type | Meaning | +|:------|:-----|:--------| +| **hue** | **Long** | The hue to tint with, an angle in degrees from -180 to 180. | +| **amount** | **Long** | The strength of the tint, from -100 to 100. 0 changes nothing. | + +## Creating + +Syntax: *params* **= TintParams**( *hue*, *amount* ) + +*hue*, *amount* +: *required* **Long** values for the fields. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim p As TintParams = TintParams(-60, 25) +Debug.Print p.hue & " " & p.amount + +Dim fx As Tint = Tint(p) +Debug.Print fx.LastResult +' Output: +' -60 25 +' 0 +``` + +## See Also + +- [TintParams](https://learn.microsoft.com/en-us/windows/win32/api/gdipluseffects/ns-gdipluseffects-tintparams) -- Microsoft's documentation of the GDI+ structure +- [Tint](../Tint) class diff --git a/docs/Reference/Contributed/GdiPlus/Types/TypedPoint.md b/docs/Reference/Contributed/GdiPlus/Types/TypedPoint.md new file mode 100644 index 00000000..253e2caa --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Types/TypedPoint.md @@ -0,0 +1,35 @@ +--- +title: TypedPoint +parent: Types +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Types/TypedPoint +--- + +# TypedPoint type +{: .no_toc } + +A point of a path together with its type. + +A path stores its points and their types in two arrays. A **TypedPoint** keeps one point and its type together, so that code can handle them as one value. [**PathData**](../PathData) takes an array of them, and [**TypedPoints**](TypedPoints) returns one. + +## Fields + +| Field | Type | Meaning | +|:------|:-----|:--------| +| **pos** | [**GpPointF**](GpPointF) | The position of the point. | +| **type** | [**PathPointType**](PathPointType) | What kind of point it is. | + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim tp As TypedPoint +tp.pos = GpPointF(3, 4) +tp.type._value = PathPointTypeLine +Debug.Print tp.pos.X & "," & tp.pos.Y & " " & CLng(tp.type.PointType) ' 3,4 1 +``` + +## See Also + +- [PathPointType](PathPointType) type +- [TypedPoints](TypedPoints) type -- an array of typed points with a count +- [PathData](../PathData) class +- [PathIterator](../PathIterator) class -- **Enumerate** returns typed points diff --git a/docs/Reference/Contributed/GdiPlus/Types/TypedPoints.md b/docs/Reference/Contributed/GdiPlus/Types/TypedPoints.md new file mode 100644 index 00000000..b37f679c --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Types/TypedPoints.md @@ -0,0 +1,43 @@ +--- +title: TypedPoints +parent: Types +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Types/TypedPoints +--- + +# TypedPoints type +{: .no_toc } + +An array of typed points with the number of points that were copied into it. + +[**PathIterator.Enumerate**](../PathIterator#enumerate) returns a **TypedPoints**. + +## Fields + +| Field | Type | Meaning | +|:------|:-----|:--------| +| **points** | [**TypedPoint**](TypedPoint)() | The points and their types, with indexes from 1. | +| **resultCount** | **Long** | The number of points copied. It is the same as the upper bound of **points**. | + +```tb check_build +Dim user As GdiPlusUser = GdiPlusUser() +Dim p As GraphicsPath = GraphicsPath() +Dim pts(1 To 3) As GpPointF +pts(1) = GpPointF(0, 0): pts(2) = GpPointF(10, 0): pts(3) = GpPointF(10, 10) +p.AddLines pts + +Dim it As PathIterator = PathIterator(p) +Dim all As TypedPoints = it.Enumerate() +Dim i As Long +For i = 1 To all.resultCount + Debug.Print all.points(i).pos.X & "," & all.points(i).pos.Y +Next +' 0,0 +' 10,0 +' 10,10 +``` + +## See Also + +- [TypedPoint](TypedPoint) type +- [PathIterator](../PathIterator) class diff --git a/docs/Reference/Contributed/GdiPlus/Types/WmfPlaceableFileHeader.md b/docs/Reference/Contributed/GdiPlus/Types/WmfPlaceableFileHeader.md new file mode 100644 index 00000000..ead2e866 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Types/WmfPlaceableFileHeader.md @@ -0,0 +1,49 @@ +--- +title: WmfPlaceableFileHeader +parent: Types +grand_parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/Types/WmfPlaceableFileHeader +--- + +# WmfPlaceableFileHeader type +{: .no_toc } + +The 22-byte header of a placeable Windows metafile: the position, size and scale that the plain WMF format lacks. + +A Windows metafile (WMF) does not say how big it is or where it should be drawn. Many programs add this header in front of the metafile data to say so. The Windows API cannot play such a file directly, because the header has to be removed first, but GDI+ can: the [**Metafile**](../Metafile#creating) constructors for a WMF handle and for a WMF file take a **WmfPlaceableFileHeader**. The type mirrors the GDI+ [WmfPlaceableFileHeader](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusmetaheader/ns-gdiplusmetaheader-wmfplaceablefileheader) structure and is packed to 2 bytes. + +## Fields + +| Field | Type | Meaning | +|:------|:-----|:--------| +| **Key** | **Long** | The identification value `&H9AC6CDD7`, which marks the presence of the header. | +| **Hmf** | **Integer** | The handle of the metafile in memory. It is 0 in a file. | +| **BoundingBox** | [**PWMFRect16**](PWMFRect16) | The corners of the picture, in metafile units. | +| **Inch** | **Integer** | The number of metafile units per inch. 1440 (twips) is the normal value; a smaller number scales the picture up and a larger one down. | +| **Reserved** | **Long** | Always 0. | +| **Checksum** | **Integer** | The exclusive OR of the previous ten 16-bit words of the header, which detects a damaged header. | + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() + +Dim h As WmfPlaceableFileHeader +h.Key = &H9AC6CDD7 +h.BoundingBox.Right = 2880 +h.BoundingBox.Bottom = 1440 +h.Inch = 1440 + +Debug.Print LenB(h) +Debug.Print Hex$(h.Key) +Debug.Print (h.BoundingBox.Right - h.BoundingBox.Left) / h.Inch & " inches wide" +' Output: +' 22 +' 9AC6CDD7 +' 2 inches wide +``` + +## See Also + +- [WmfPlaceableFileHeader](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusmetaheader/ns-gdiplusmetaheader-wmfplaceablefileheader) -- Microsoft's documentation of the GDI+ structure +- [PWMFRect16](PWMFRect16) type +- [Metafile](../Metafile) class +- [MetafileHeader](MetafileHeader) type diff --git a/docs/Reference/Contributed/GdiPlus/Types/index.md b/docs/Reference/Contributed/GdiPlus/Types/index.md new file mode 100644 index 00000000..53aa4eda --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/Types/index.md @@ -0,0 +1,80 @@ +--- +title: Types +parent: GdiPlus Package +has_children: true +has_toc: false +permalink: /tB/Packages/Contributed/GdiPlus/Types/ +--- + +# GdiPlus Types +{: .no_toc } + +The structures of the package that a program works with: points, sizes and rectangles, colours, the descriptions of paths, bitmap data, metafile headers, the settings that start GDI+ and the parameters of the effects. + +A type is a user-defined type, a value with fields and sometimes methods. It is passed and assigned by value, and it needs no `New`. Most have a module function of the same name that returns a filled one, as in `GpRect(0, 0, 10, 10)`. The pages follow the structures of the GDI+ C++ wrapper that they mirror; the classes, which hold a GDI+ object, are on the pages of the section itself. + +## Geometry +{: .no_toc } + +- [GpPoint](GpPoint) -- a point with **Long** coordinates +- [GpPointF](GpPointF) -- a point or vector with **Single** coordinates +- [GpSize](GpSize) -- a size with **Long** values +- [GpSizeF](GpSizeF) -- a size with **Single** values +- [GpRect](GpRect) -- a rectangle with **Long** values +- [GpRectF](GpRectF) -- a rectangle with **Single** values +- [CharacterRange](CharacterRange) -- a range of characters of a string, for measuring + +## Colour +{: .no_toc } + +- [Color](Color) -- a colour with alpha, red, green and blue channels +- [ColorMatrix](ColorMatrix) -- a 5 by 5 matrix that transforms colours +- [ColorChannelLUT](ColorChannelLUT) -- a lookup table for one colour channel +- [ColorMap](ColorMap) -- a pair of colours, for remapping +- [ColorPalette](ColorPalette) -- the colour table of an indexed bitmap + +## Starting GDI+ +{: .no_toc } + +- [GdiplusStartupInput](GdiplusStartupInput) -- the settings GDI+ is started with +- [GdiplusStartupOutput](GdiplusStartupOutput) -- the hook and unhook functions returned when the background thread is suppressed + +## Paths +{: .no_toc } + +- [PathPointType](PathPointType) -- the type of one point of a path +- [PathType](PathType) -- a run of points of one type in a figure +- [TypedPoint](TypedPoint) -- a point of a path with its type +- [TypedPoints](TypedPoints) -- an array of typed points +- [SubPath](SubPath) -- the extent of one figure of a path +- [SubPathPath](SubPathPath) -- one figure of a path, as a path of its own +- [Marker](Marker) -- the extent of one section of a path between markers +- [MarkerPath](MarkerPath) -- one section between markers, as a path of its own + +## Images and metafiles +{: .no_toc } + +- [BitmapData](BitmapData) -- the locked pixels of a bitmap +- [MetafileHeader](MetafileHeader) -- the header of a metafile +- [WmfPlaceableFileHeader](WmfPlaceableFileHeader) -- the placeable header of a Windows metafile +- [PWMFRect16](PWMFRect16) -- the 16-bit rectangle of that header +- [GpPropertyItem](GpPropertyItem) -- one property of an image file, such as the camera model +- [GpImageItemData](GpImageItemData) -- an item of extra data stored with an image +- [GpImageCodecInfo](GpImageCodecInfo) -- the description of an image encoder or decoder +- [GpEncoderParameter](GpEncoderParameter) -- one parameter of an image encoder + +## Effect parameters +{: .no_toc } + +The parameters of the effect classes, which each takes as its **Parameters** property. + +- [BlurParams](BlurParams) +- [BrightnessContrastParams](BrightnessContrastParams) +- [ColorBalanceParams](ColorBalanceParams) +- [ColorCurveParams](ColorCurveParams) +- [ColorLUTParams](ColorLUTParams) +- [HueSaturationLightnessParams](HueSaturationLightnessParams) +- [LevelsParams](LevelsParams) +- [RedEyeCorrectionParams](RedEyeCorrectionParams) +- [SharpenParams](SharpenParams) +- [TintParams](TintParams) diff --git a/docs/Reference/Contributed/GdiPlus/VBGraphics.md b/docs/Reference/Contributed/GdiPlus/VBGraphics.md new file mode 100644 index 00000000..b7f5f211 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/VBGraphics.md @@ -0,0 +1,201 @@ +--- +title: VBGraphics +parent: GdiPlus Package +permalink: /tB/Packages/Contributed/GdiPlus/VBGraphics +has_toc: false +--- + +# VBGraphics class +{: .no_toc } + +A [**Graphics**](Graphics) that also draws with the `Line`, `Circle` and `PSet` statements of Visual Basic. + +**VBGraphics** inherits from **Graphics**, so every method of that class works on it, and adds the three drawing methods with the syntax of the Visual Basic statements, the properties that those statements read (**ForeColor**, **FillColor**, **FillStyle**, **DrawWidth**) and a current position. It is meant for code that is ported from a Visual Basic form, where the same statements drew on the form. + +The colours differ from Visual Basic's. A colour argument is a [**Color**](Types/Color) value in the layout `&HAARRGGBB`, with its alpha channel, and not a `COLORREF`. + +> [!WARNING] 0.9.45.0 +> `vbRed` and the result of `RGB` are `COLORREF` values with no alpha: `&H0000FF` has alpha 0, so with the default **UseTransparentAlpha** of **True** a line drawn in it is invisible. Pass `&HFFFF0000` for red, or `Color(255, 0, 0).Value`. With **UseTransparentAlpha** set to **False** a colour with alpha 0 is drawn opaque, but `vbRed` then comes out blue, because the bytes are read as `&HAARRGGBB`. + +## Creating + +Syntax: **VBGraphics**( *image* ) \ +Syntax: **VBGraphics**( *options*, *h1*, *h2* ) \ +Syntax: **VBGraphicsFromImage**( *image* ) \ +Syntax: **VBGraphicsFromHDC**( *hdc* [, *hdevice* ] ) \ +Syntax: **BufferedVBGraphicsFromHDC**( *hdc*, *drawArea* ) \ +Syntax: **VBGraphicsFromHWND**( *hwnd* ) \ +Syntax: **VBGraphicsFromHWNDWithICM**( *hwnd* ) \ +Syntax: **BufferedVBGraphicsFromHWND**( *hwnd* ) \ +Syntax: **New VBGraphics**( *image* ) \ +Syntax: **New VBGraphics**( *options*, *h1* [, *h2* ] ) + +The module functions return a new **VBGraphics** and have the arguments of the functions of **Graphics** that have the same name without the **VB**. The `New` forms take the arguments of the first two. + +*image* +: *required* The [**Image**](Image) or [**Bitmap**](Bitmap) to draw on. + +*hdc*, *hdevice* +: *required*, *optional* A device context handle, and optionally a device handle, to draw on. + +*hwnd* +: *required* A window handle to draw on. + +*drawArea* +: *required* A [**GpRect**](Types/GpRect) in the device context that the buffered object paints into when it is released. + +*options*, *h1*, *h2* +: *required* A [**GraphicsCreationOptions**](Enumerations/GraphicsCreationOptions) value that says what *h1* and *h2* are: window or device context handles, or the drawing area for a buffered one. + +A new object has **ForeColor** opaque black, **FillColor** opaque white and **FillStyle** transparent. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim bmp As Bitmap = Bitmap(8!, 8!) +Dim g As VBGraphics = VBGraphics(bmp) +Debug.Print g.LastResult ' 0 +Debug.Print Hex$(g.ForeColor.Value) ' FF000000 +Debug.Print Hex$(g.FillColor.Value) ' FFFFFFFF +Debug.Print g.FillStyle ' 1 +Debug.Print g.UseTransparentAlpha ' True +``` + +## Colours, width and position + +### ForeColor + +Syntax: *graphics*.**ForeColor** [ = *color* ] As [**Color**](Types/Color) + +The colour that **Line**, **Circle** and **PSet** use when they are given none, and the colour of an outline. + +### FillColor + +Syntax: *graphics*.**FillColor** [ = *color* ] As [**Color**](Types/Color) + +The colour that the inside of a box (**Line** with **B**) or a circle is filled with when **FillStyle** is solid. + +### FillStyle + +Syntax: *graphics*.**FillStyle** [ = *style* ] As [**FillStyleConstants**](Enumerations/FillStyleConstants) + +Whether a box or a circle is filled: **vbFSSolid**, 0, fills it with **FillColor**; **vbFSTransparent**, 1, which is the default, leaves it unfilled. + +### DrawWidth + +Syntax: *graphics*.**DrawWidth** [ = *width* ] As **Single** + +The width of the pen, in the units of the object. Setting the width of the pen changes how the lines of **Line**, **Circle** and **PSet** are drawn. + +> [!WARNING] 0.9.45.0 +> The pen is created by the first call to **Line**, **Circle** or **PSet**. Until then **DrawWidth** reads 0 and sets **LastResult** to 2, *InvalidParameter*, and an assignment to it is ignored without an error. Draw once before setting **DrawWidth**. + +### UseTransparentAlpha + +Syntax: *graphics*.**UseTransparentAlpha** [ = *value* ] As **Boolean** + +**True**, the default, draws a colour with its own alpha, so a colour with alpha 0 is invisible. **False** draws a colour whose alpha is exactly 0 as if it were 255; other alphas are used as they are. + +### CurrentX, CurrentY, Current + +Syntax: *graphics*.**CurrentX** [ = *x* ] As **Single** \ +Syntax: *graphics*.**CurrentY** [ = *y* ] As **Single** \ +Syntax: *graphics*.**Current** [ = *point* ] As [**GpPointF**](Types/GpPointF) + +The current position. A drawing method that is given no starting point starts at it, and **Step** counts from it. **Line** leaves it at the end of the line, **Circle** at the centre, and **PSet** at the point. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim bmp As Bitmap = Bitmap(8!, 8!) +Dim g As VBGraphics = VBGraphics(bmp) +g.CurrentX = 3: g.CurrentY = 4 +Debug.Print g.Current.X & "," & g.Current.Y ' 3,4 +g.Current = GpPointF(5, 6) +Debug.Print g.CurrentX & "," & g.CurrentY ' 5,6 +g.ForeColor = Color(255, 0, 255, 0) +g.FillStyle = vbFSSolid +Debug.Print g.FillStyle ' 0 +``` + +## Drawing + +The three methods are written as the Visual Basic statements are. The compiler turns the statement into a call of the method with a set of flags, which is why the methods have a parameter list that is not the one you write. In each statement every part in square brackets is optional. + +### Line + +Syntax: *graphics*.**Line** [ **Step** ] **(** *x1*, *y1* **)** **-** [ **Step** ] **(** *x2*, *y2* **)** [, *color* ] [, [ **B** ][ **F** ] ] \ +Syntax: *graphics*.**Line** [ **Step** ] **-** [ **Step** ] **(** *x2*, *y2* **)** [, *color* ] [, [ **B** ][ **F** ] ] + +Draws a line, or with **B** a box with those opposite corners, or with **BF** a filled box. The second form starts at the current position. **Step** makes a point relative to the current position, or for the second point to the first. *color* is `&HAARRGGBB`; without it the line uses **ForeColor**. + +**B** draws the outline in the colour. When **FillStyle** is solid, the inside is then filled with **FillColor**, over the inner half of the outline. + +> [!WARNING] 0.9.45.0 +> **BF** fills the wrong rectangle: it starts at the second corner instead of the first, so the box is filled one box-height too low (its top is at *y2*). The outline is drawn where it should be. To fill a box, set **FillStyle** to solid and use **B**, or call **FillRectangle** of **Graphics**. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim bmp As Bitmap = Bitmap(40!, 40!) +Dim g As VBGraphics = VBGraphics(bmp) +g.Clear Color(255, 255, 255, 255) +g.Line (2, 5)-(30, 5), &HFFFF0000 +Debug.Print Hex$(bmp.Pixel(10, 5).Value) ' FFFF0000 +Debug.Print Hex$(bmp.Pixel(10, 8).Value) ' FFFFFFFF +Debug.Print g.CurrentX & "," & g.CurrentY ' 30,5 +g.Line -(30, 20), &HFF0000FF +Debug.Print Hex$(bmp.Pixel(30, 15).Value) ' FF0000FF +g.Line (0, 25)-(10, 35), &HFF00FF00, B +Debug.Print Hex$(bmp.Pixel(5, 25).Value) ' FF00FF00 +Debug.Print Hex$(bmp.Pixel(5, 30).Value) ' FFFFFFFF +g.FillColor = Color(255, 0, 0, 255) +g.FillStyle = vbFSSolid +g.Line (20, 25)-(30, 35), &HFF000000, B +Debug.Print Hex$(bmp.Pixel(25, 30).Value) ' FF0000FF +g.ForeColor = Color(255, 255, 0, 255) +g.Line (0, 38)-(30, 38) +Debug.Print Hex$(bmp.Pixel(10, 38).Value) ' FFFF00FF +``` + +### Circle + +Syntax: *graphics*.**Circle** [ **Step** ] **(** *x*, *y* **)**, *radius* [, *color* [, *start*, *end* [, *aspect* ]]] + +Draws a circle, or an ellipse, with its centre at the point. The outline is in *color*, or **ForeColor**, and the inside is filled with **FillColor** when **FillStyle** is solid. *aspect* is the ratio of the vertical to the horizontal size: below 1 the radius is the horizontal one and the ellipse is wider than tall, above 1 the radius is the vertical one. + +> [!WARNING] 0.9.45.0 +> *start* and *end*, which draw an arc or a pie, are not implemented. A call that gives either draws nothing and sets **LastResult** to 6, *NotImplemented*. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim bmp As Bitmap = Bitmap(40!, 40!) +Dim g As VBGraphics = VBGraphics(bmp) +g.Clear Color(255, 255, 255, 255) +g.Circle (20, 20), 8, &HFFFF0000 +Debug.Print Hex$(bmp.Pixel(20, 12).Value) ' FFFF0000 +Debug.Print Hex$(bmp.Pixel(28, 20).Value) ' FFFF0000 +Debug.Print Hex$(bmp.Pixel(20, 20).Value) ' FFFFFFFF +Debug.Print g.CurrentX & "," & g.CurrentY ' 20,20 +g.Clear Color(255, 255, 255, 255) +g.Circle (20, 20), 10, &HFFFF0000, , , 0.5 +Debug.Print Hex$(bmp.Pixel(30, 20).Value) ' FFFF0000 +Debug.Print Hex$(bmp.Pixel(20, 15).Value) ' FFFF0000 +Debug.Print Hex$(bmp.Pixel(20, 10).Value) ' FFFFFFFF +g.Circle (20, 20), 8, &HFFFF0000, 0, 3.14 +Debug.Print g.LastResult ' 6 +``` + +### PSet + +Syntax: *graphics*.**PSet** [ **Step** ] **(** *x*, *y* **)** [, *color* ] + +Draws a point in *color*, or **ForeColor**, and makes it the current position. + +> [!WARNING] 0.9.45.0 +> The point is a line one unit long: **PSet** colours the pixel at (*x*, *y*) and the pixel below it. To set a single pixel, assign to the **Pixel** property of the **Bitmap**. + +## See Also + +- [Graphics](Graphics) class -- the base class, with the rest of the drawing methods +- [Color](Types/Color) type -- the colours +- [FillStyleConstants](Enumerations/FillStyleConstants) enumeration +- [GraphicsCreationOptions](Enumerations/GraphicsCreationOptions) enumeration +- [GdiPlusBase](GdiPlusBase) class -- **LastResult** and error handling diff --git a/docs/Reference/Contributed/GdiPlus/index.md b/docs/Reference/Contributed/GdiPlus/index.md new file mode 100644 index 00000000..ae95a8e3 --- /dev/null +++ b/docs/Reference/Contributed/GdiPlus/index.md @@ -0,0 +1,277 @@ +--- +title: GdiPlus Package +parent: Experimental Packages +has_toc: false +indexed_from: 0.9.45.0 +permalink: /tB/Packages/Contributed/GdiPlus/ +exclude_from_docs: + - ModMain + - TypesTest + - GpGraphics + - GpPath + - GpPathIterator + - GpRegion + - GpMatrix + - GpPen + - GpBrush + - GpSolidFill + - GpHatch + - GpLineGradient + - GpPathGradient + - GpTexture + - GpCustomLineCap + - GpArrowCap + - GpFont + - GpFontFamily + - GpFontCollection + - GpInstalledFontCollection + - GpPrivateFontCollection + - GpStringFormat + - GpImage + - GpBitmap + - GpMetafile + - GpCachedBitmap + - GpImageAttributes + - GpEffect + - GpToken + - GpMarkerPath + - GpSubPathPath + - GpPathData + - GpEncoderParametersHeader + - GDIP_BITMAPINFO + - GDIP_BITMAPINFOHEADER + - GDIP_BOOL + - GDIP_ENHMETAHEADER3 + - GDIP_FontWeight + - GDIP_GDI_BITMAP_COMPRESSION + - GDIP_IDirectDrawSurface7 + - GDIP_IStream + - GDIP_LOGFONTA + - GDIP_LOGFONTW + - GDIP_METAHEADER + - GDIP_POINT + - GDIP_RECT + - GDIP_RECTF + - GDIP_SIZE + - GDIP_UUID + - GDIPDEF_UUID + - GdipArrowCap + - GdipBitmap + - GdipBrush + - GdipCachedBitmap + - GdipColor + - GdipColorMatrix + - GdipEffects + - GdipEnums + - GdipFont + - GdipFontCollection + - GdipFontFamily + - GdipGdiPlusUser + - GdipGraphics + - GdipGraphicsPath + - GdipHatch + - GdipImage + - GdipImageAttributes + - GdipImageCodec + - GdipImaging + - GdipInstalledFontCollection + - GdipLineCap + - GdipLineGradient + - GdipMatrix + - GdipMetaHeader + - GdipMetafile + - GdipModule + - GdipPathData + - GdipPathGradient + - GdipPathIterator + - GdipPen + - GdipPixelFormats + - GdipPlatform + - GdipPrivateFontCollection + - GdipRegion + - GdipSolidBrush + - GdipStringFormat + - GdipTexture + - GdipVBGraphics + - Native + - Types +--- + +# GdiPlus Package +{: .no_toc } + +**Author:** Sunderland Ober Consulting. **Version:** 0.9.45.0. **On GitHub:** [KubaO/GdiPlus](https://github.com/KubaO/GdiPlus), in the folder *GdiPlus*. + +The **GdiPlus** contributed package is a twinBASIC interface to Windows GDI+: classes for drawing lines, shapes, text and images on a device context, a window or a bitmap, with pens, brushes, fonts, paths, regions and transformations. + +GDI+ is the graphics library of Windows from Windows XP on. Where the older GDI draws in whole pixels with a few fixed colours, GDI+ draws with floating-point coordinates, antialiasing, colours that have an alpha (opacity) channel, gradients, and transformations of the whole drawing surface. The package wraps the flat functions of the GDI+ library in classes that follow the C++ classes Microsoft publishes with GDI+: a [**Graphics**](Graphics) object draws, a [**Pen**](Pen) or a brush such as [**SolidBrush**](SolidBrush) says how, a [**Bitmap**](Bitmap) holds the pixels. Each class page here links to the Microsoft page of the class it follows. This section documents version 0.9.45.0, published under the MIT licence. + +```tb check_build check_run +Dim user As GdiPlusUser = GdiPlusUser() +Dim bmp As Bitmap = Bitmap(64!, 64!) +Dim g As Graphics = Graphics(bmp) +g.Clear(Color(255, 255, 255, 255)) +g.FillRectangle SolidBrush(Color(255, 0, 128, 255)), 0, 0, 32, 32 +Debug.Print Hex$(bmp.Pixel(10, 10).argb) +Debug.Print Hex$(bmp.Pixel(50, 50).argb) +' Output: +' FF0080FF +' FFFFFFFF +``` + +> [!WARNING] 0.9.45.0 +> Two whole numbers without a format do not create a bitmap of that size. `Bitmap(64, 64)` binds to the form that takes a GDI bitmap handle and a palette handle, treats 64 and 64 as handles, and returns an unusable object with **LastResult** 7 (**Win32Error**), without any error being raised. Pass **Single** values, as the sample does: `Bitmap(64!, 64!)`, or give a format, as in `Bitmap(64, 64, PixelFormat32bppARGB)`. [**Bitmap**](Bitmap#creating) has the details. + +> [!WARNING] 0.9.45.0 +> The package compiles, and a program that uses its common calls with **Color** values works. A number of members give wrong results, fail or never return, and in most cases raise no error. The main ones: +> +> - A colour passed as a **Long** (the *rgb* forms of [**SolidBrush**](SolidBrush), [**Pen**](Pen), [**Graphics.Clear**](Graphics#clear), [**HatchBrush**](HatchBrush) and the gradient brushes) is read as `&H00RRGGBB`, not as a Visual Basic colour: `SolidBrush(vbRed)` paints blue, and the alpha is dropped. A **CColor** member passed there loses its alpha. Pass a [**Color**](Types/Color). See [Colours](IBrush#colours) and [**Color**](Types/Color#windows-colours). +> - [**Image.Save**](Image#save) and **Bitmap.Save** cannot pass encoder parameters: the call returns an error, ignores them, or stops the program. +> - [**InstalledFontCollection**](InstalledFontCollection#creating) and [**PrivateFontCollection**](PrivateFontCollection#creating) cannot be created, so no font collection can be used. +> - Some calls never return: the function form of [**HatchBrush**](HatchBrush#creating), the array forms of [**SetBlend**](LinearGradientBrush#setblend) and [**SetInterpolationColors**](LinearGradientBrush#setinterpolationcolors) of the gradient brushes, the stroke cap setters of [**CustomLineCap**](CustomLineCap#setstrokecaps) and of [**ArrowCap**](ArrowCap), and three forms of [**Graphics.DrawImage**](Graphics#drawimage). +> - The [**Metafile**](Metafile#creating) constructors that take a file name, and the ones that record, raise error 13. +> - The [effects](Effect#parameters) return zeros from **Parameters** unless the size of the structure is passed, and the constructors that take a parameters structure fail or stop the program for seven of the eleven effect classes. +> - Reading **Transform** from a [**Graphics**](Graphics#transform), a [**Pen**](Pen#transform) or a brush returns **Nothing**. A **Graphics** and the brushes have [**GetTransform**](ITransformable#gettransform) to read the transformation, and a **Pen** has no way to. +> +> Each page states the defects of its own members in a warning of the same kind. + +## Getting started + +A **GdiPlusUser** must exist while any GDI+ object is used. It starts GDI+, and without one the other classes fail with status 18, *GdiplusNotInitialized*. Any number of instances can exist; GDI+ stays usable while one does. Create it with the function of the same name, in a variable that lives as long as the program draws: + +```tb check_build +Dim user As GdiPlusUser = GdiPlusUser() +``` + +> [!WARNING] 0.9.45.0 +> A **GdiPlusUser** declared `Dim user As New GdiPlusUser` is not created until the variable is first used, so the GDI+ objects made before that fail with status 18. Use `Dim user As GdiPlusUser = GdiPlusUser()`, or `Set` the variable in the load handler. See [**GdiPlusUser**](GdiPlusUser). + +Every class is created in two ways that are one thing: `New Pen(...)` and the function `Pen(...)`. This section documents both under *Creating* on the page of the class. The structures of the package, such as [**GpPointF**](Types/GpPointF) and [**GpRect**](Types/GpRect), have such functions too: `GpRect(0, 0, 10, 10)`. + +> [!NOTE] 0.9.45.0 +> A project that has the VB and OLE Automation packages, which every default project has, has a control class **Image** and an OLE type **Font**. In a declaration, write [`GdiPlus.Image`](Image) and [`GdiPlus.Font`](Font); the constructor functions `Image(...)` and `Font(...)` need no prefix. + +### Drawing on a bitmap + +The sample above draws on a [**Bitmap**](Bitmap): `Graphics(bmp)` makes a drawing surface for it, and every drawing call of the **Graphics** changes its pixels, which `bmp.Pixel(x, y)` reads back. A bitmap is the easiest surface to start with, because it needs no window. + +### Drawing in a window + +A program that handles the window messages itself creates its **GdiPlusUser** on `WM_CREATE`, and in `WM_PAINT` makes a buffered **Graphics** with [**BufferedGraphicsFromHWND**](Graphics#bufferedgraphicsfromhwnd), draws, and releases it, which copies the picture to the window. [Painting a window or a form](Graphics#painting-a-window-or-a-form) shows the whole window procedure. + +### Drawing in a form + +A form creates its **GdiPlusUser** in `Form_Load`, makes a [**BufferedGraphicsFromHDC**](Graphics#bufferedgraphicsfromhdc) of the form's **hDC** property in its **Paint** event, draws, and sets the variable to **Nothing**: + +```tb check_build inherits=Form +Dim mGdiPlus As GdiPlusUser + +Sub Form_Load() + ScaleMode = vbPixels + Set mGdiPlus = GdiPlusUser() +End Sub + +Sub Form_Paint() + Dim area As GpRect = GpRect(0, 0, ScaleWidth, ScaleHeight) + Dim gr As Graphics = BufferedGraphicsFromHDC(hDC, area) + gr.Clear(Color(255, 255, 255)) + gr.DrawLine(Pen(Color(0, 0, 255), 3), 10, 10, 100, 60) + Set gr = Nothing +End Sub + +Sub Form_Resize() + Refresh +End Sub +``` + +## Failures + +A call that fails raises no error by default. A method that returns no value returns the [**GpStatus**](Enumerations/GpStatus) of the call, and every object keeps the last failure in its **LastResult** property, which stays set until **ClearResult** is called. A constructor that fails returns an unusable object. The global variable **GdipErrorHandlingStrategy** makes the package raise an error or call a handler instead. [**GdiPlusBase**](GdiPlusBase) has the details. + +## What is not documented + +The package declares more than a program uses. These parts are left out of this section: + +- the handle types, such as **GpGraphics**, **GpPen**, **GpBitmap** and **GpPath**. Each holds the handle of one GDI+ object, and the classes of the package use them in their implementation. A member that takes or returns one says so in words, and [**GetNative**](Helpers#getnative) returns the handle of an object for a program that calls the flat GDI+ functions itself; +- the structures and enumerations with the prefix **GDIP_**, the **Gdip...** modules that hold the flat function declarations (**GdipGraphics**, **GdipBitmap** and the others), and **GDIPDEF_UUID**. They are the package's own layer over the flat API; +- the protected members that the classes use among themselves, such as **Native**, which returns the handle of the object, and **Class_Terminate**, which releases it; +- the test code of the package, the modules **ModMain** and **TypesTest**. + +## Classes and interfaces + +### Starting GDI+, errors and helpers + +- [GdiPlusUser](GdiPlusUser) -- starts GDI+; one instance must exist while the package is used +- [GdiPlusBase](GdiPlusBase) -- the base class of the classes: **LastResult**, the status text and the error handling +- [GdiPlusAbort](GdiPlusAbort) -- an object that GDI+ can ask whether to stop (GDI+ does not use it) +- [Helpers](Helpers) -- the functions and constants that belong to no class: status text, pixel formats, effect IDs, metafile headers, property tags +- [ImageCodec](ImageCodec) -- the installed encoders and decoders, and the IDs of image formats and encoder parameters + +### Drawing + +- [Graphics](Graphics) -- the drawing surface: lines, shapes, text and images on a bitmap, a window or a device context +- [VBGraphics](VBGraphics) -- a **Graphics** that also draws with the `Line`, `Circle` and `PSet` statements of Visual Basic +- [IDeviceContext](IDeviceContext) -- the interface to hand out a Windows device context +- [ITransformable](ITransformable) -- the members that classes with a transformation matrix share + +### Paths, regions and transformations + +- [GraphicsPath](GraphicsPath) -- a sequence of connected lines, curves and shapes +- [PathIterator](PathIterator) -- reads the figures and points of a path one part after another +- [PathData](PathData) -- the points of a path and their types, in memory +- [Region](Region) -- an area of a drawing surface, of any shape +- [Matrix](Matrix) -- a 3 by 3 affine transformation + +### Pens and brushes + +- [Pen](Pen) -- draws lines and outlines +- [IBrush](IBrush) -- the interface that every brush implements +- [SolidBrush](SolidBrush) -- fills with one colour +- [HatchBrush](HatchBrush) -- fills with a pattern of lines or dots +- [TextureBrush](TextureBrush) -- fills with tiles of an image +- [LinearGradientBrush](LinearGradientBrush) -- fills with a colour that changes along a line +- [PathGradientBrush](PathGradientBrush) -- fills with a colour that changes from a centre to the edge of a path +- [CustomLineCap](CustomLineCap) -- a line end whose shape is a path +- [ArrowCap](ArrowCap) -- a line end in the shape of an arrowhead + +### Images and effects + +- [Image](Image) -- the base class of bitmaps and metafiles: loading, saving, size, frames and properties +- [Bitmap](Bitmap) -- a raster picture that a program can draw on and read pixel by pixel +- [Metafile](Metafile) -- a picture stored as a sequence of drawing commands +- [CachedBitmap](CachedBitmap) -- a bitmap in the format of one **Graphics**, for fast repeated drawing +- [ImageAttributes](ImageAttributes) -- colour adjustments that GDI+ applies while it draws an image +- [IImageBytes](IImageBytes) -- the COM interface for direct access to the bytes of an image in memory +- [Effect](Effect) -- the base class of the image effects +- [Blur](Blur), [Sharpen](Sharpen), [BrightnessContrast](BrightnessContrast), [HueSaturationLightness](HueSaturationLightness), [Levels](Levels), [Tint](Tint), [ColorBalance](ColorBalance), [ColorMatrixEffect](ColorMatrixEffect), [ColorLUT](ColorLUT), [ColorCurve](ColorCurve), [RedEyeCorrection](RedEyeCorrection) -- the eleven effects + +### Text + +- [Font](Font) -- a font by family, size, style and unit +- [FontFamily](FontFamily) -- a set of fonts that share a typeface design +- [FontCollection](FontCollection) -- the base class of the two collections +- [InstalledFontCollection](InstalledFontCollection) -- the font families installed on the system +- [PrivateFontCollection](PrivateFontCollection) -- fonts loaded from files or memory for one program +- [StringFormat](StringFormat) -- how a string is laid out: alignment, wrapping, trimming, tab stops + +## Types + +The [Types](Types/) page lists the structures of the package, in groups: + +- colour: [Color](Types/Color), [ColorMatrix](Types/ColorMatrix), [ColorPalette](Types/ColorPalette), [ColorMap](Types/ColorMap), [ColorChannelLUT](Types/ColorChannelLUT) +- geometry: [GpPoint](Types/GpPoint), [GpPointF](Types/GpPointF), [GpSize](Types/GpSize), [GpSizeF](Types/GpSizeF), [GpRect](Types/GpRect), [GpRectF](Types/GpRectF), [CharacterRange](Types/CharacterRange) +- paths: [PathPointType](Types/PathPointType), [PathType](Types/PathType), [TypedPoint](Types/TypedPoint), [TypedPoints](Types/TypedPoints), [SubPath](Types/SubPath), [Marker](Types/Marker) +- images and metafiles: [BitmapData](Types/BitmapData), [MetafileHeader](Types/MetafileHeader), [GpPropertyItem](Types/GpPropertyItem), [GpImageCodecInfo](Types/GpImageCodecInfo), [GpEncoderParameter](Types/GpEncoderParameter) +- starting GDI+: [GdiplusStartupInput](Types/GdiplusStartupInput), [GdiplusStartupOutput](Types/GdiplusStartupOutput) +- the parameters of the effects: [BlurParams](Types/BlurParams), [SharpenParams](Types/SharpenParams) and the others + +## Enumerations + +The [Enumerations](Enumerations/) page lists the 74 enumerations of the package, in groups by topic. Most follow the GDI+ headers, with **Gp** in front of the name, such as [GpUnit](Enumerations/GpUnit), [GpSmoothingMode](Enumerations/GpSmoothingMode), [GpFontStyle](Enumerations/GpFontStyle), [PixelFormat](Enumerations/PixelFormat) and [GpStatus](Enumerations/GpStatus). [CColor](Enumerations/CColor) names 140 common colours. + +## See Also + +- [GDI+ reference](https://learn.microsoft.com/en-us/windows/win32/gdiplus/-gdiplus-gdi-start) -- Microsoft's documentation of GDI+ +- [Graphics](Graphics) class -- the drawing surface +- [Bitmap](Bitmap) class -- a picture to draw on +- [Experimental Packages](../../Experimental/) -- the packages from TWINSERV that are not yet ready for use in a program diff --git a/docs/Reference/Experimental.md b/docs/Reference/Experimental.md index f6858ef8..10e131d2 100644 --- a/docs/Reference/Experimental.md +++ b/docs/Reference/Experimental.md @@ -14,6 +14,7 @@ These packages are published through TWINSERV, as the [Contributed Packages](../ - [**ArrayListLib**](../Contributed/ArrayListLib/) -- a list class in place of .NET's `ArrayList`. Version 1.6.151.1 does not compile in twinBASIC BETA 1005, and in a copy that does, a **For Each** over a list with no items fails, **ToString** of such a list never returns, **Reverse** leaves the two middle items of an even run in place, and a second **GetEnumerator** over the same list ignores its arguments. - [**BigNumberLib**](../Contributed/BigNumberLib/) -- arbitrary-precision signed integer arithmetic. Version 1.0.2.0 compiles, and has several members that give wrong results or do not return: setting **IsNegative** to **True**, a negative operand of the greatest common divisor and the least common multiple, the least common multiple of two zeros, a zero from **AssignFromLong**, and the modular inverse of zero. +- [**GdiPlus**](../Contributed/GdiPlus/) -- Windows GDI+: lines, shapes, text and images drawn with pens, brushes, fonts, paths and transformations. Version 0.9.45.0 compiles, and has many members that give wrong results, fail or do not return: a colour given as a **Long** has its red and blue swapped and loses its alpha, saving an image with encoder parameters fails, the font collections cannot be created, and several path, metafile and effect members fail. - [**TBMANLIB**](../Contributed/TBMANLIB/) -- a toolkit of helpers: JSON, an HTTP client, logs, INI and CSV files, timers, strings, bytes, files and dictionaries. Version 1.0.0.29 compiles for 32-bit programs, does not compile in a 64-bit build, and has several members that fail or give wrong results. - [**TBMANLIB_Aes**](../Contributed/TBMANLIB_Aes/) -- AES encryption of text and byte arrays. Version 1.0.0.4 compiles, and its cipher modes are not the ones their names say: the default mode, CBC, runs ECB, and the output does not match the standard test vectors. - [**TBMANLIB_ConsoleComponents**](../Contributed/TBMANLIB_ConsoleComponents/) -- text-interface components for console programs: progress bars, charts, tables and panels. Version 1.0.0.1 compiles, and its components cannot use a console object of the published TBMANLIB_ConsoleCore, since the package carries a copy of that package whose types the compiler treats as different. diff --git a/docs/_book.yml b/docs/_book.yml index 2806e349..fe007d44 100644 --- a/docs/_book.yml +++ b/docs/_book.yml @@ -642,6 +642,7 @@ left_out: pages: - /tB/Packages/Contributed/ArrayListLib/ - /tB/Packages/Contributed/BigNumberLib/ + - /tB/Packages/Contributed/GdiPlus/ - /tB/Packages/Contributed/TBMANLIB/ - /tB/Packages/Contributed/TBMANLIB_Aes/ - /tB/Packages/Contributed/TBMANLIB_ConsoleComponents/ diff --git a/indexer/snapshots/contributed/GdiPlus/api.json b/indexer/snapshots/contributed/GdiPlus/api.json new file mode 100644 index 00000000..e493f003 --- /dev/null +++ b/indexer/snapshots/contributed/GdiPlus/api.json @@ -0,0 +1,7834 @@ +{ + "format": 3, + "package": "GdiPlus", + "project": "GdiPlus", + "version": "0.9.45.0", + "types": [ + { + "name": "ArrowCap", + "kind": "class", + "vis": "public", + "file": "GdiPlus/ArrowCap.twin", + "signature": "Class ArrowCap", + "inherits": ["CustomLineCap"], + "attrs": [{"name":"COMCreatable","args":"False"}], + "members": [ + {"name":"Clone","kind":"function","vis":"public","signature":"Function Clone() As ArrowCap","returnType":"ArrowCap"}, + {"name":"FillState","kind":"property","vis":"public","signature":"Property Get FillState() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"FillState","kind":"property","vis":"public","signature":"Property Let FillState(ByVal isFilled As Boolean)","accessor":"Let"}, + {"name":"Height","kind":"property","vis":"public","signature":"Property Let Height(ByVal height!)","accessor":"Let"}, + {"name":"Height","kind":"property","vis":"public","signature":"Property Get Height() As Single","returnType":"Single","accessor":"Get"}, + {"name":"MiddleInset","kind":"property","vis":"public","signature":"Property Let MiddleInset(ByVal middleInset!)","accessor":"Let"}, + {"name":"MiddleInset","kind":"property","vis":"public","signature":"Property Get MiddleInset() As Single","returnType":"Single","accessor":"Get"}, + {"name":"Native","kind":"property","vis":"protected","signature":"Protected Property Get Native() As GpArrowCap","returnType":"GpArrowCap","accessor":"Get"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(ByVal height!, ByVal width!, ByVal isFilled As Boolean = True)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(ByVal size As GpSizeF, ByVal isFilled As Boolean = True)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(ByVal nativeArrowCap As GpArrowCap, ByVal status As GpStatus = Ok)"}, + {"name":"Size","kind":"property","vis":"public","signature":"Property Let Size(ByVal newSize As GpSizeF)","accessor":"Let"}, + {"name":"Size","kind":"property","vis":"public","signature":"Property Get Size() As GpSizeF","returnType":"GpSizeF","accessor":"Get"}, + {"name":"Width","kind":"property","vis":"public","signature":"Property Let Width(ByVal width!)","accessor":"Let"}, + {"name":"Width","kind":"property","vis":"public","signature":"Property Get Width() As Single","returnType":"Single","accessor":"Get"} + ] + }, + { + "name": "Bitmap", + "kind": "class", + "vis": "public", + "file": "GdiPlus/Bitmap.twin", + "signature": "Class Bitmap", + "inherits": ["Image"], + "attrs": [{"name":"COMCreatable","args":"False"}], + "members": [ + {"name":"ApplyEffect","kind":"function","vis":"public","signature":"Function ApplyEffect(effect As Effect, roi As GpRect) As GpStatus","returnType":"GpStatus"}, + {"name":"Clone","kind":"function","vis":"public","signature":"Function Clone(rect As GpRectF, ByVal format As PixelFormat) As Bitmap","returnType":"Bitmap"}, + {"name":"Clone","kind":"function","vis":"public","signature":"Function Clone(rect As GpRect, ByVal format As PixelFormat) As Bitmap","returnType":"Bitmap"}, + {"name":"Clone","kind":"function","vis":"public","signature":"Function Clone(ByVal x!, ByVal y!, ByVal width!, ByVal height!, ByVal format As PixelFormat) As Bitmap","returnType":"Bitmap"}, + {"name":"CloneI","kind":"function","vis":"public","signature":"Function CloneI(ByVal x&, ByVal y&, ByVal width&, ByVal height&, ByVal format As PixelFormat) As Bitmap","returnType":"Bitmap"}, + {"name":"ConvertFormat","kind":"function","vis":"public","signature":"Function ConvertFormat(ByVal format As PixelFormat, ByVal ditherType As DitherType, ByVal paletteType As PaletteType, palette As ColorPalette, ByVal alphaThresholdPercent!) As GpStatus","returnType":"GpStatus"}, + {"name":"GetHBitmap","kind":"function","vis":"public","signature":"Function GetHBitmap(ByVal colorBackground As Color, hbmReturn As LongPtr) As GpStatus","returnType":"GpStatus"}, + {"name":"GetHIcon","kind":"function","vis":"public","signature":"Function GetHIcon(hIconReturn As LongPtr) As GpStatus","returnType":"GpStatus"}, + {"name":"GetHistogram","kind":"function","vis":"public","signature":"Function GetHistogram(ByVal format As HistogramFormat) As UINT()","returnType":"UINT()","description":"Returns an m x 4 histogram array."}, + {"name":"GetHistogram","kind":"function","vis":"public","signature":"Function GetHistogram(ByVal format As HistogramFormat, histogram As UINT()) As GpStatus","returnType":"GpStatus","description":"Gets an m x 4 histogram array into `histogram`."}, + {"name":"HistogramSize","kind":"property","vis":"public","signature":"Property Get HistogramSize(ByVal format As HistogramFormat) As UINT","returnType":"UINT","accessor":"Get"}, + {"name":"LockBits","kind":"function","vis":"public","signature":"Function LockBits(rect As GpRect, ByVal flags As UINT, ByVal format As PixelFormat, lockedBitmapData As BitmapData) As GpStatus","returnType":"GpStatus"}, + {"name":"Native","kind":"property","vis":"protected","signature":"Protected Property Get Native() As GpBitmap","returnType":"GpBitmap","accessor":"Get"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(ByVal filename As String, ByVal useEmbeddedColorManagement As Boolean = False)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(stream As GDIP_IStream, ByVal useEmbeddedColorManagement As Boolean = False)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(ByVal size As GpSizeF, ByVal stride&, ByVal format As PixelFormat, scan0 As Byte)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(ByVal width!, ByVal height!, ByVal stride&, ByVal format As PixelFormat, scan0 As Byte)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(ByVal size As GpSizeF, ByVal format As PixelFormat = PixelFormat32bppARGB)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(ByVal width!, ByVal height!, ByVal format As PixelFormat = PixelFormat32bppARGB)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(ByVal size As GpSizeF, target As Graphics)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(ByVal width!, ByVal height!, target As Graphics)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(surface As GDIP_IDirectDrawSurface7)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(gdiBitmapInfo As GDIP_BITMAPINFO, gdiBitmapData As Byte)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(ByVal hbm As LongPtr, ByVal hpal As LongPtr)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(ByVal hicon As LongPtr)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(ByVal hInstance As LongPtr, ByVal bitmapName As String)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Public Sub New(ByVal nativeBitmap As GpBitmap)"}, + {"name":"NewImpl1","kind":"sub","vis":"private","signature":"Private Sub NewImpl1(ByVal width!, ByVal height!, target As Graphics)"}, + {"name":"NewImpl2","kind":"sub","vis":"private","signature":"Private Sub NewImpl2(ByVal width!, ByVal height!, ByVal stride&, ByVal format As PixelFormat, scan0 As Byte)"}, + {"name":"Pixel","kind":"property","vis":"public","signature":"Property Get Pixel(ByVal x&, ByVal y&) As Color","returnType":"Color","accessor":"Get","attrs":[{"name":"DefaultMember"}]}, + {"name":"Pixel","kind":"property","vis":"public","signature":"Property Let Pixel(ByVal x&, ByVal y&, ByVal color As Color)","accessor":"Let","attrs":[{"name":"DefaultMember"}]}, + {"name":"SetNativeBitmap","kind":"sub","vis":"protected","signature":"Protected Sub SetNativeBitmap(ByVal nativeBitmap As GpBitmap)"}, + {"name":"SetResolution","kind":"function","vis":"public","signature":"Function SetResolution(ByVal xdpi&, ByVal ydpi&) As GpStatus","returnType":"GpStatus"}, + {"name":"UnlockBits","kind":"function","vis":"public","signature":"Function UnlockBits(lockedBitmapData As BitmapData) As GpStatus","returnType":"GpStatus"} + ] + }, + { + "name": "Blur", + "kind": "class", + "vis": "public", + "file": "GdiPlus/Effects.twin", + "signature": "Class Blur", + "inherits": ["Effect"], + "attrs": [{"name":"COMCreatable","args":"False"}], + "members": [ + {"name":"New","kind":"sub","vis":"public","signature":"Sub New()"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(params As BlurParams)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(ByVal radius!, ByVal expandEdge As Boolean)"}, + {"name":"Parameters","kind":"property","vis":"public","signature":"Property Let Parameters(parameters As BlurParams)","accessor":"Let"}, + {"name":"Parameters","kind":"property","vis":"public","signature":"Property Get Parameters(Optional size As UINT) As BlurParams","returnType":"BlurParams","accessor":"Get"} + ] + }, + { + "name": "BrightnessContrast", + "kind": "class", + "vis": "public", + "file": "GdiPlus/Effects.twin", + "signature": "Class BrightnessContrast", + "inherits": ["Effect"], + "attrs": [{"name":"COMCreatable","args":"False"}], + "members": [ + {"name":"New","kind":"sub","vis":"public","signature":"Sub New()"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(params As BrightnessContrastParams)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(ByVal brightness&, ByVal contrast&)"}, + {"name":"Parameters","kind":"property","vis":"public","signature":"Property Let Parameters(parameters As BrightnessContrastParams)","accessor":"Let"}, + {"name":"Parameters","kind":"property","vis":"public","signature":"Property Get Parameters(Optional size As UINT) As BrightnessContrastParams","returnType":"BrightnessContrastParams","accessor":"Get"} + ] + }, + { + "name": "CachedBitmap", + "kind": "class", + "vis": "public", + "file": "GdiPlus/CachedBitmap.twin", + "signature": "Class CachedBitmap", + "inherits": ["GdiPlusBase"], + "attrs": [{"name":"COMCreatable","args":"False"}], + "members": [ + {"name":"Class_Terminate","kind":"sub","vis":"public","signature":"Sub Class_Terminate()"}, + {"name":"Native","kind":"property","vis":"protected","signature":"Protected Property Get Native() As GpCachedBitmap","returnType":"GpCachedBitmap","accessor":"Get"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(bitmap As Bitmap, gr As Graphics)"}, + {"name":"cb","kind":"field","vis":"public","signature":"Public cb As GpCachedBitmap"} + ] + }, + { + "name": "ColorBalance", + "kind": "class", + "vis": "public", + "file": "GdiPlus/Effects.twin", + "signature": "Class ColorBalance", + "inherits": ["Effect"], + "attrs": [{"name":"COMCreatable","args":"False"}], + "members": [ + {"name":"New","kind":"sub","vis":"public","signature":"Sub New()"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(params As ColorBalanceParams)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(ByVal cyanRed&, ByVal magentaGreen&, ByVal yellowBlue&)"}, + {"name":"Parameters","kind":"property","vis":"public","signature":"Property Let Parameters(parameters As ColorBalanceParams)","accessor":"Let"}, + {"name":"Parameters","kind":"property","vis":"public","signature":"Property Get Parameters(Optional size As UINT) As ColorBalanceParams","returnType":"ColorBalanceParams","accessor":"Get"} + ] + }, + { + "name": "ColorCurve", + "kind": "class", + "vis": "public", + "file": "GdiPlus/Effects.twin", + "signature": "Class ColorCurve", + "inherits": ["Effect"], + "attrs": [{"name":"COMCreatable","args":"False"}], + "members": [ + {"name":"New","kind":"sub","vis":"public","signature":"Sub New()"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(params As ColorCurveParams)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(ByVal adjustment As CurveAdjustments, ByVal channel As CurveChannel, ByVal value&)"}, + {"name":"Parameters","kind":"property","vis":"public","signature":"Property Let Parameters(parameters As ColorCurveParams)","accessor":"Let"}, + {"name":"Parameters","kind":"property","vis":"public","signature":"Property Get Parameters(Optional size As UINT) As ColorCurveParams","returnType":"ColorCurveParams","accessor":"Get"} + ] + }, + { + "name": "ColorLUT", + "kind": "class", + "vis": "public", + "file": "GdiPlus/Effects.twin", + "signature": "Class ColorLUT", + "inherits": ["Effect"], + "attrs": [{"name":"COMCreatable","args":"False"}], + "members": [ + {"name":"New","kind":"sub","vis":"public","signature":"Sub New()"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(params As ColorLUTParams)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(lutB() As Byte, lutG() As Byte, lutR() As Byte, lutA() As Byte)"}, + {"name":"Parameters","kind":"property","vis":"public","signature":"Property Let Parameters(parameters As ColorLUTParams)","accessor":"Let"}, + {"name":"Parameters","kind":"property","vis":"public","signature":"Property Get Parameters(Optional size As UINT) As ColorLUTParams","returnType":"ColorLUTParams","accessor":"Get"} + ] + }, + { + "name": "ColorMatrixEffect", + "kind": "class", + "vis": "public", + "file": "GdiPlus/Effects.twin", + "signature": "Class ColorMatrixEffect", + "inherits": ["Effect"], + "attrs": [{"name":"COMCreatable","args":"False"}], + "members": [ + {"name":"New","kind":"sub","vis":"public","signature":"Sub New()"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(params As ColorMatrix)"}, + {"name":"Parameters","kind":"property","vis":"public","signature":"Property Let Parameters(parameters As ColorMatrix)","accessor":"Let"}, + {"name":"Parameters","kind":"property","vis":"public","signature":"Property Get Parameters(Optional size As UINT) As ColorMatrix","returnType":"ColorMatrix","accessor":"Get"} + ] + }, + { + "name": "CustomLineCap", + "kind": "class", + "vis": "public", + "file": "GdiPlus/LineCap.twin", + "signature": "Class CustomLineCap", + "inherits": ["GdiPlusBase"], + "attrs": [{"name":"COMCreatable","args":"False"}], + "members": [ + {"name":"BaseCap","kind":"property","vis":"public","signature":"Property Let BaseCap(ByVal baseCap As GpLineCap)","accessor":"Let"}, + {"name":"BaseCap","kind":"property","vis":"public","signature":"Property Get BaseCap() As GpLineCap","returnType":"GpLineCap","accessor":"Get"}, + {"name":"BaseInset","kind":"property","vis":"public","signature":"Property Let BaseInset(ByVal inset!)","accessor":"Let"}, + {"name":"BaseInset","kind":"property","vis":"public","signature":"Property Get BaseInset() As Single","returnType":"Single","accessor":"Get"}, + {"name":"Class_Terminate","kind":"sub","vis":"public","signature":"Overridable Sub Class_Terminate()"}, + {"name":"Clone","kind":"function","vis":"public","signature":"Function Clone() As CustomLineCap","returnType":"CustomLineCap"}, + {"name":"EndStrokeCap","kind":"property","vis":"public","signature":"Property Let EndStrokeCap(ByVal endCap As GpLineCap)","accessor":"Let"}, + {"name":"EndStrokeCap","kind":"property","vis":"public","signature":"Property Get EndStrokeCap() As GpLineCap","returnType":"GpLineCap","accessor":"Get"}, + {"name":"GetStrokeCaps","kind":"function","vis":"public","signature":"Function GetStrokeCaps(Optional startCap As GpLineCap, Optional endCap As GpLineCap) As GpStatus","returnType":"GpStatus"}, + {"name":"Native","kind":"property","vis":"protected","signature":"Protected Property Get Native() As GpCustomLineCap","returnType":"GpCustomLineCap","accessor":"Get"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(fillPath As GraphicsPath, strokePath As GraphicsPath, ByVal baseCap As GpLineCap = linecapflat, ByVal baseInset& = 0)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(ByVal nativeCap As GpCustomLineCap, ByVal status As GpStatus = Ok)"}, + {"name":"SetStrokeCaps","kind":"function","vis":"public","signature":"Function SetStrokeCaps(ByVal startCap As GpLineCap = -1, ByVal endCap As GpLineCap = -1) As GpStatus","returnType":"GpStatus"}, + {"name":"StartStrokeCap","kind":"property","vis":"public","signature":"Property Let StartStrokeCap(ByVal startCap As GpLineCap)","accessor":"Let"}, + {"name":"StartStrokeCap","kind":"property","vis":"public","signature":"Property Get StartStrokeCap() As GpLineCap","returnType":"GpLineCap","accessor":"Get"}, + {"name":"StrokeCap","kind":"property","vis":"public","signature":"Property Let StrokeCap(ByVal strokeCap As GpLineCap)","accessor":"Let"}, + {"name":"StrokeJoin","kind":"property","vis":"public","signature":"Property Let StrokeJoin(ByVal lineJoin As GpLineJoin)","accessor":"Let"}, + {"name":"StrokeJoin","kind":"property","vis":"public","signature":"Property Get StrokeJoin() As GpLineJoin","returnType":"GpLineJoin","accessor":"Get"}, + {"name":"WidthScale","kind":"property","vis":"public","signature":"Property Let WidthScale(ByVal widthScale!)","accessor":"Let"}, + {"name":"WidthScale","kind":"property","vis":"public","signature":"Property Get WidthScale() As Single","returnType":"Single","accessor":"Get"}, + {"name":"lc","kind":"field","vis":"protected","signature":"Protected lc As GpCustomLineCap"} + ] + }, + { + "name": "Effect", + "kind": "class", + "vis": "public", + "file": "GdiPlus/Effects.twin", + "signature": "Class Effect", + "inherits": ["GdiPlusBase"], + "attrs": [{"name":"COMCreatable","args":"False"}], + "members": [ + {"name":"AuxData","kind":"property","vis":"public","signature":"Property Get AuxData() As LongPtr","returnType":"LongPtr","accessor":"Get"}, + {"name":"AuxDataSize","kind":"property","vis":"public","signature":"Property Get AuxDataSize() As Long","returnType":"Long","accessor":"Get"}, + {"name":"Class_Terminate","kind":"sub","vis":"public","signature":"Sub Class_Terminate()"}, + {"name":"Native","kind":"property","vis":"protected","signature":"Protected Property Get Native() As GpEffect","returnType":"GpEffect","accessor":"Get"}, + {"name":"New","kind":"sub","vis":"protected","signature":"Protected Sub New(ByVal nativeEffect As GpEffect)"}, + {"name":"ParameterSize","kind":"property","vis":"public","signature":"Property Get ParameterSize() As UINT","returnType":"UINT","accessor":"Get"}, + {"name":"SetAuxData","kind":"sub","vis":"public","signature":"Sub SetAuxData(ByVal auxData As LongPtr, ByVal auxDataSize&)"}, + {"name":"UseAuxData","kind":"property","vis":"public","signature":"Property Get UseAuxData() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"UseAuxData","kind":"property","vis":"public","signature":"Property Let UseAuxData(ByVal useAuxDataFlag As Boolean)","accessor":"Let"}, + {"name":"_auxData","kind":"field","vis":"protected","signature":"Protected _auxData As LongPtr"}, + {"name":"_auxDataSize","kind":"field","vis":"protected","signature":"Protected _auxDataSize&"}, + {"name":"_useAuxData","kind":"field","vis":"protected","signature":"Protected _useAuxData As Boolean"}, + {"name":"fx","kind":"field","vis":"protected","signature":"Protected fx As GpEffect"} + ] + }, + { + "name": "Font", + "kind": "class", + "vis": "public", + "file": "GdiPlus/Font.twin", + "signature": "Class Font", + "inherits": ["GdiPlusBase"], + "attrs": [{"name":"COMCreatable","args":"False"}], + "members": [ + {"name":"Ascent","kind":"property","vis":"public","signature":"Property Get Ascent() As Single","returnType":"Single","accessor":"Get"}, + {"name":"Class_Terminate","kind":"sub","vis":"public","signature":"Sub Class_Terminate()"}, + {"name":"Clone","kind":"function","vis":"public","signature":"Function Clone() As Font","returnType":"Font"}, + {"name":"CloneMetricsTo","kind":"sub","vis":"protected","signature":"Protected Sub CloneMetricsTo(other As Font)"}, + {"name":"Descent","kind":"property","vis":"public","signature":"Property Get Descent() As Single","returnType":"Single","accessor":"Get"}, + {"name":"Family","kind":"property","vis":"public","signature":"Property Get Family() As FontFamily","returnType":"FontFamily","accessor":"Get"}, + {"name":"GetHeight","kind":"function","vis":"public","signature":"Function GetHeight(gr As Graphics) As Single","returnType":"Single"}, + {"name":"GetHeight","kind":"function","vis":"public","signature":"Function GetHeight(ByVal dpi!) As Single","returnType":"Single"}, + {"name":"GetLogFontA","kind":"function","vis":"public","signature":"Function GetLogFontA(g As Graphics) As GDIP_LOGFONTA","returnType":"GDIP_LOGFONTA"}, + {"name":"GetLogFontA","kind":"function","vis":"public","signature":"Function GetLogFontA(g As Graphics, logfonta As GDIP_LOGFONTA) As GpStatus","returnType":"GpStatus"}, + {"name":"GetLogFontW","kind":"function","vis":"public","signature":"Function GetLogFontW(g As Graphics) As GDIP_LOGFONTW","returnType":"GDIP_LOGFONTW"}, + {"name":"GetLogFontW","kind":"function","vis":"public","signature":"Function GetLogFontW(g As Graphics, logfontw As GDIP_LOGFONTW) As GpStatus","returnType":"GpStatus"}, + {"name":"InitMetrics","kind":"function","vis":"protected","signature":"Protected Function InitMetrics() As Boolean","returnType":"Boolean"}, + {"name":"InitMetrics","kind":"function","vis":"protected","signature":"Protected Function InitMetrics(ByVal nativeFamily As GpFontFamily) As Boolean","returnType":"Boolean"}, + {"name":"IsAvailable","kind":"property","vis":"public","signature":"Property Get IsAvailable() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"LineSpacing","kind":"property","vis":"public","signature":"Property Get LineSpacing() As Single","returnType":"Single","accessor":"Get"}, + {"name":"Native","kind":"property","vis":"protected","signature":"Protected Property Get Native() As GpFont","returnType":"GpFont","accessor":"Get"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(ByVal hdc As LongPtr)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(ByVal hdc As LongPtr, ByVal hfont As LongPtr)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(ByVal hdc As LongPtr, logfont As GDIP_LOGFONTA)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(ByVal hdc As LongPtr, logfont As GDIP_LOGFONTW)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(family As FontFamily, ByVal emSize!, ByVal style As GpFontStyle = FontStyleRegular, ByVal unit As GpUnit = UnitPoint)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(ByVal familyName$, ByVal emSize!, ByVal style As GpFontStyle = FontStyleRegular, ByVal unit As GpUnit = UnitPoint, Optional fontCollection As FontCollection)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(ByVal font As GpFont, ByVal status As GpStatus = Ok)"}, + {"name":"Size","kind":"property","vis":"public","signature":"Property Get Size() As Single","returnType":"Single","accessor":"Get"}, + {"name":"Style","kind":"property","vis":"public","signature":"Property Get Style() As GpFontStyle","returnType":"GpFontStyle","accessor":"Get"}, + {"name":"Unit","kind":"property","vis":"public","signature":"Property Get Unit() As GpUnit","returnType":"GpUnit","accessor":"Get"}, + {"name":"ft","kind":"field","vis":"private","signature":"Dim ft As GpFont"}, + {"name":"metrics","kind":"field","vis":"protected","signature":"Protected metrics As Metrics"} + ] + }, + { + "name": "Metrics", + "kind": "type", + "in": "Font", + "vis": "protected", + "public": false, + "file": "GdiPlus/Font.twin", + "signature": "Protected Type Metrics", + "fields": [ + {"name":"emHeight","vis":"public","signature":"emHeight%"}, + {"name":"ascent","vis":"public","signature":"ascent%"}, + {"name":"descent","vis":"public","signature":"descent%"}, + {"name":"lineSpacing","vis":"public","signature":"lineSpacing%"} + ], + "members": [] + }, + { + "name": "FontCollection", + "kind": "class", + "vis": "public", + "file": "GdiPlus/FontCollection.twin", + "signature": "Class FontCollection", + "inherits": ["GdiPlusBase"], + "attrs": [{"name":"COMCreatable","args":"False"}], + "members": [ + {"name":"Class_Terminate","kind":"sub","vis":"public","signature":"Overridable Sub Class_Terminate()"}, + {"name":"Families","kind":"function","vis":"public","signature":"Function Families() As FontFamily()","returnType":"FontFamily()"}, + {"name":"FamilyCount","kind":"property","vis":"public","signature":"Property Get FamilyCount() As Long","returnType":"Long","accessor":"Get"}, + {"name":"Native","kind":"property","vis":"protected","signature":"Protected Property Get Native() As GpFontCollection","returnType":"GpFontCollection","accessor":"Get"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New()"}, + {"name":"New","kind":"sub","vis":"protected","signature":"Protected Sub New(ByVal nativeCollection As GpFontCollection, ByVal status As GpStatus = Ok)"}, + {"name":"fc","kind":"field","vis":"protected","signature":"Protected fc As GpFontCollection"} + ] + }, + { + "name": "FontFamily", + "kind": "class", + "vis": "public", + "file": "GdiPlus/FontFamily.twin", + "signature": "Class FontFamily", + "inherits": ["GdiPlusBase"], + "attrs": [{"name":"COMCreatable","args":"False"}], + "members": [ + {"name":"CellAscent","kind":"property","vis":"public","signature":"Property Get CellAscent(ByVal style As GpFontStyle) As Integer","returnType":"Integer","accessor":"Get"}, + {"name":"CellDescent","kind":"property","vis":"public","signature":"Property Get CellDescent(ByVal style As GpFontStyle) As Integer","returnType":"Integer","accessor":"Get"}, + {"name":"Class_Terminate","kind":"sub","vis":"public","signature":"Sub Class_Terminate()"}, + {"name":"Clone","kind":"function","vis":"public","signature":"Function Clone() As FontFamily","returnType":"FontFamily"}, + {"name":"EmHeight","kind":"property","vis":"public","signature":"Property Get EmHeight(ByVal style As GpFontStyle) As Integer","returnType":"Integer","accessor":"Get"}, + {"name":"FamilyName","kind":"property","vis":"public","signature":"Property Get FamilyName(ByVal language As LANGID = 0) As String","returnType":"String","accessor":"Get"}, + {"name":"IsAvailable","kind":"property","vis":"public","signature":"Property Get IsAvailable() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"IsBoldAvailable","kind":"property","vis":"public","signature":"Property Get IsBoldAvailable() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"IsBoldItalicAvailable","kind":"property","vis":"public","signature":"Property Get IsBoldItalicAvailable() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"IsItalicAvailable","kind":"property","vis":"public","signature":"Property Get IsItalicAvailable() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"IsStrikeoutAvailable","kind":"property","vis":"public","signature":"Property Get IsStrikeoutAvailable() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"IsStyleAvailable","kind":"function","vis":"public","signature":"Function IsStyleAvailable(ByVal style As GpFontStyle) As Boolean","returnType":"Boolean"}, + {"name":"IsUnderlinedAvailable","kind":"property","vis":"public","signature":"Property Get IsUnderlinedAvailable() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"LF_FACESIZE","kind":"const","vis":"private","signature":"Private Const LF_FACESIZE = 32"}, + {"name":"LF_FULLFACESIZE","kind":"const","vis":"private","signature":"Private Const LF_FULLFACESIZE = 64"}, + {"name":"LineSpacing","kind":"property","vis":"public","signature":"Property Get LineSpacing(ByVal style As GpFontStyle) As Integer","returnType":"Integer","accessor":"Get"}, + {"name":"Native","kind":"property","vis":"protected","signature":"Protected Property Get Native() As GpFontFamily","returnType":"GpFontFamily","accessor":"Get"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(ByVal name$, Optional fontCollection As FontCollection)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Public Sub New(ByVal nativeFamily As GpFontFamily)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Public Sub New(ByVal nativeFamily As GpFontFamily, ByVal status As GpStatus)"}, + {"name":"ff","kind":"field","vis":"private","signature":"Dim ff As GpFontFamily"} + ] + }, + { + "name": "GDIP_IDirectDrawSurface7", + "kind": "interface", + "vis": "public", + "file": "GdiPlus/Bitmap.twin", + "signature": "Interface GDIP_IDirectDrawSurface7", + "attrs": [{"name":"InterfaceId","args":"\"06675A80-3B9B-11D2-B92F-00609797EA5B\""},{"name":"OleAutomation","args":"False"}], + "members": [] + }, + { + "name": "GDIP_IStream", + "kind": "interface", + "vis": "public", + "file": "GdiPlus/Image.twin", + "signature": "Interface GDIP_IStream", + "attrs": [{"name":"InterfaceId","args":"\"0000000c-0000-0000-C000-000000000046\""},{"name":"OleAutomation","args":"False"}], + "members": [] + }, + { + "name": "GdiPlusAbort", + "kind": "interface", + "vis": "public", + "file": "GdiPlus/Types.twin", + "signature": "Interface GdiPlusAbort", + "members": [ + {"name":"Abort","kind":"function","vis":"public","signature":"Function Abort() As Long","returnType":"Long"} + ] + }, + { + "name": "GdiPlusBase", + "kind": "class", + "vis": "public", + "file": "GdiPlus/GdiPlusBase.twin", + "signature": "Class GdiPlusBase", + "attrs": [{"name":"COMCreatable","args":"False"}], + "members": [ + {"name":"Alloc","kind":"function","vis":"public","signature":"Static Function Alloc(size As LongPtr) As LongPtr","returnType":"LongPtr"}, + {"name":"ClearResult","kind":"function","vis":"public","signature":"Function ClearResult() As GpStatus","returnType":"GpStatus"}, + {"name":"CloneImpl","kind":"function","vis":"protected","signature":"Protected Function CloneImpl(Of T, N)(ByVal native As N) As T","returnType":"T"}, + {"name":"CloneImpl2","kind":"function","vis":"protected","signature":"Protected Function CloneImpl2(Of T, N, Nin)(ByVal native As Nin) As T","returnType":"T"}, + {"name":"Free","kind":"sub","vis":"public","signature":"Static Sub Free(ptr As LongPtr)"}, + {"name":"GetLastResult","kind":"function","vis":"public","signature":"Function GetLastResult() As GpStatus","returnType":"GpStatus"}, + {"name":"LastResult","kind":"property","vis":"public","signature":"Property Get LastResult() As GpStatus","returnType":"GpStatus","accessor":"Get"}, + {"name":"SetStatus","kind":"function","vis":"protected","signature":"Protected Function SetStatus(ByVal status As GpStatus) As GpStatus","returnType":"GpStatus"}, + {"name":"Status","kind":"property","vis":"public","signature":"Property Get Status() As String","returnType":"String","accessor":"Get"}, + {"name":"StatusNL","kind":"property","vis":"public","signature":"Property Get StatusNL() As String","returnType":"String","accessor":"Get"}, + {"name":"_lastStatus","kind":"field","vis":"private","signature":"Private _lastStatus As GpStatus"} + ] + }, + { + "name": "GdiPlusUser", + "kind": "class", + "vis": "public", + "file": "GdiPlus/GdiPlusUser.twin", + "signature": "Class GdiPlusUser", + "inherits": ["GdiPlusBase"], + "attrs": [{"name":"COMCreatable","args":"False"}], + "members": [ + {"name":"Class_Terminate","kind":"sub","vis":"public","signature":"Sub Class_Terminate()"}, + {"name":"GetBuildNumber","kind":"function","vis":"public","signature":"Function GetBuildNumber() As Long","returnType":"Long"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(ByRef input As GdiplusStartupInput)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(ByRef input As GdiplusStartupInput, ByRef output As GdiplusStartupOutput)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(ByVal startupParams As GdiplusStartupParams = GdiplusStartupDefault)"}, + {"name":"NewImpl1","kind":"sub","vis":"private","signature":"Private Sub NewImpl1(ByRef input As GdiplusStartupInput, ByRef output As GdiplusStartupOutput)"}, + {"name":"NewImpl2","kind":"sub","vis":"private","signature":"Private Sub NewImpl2(ByVal startupParams As GdiplusStartupParams)"}, + {"name":"TestControlForceBilinear","kind":"function","vis":"public","signature":"Function TestControlForceBilinear(ByVal force As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"TestControlNoICM","kind":"function","vis":"public","signature":"Function TestControlNoICM(ByVal noICM As Boolean) As GpStatus","returnType":"GpStatus"} + ] + }, + { + "name": "GdipArrowCap", + "kind": "module", + "vis": "public", + "file": "GdiPlus/ArrowCap.twin", + "signature": "Module GdipArrowCap", + "members": [ + {"name":"ArrowCap","kind":"function","vis":"public","signature":"Function ArrowCap(ByVal height!, ByVal width!, ByVal isFilled As Boolean = True) As ArrowCap","returnType":"ArrowCap"}, + {"name":"ArrowCap","kind":"function","vis":"public","signature":"Function ArrowCap(ByVal size As GpSizeF, ByVal isFilled As Boolean = True) As ArrowCap","returnType":"ArrowCap"}, + {"name":"GpArrowCap","kind":"function","vis":"public","signature":"Function GpArrowCap() As GpArrowCap","returnType":"GpArrowCap"} + ] + }, + { + "name": "GpArrowCap", + "kind": "type", + "in": "GdipArrowCap", + "vis": "public", + "file": "GdiPlus/ArrowCap.twin", + "signature": "Type GpArrowCap", + "fields": [ + {"name":"Native","vis":"public","signature":"Native As LongPtr"} + ], + "members": [ + {"name":"Clone","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function Clone Lib \"gdiplus\" Alias \"GdipCloneCustomLineCap\" (ByVal Me As GpArrowCap, clonedCap As GpArrowCap) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"CreateInto","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function CreateInto Lib \"gdiplus\" Alias \"GdipCreateAdjustableArrowCap\" (ByVal Height As Single, ByVal Width As Single, ByVal isFilled As Long, cap As GpArrowCap) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"CreateInto","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function CreateInto Lib \"gdiplus\" Alias \"GdipCreateCustomLineCap\" (ByVal fillPath As GpPath, ByVal strokePath As GpPath, ByVal baseCap As GpLineCap, ByVal baseInset As Single, customCap As GpArrowCap) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"Delete","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function Delete Lib \"gdiplus\" Alias \"GdipDeleteCustomLineCap\" (ByVal Me As GpArrowCap) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetBaseCap","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function GetBaseCap Lib \"gdiplus\" Alias \"GdipGetCustomLineCapBaseCap\" (ByVal Me As GpArrowCap, baseCap As GpLineCap) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetBaseInset","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function GetBaseInset Lib \"gdiplus\" Alias \"GdipGetCustomLineCapBaseInset\" (ByVal Me As GpArrowCap, inset As Single) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetFillState","kind":"function","vis":"public","signature":"Function GetFillState(fillState As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"GetFillState2","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function GetFillState2 Lib \"gdiplus\" Alias \"GdipGetAdjustableArrowCapFillState\" (ByVal Me As GpArrowCap, fillState As GDIP_BOOL) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetHeight","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function GetHeight Lib \"gdiplus\" Alias \"GdipGetAdjustableArrowCapHeight\" (ByVal Me As GpArrowCap, height As Single) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetMiddleInset","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function GetMiddleInset Lib \"gdiplus\" Alias \"GdipGetAdjustableArrowCapMiddleInset\" (ByVal Me As GpArrowCap, middleInset As Single) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetSize","kind":"function","vis":"public","signature":"Function GetSize(size As GpSizeF) As GpStatus","returnType":"GpStatus"}, + {"name":"GetStrokeCaps","kind":"function","vis":"public","signature":"Function GetStrokeCaps(Optional startCap As GpLineCap, Optional endCap As GpLineCap) As GpStatus","returnType":"GpStatus"}, + {"name":"GetStrokeCaps2","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function GetStrokeCaps2 Lib \"gdiplus\" Alias \"GdipGetCustomLineCapStrokeCaps\" (ByVal Me As GpArrowCap, startCap As GpLineCap, endCap As GpLineCap) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetStrokeJoin","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function GetStrokeJoin Lib \"gdiplus\" Alias \"GdipGetCustomLineCapStrokeJoin\" (ByVal Me As GpArrowCap, lineJoin As GpLineJoin) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetType","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function GetType Lib \"gdiplus\" Alias \"GdipGetCustomLineCapType\" (ByVal Me As GpArrowCap, capType As GpCustomLineCapType) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetWidth","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function GetWidth Lib \"gdiplus\" Alias \"GdipGetAdjustableArrowCapWidth\" (ByVal Me As GpArrowCap, width As Single) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetWidthScale","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function GetWidthScale Lib \"gdiplus\" Alias \"GdipGetCustomLineCapWidthScale\" (ByVal Me As GpArrowCap, widthScale As Single) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetBaseCap","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function SetBaseCap Lib \"gdiplus\" Alias \"GdipSetCustomLineCapBaseCap\" (ByVal Me As GpArrowCap, ByVal baseCap As GpLineCap) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetBaseInset","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function SetBaseInset Lib \"gdiplus\" Alias \"GdipSetCustomLineCapBaseInset\" (ByVal Me As GpArrowCap, ByVal inset As Single) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetFillState","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function SetFillState Lib \"gdiplus\" Alias \"GdipSetAdjustableArrowCapFillState\" (ByVal Me As GpArrowCap, ByVal fillState As GDIP_BOOL) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetHeight","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function SetHeight Lib \"gdiplus\" Alias \"GdipSetAdjustableArrowCapHeight\" (ByVal Me As GpArrowCap, ByVal height As Single) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetMiddleInset","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function SetMiddleInset Lib \"gdiplus\" Alias \"GdipSetAdjustableArrowCapMiddleInset\" (ByVal Me As GpArrowCap, ByVal middleInset As Single) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetSize","kind":"function","vis":"public","signature":"Function SetSize(ByVal newSize As GpSizeF) As GpStatus","returnType":"GpStatus"}, + {"name":"SetStrokeCap","kind":"function","vis":"public","signature":"Function SetStrokeCap(ByVal cap As GpLineCap) As GpStatus","returnType":"GpStatus"}, + {"name":"SetStrokeCaps","kind":"function","vis":"public","signature":"Function SetStrokeCaps(ByVal startCap As GpLineCap = -1, ByVal endCap As GpLineCap = -1) As GpStatus","returnType":"GpStatus"}, + {"name":"SetStrokeCaps2","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function SetStrokeCaps2 Lib \"gdiplus\" Alias \"GdipSetCustomLineCapStrokeCaps\" (ByVal Me As GpArrowCap, ByVal startCap As GpLineCap, ByVal endCap As GpLineCap) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetStrokeJoin","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function SetStrokeJoin Lib \"gdiplus\" Alias \"GdipSetCustomLineCapStrokeJoin\" (ByVal Me As GpArrowCap, ByVal lineJoin As GpLineJoin) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetWidth","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function SetWidth Lib \"gdiplus\" Alias \"GdipSetAdjustableArrowCapWidth\" (ByVal Me As GpArrowCap, ByVal width As Single) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetWidthScale","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function SetWidthScale Lib \"gdiplus\" Alias \"GdipSetCustomLineCapWidthScale\" (ByVal Me As GpArrowCap, ByVal widthScale As Single) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]} + ] + }, + { + "name": "GdipBitmap", + "kind": "module", + "vis": "public", + "file": "GdiPlus/Bitmap.twin", + "signature": "Module GdipBitmap", + "members": [ + {"name":"ApplyEffect","kind":"function","vis":"public","signature":"Function ApplyEffect( inputs() As Bitmap, effect As Effect, output As Bitmap ) As GpStatus","returnType":"GpStatus"}, + {"name":"ApplyEffect","kind":"function","vis":"public","signature":"Function ApplyEffect( inputs() As Bitmap, effect As Effect, ROI As GDIP_RECT, outputRect As GDIP_RECT, output As Bitmap ) As GpStatus","returnType":"GpStatus"}, + {"name":"Bitmap","kind":"function","vis":"public","signature":"Function Bitmap(ByVal filename As String, ByVal useEmbeddedColorManagement As Boolean = False) As Bitmap","returnType":"Bitmap"}, + {"name":"Bitmap","kind":"function","vis":"public","signature":"Function Bitmap(stream As GDIP_IStream, ByVal useEmbeddedColorManagement As Boolean = False) As Bitmap","returnType":"Bitmap"}, + {"name":"Bitmap","kind":"function","vis":"public","signature":"Function Bitmap(ByVal size As GpSizeF, ByVal stride&, ByVal format As PixelFormat, scan0 As Byte) As Bitmap","returnType":"Bitmap"}, + {"name":"Bitmap","kind":"function","vis":"public","signature":"Function Bitmap(ByVal width!, ByVal height!, ByVal stride&, ByVal format As PixelFormat, scan0 As Byte) As Bitmap","returnType":"Bitmap"}, + {"name":"Bitmap","kind":"function","vis":"public","signature":"Function Bitmap(ByVal size As GpSizeF, ByVal format As PixelFormat = PixelFormat32bppARGB) As Bitmap","returnType":"Bitmap"}, + {"name":"Bitmap","kind":"function","vis":"public","signature":"Function Bitmap(ByVal width!, ByVal height!, ByVal format As PixelFormat = PixelFormat32bppARGB) As Bitmap","returnType":"Bitmap"}, + {"name":"Bitmap","kind":"function","vis":"public","signature":"Function Bitmap(ByVal size As GpSizeF, target As Graphics) As Bitmap","returnType":"Bitmap"}, + {"name":"Bitmap","kind":"function","vis":"public","signature":"Function Bitmap(ByVal width!, ByVal height!, target As Graphics) As Bitmap","returnType":"Bitmap"}, + {"name":"Bitmap","kind":"function","vis":"public","signature":"Function Bitmap(surface As GDIP_IDirectDrawSurface7) As Bitmap","returnType":"Bitmap"}, + {"name":"Bitmap","kind":"function","vis":"public","signature":"Function Bitmap(gdiBitmapInfo As GDIP_BITMAPINFO, gdiBitmapData As Byte) As Bitmap","returnType":"Bitmap"}, + {"name":"Bitmap","kind":"function","vis":"public","signature":"Function Bitmap(hbm As LongPtr, hpal As LongPtr) As Bitmap","returnType":"Bitmap"}, + {"name":"Bitmap","kind":"function","vis":"public","signature":"Function Bitmap(hicon As LongPtr) As Bitmap","returnType":"Bitmap"}, + {"name":"Bitmap","kind":"function","vis":"public","signature":"Function Bitmap(hInstance As LongPtr, ByVal bitmapName As String) As Bitmap","returnType":"Bitmap"}, + {"name":"CloneBitmapArea","kind":"function","vis":"public","signature":"Function CloneBitmapArea(rect As GpRectF, ByVal format As PixelFormat, ByVal srcBitmap As GpBitmap, dstBitmap As GpBitmap) As GpStatus","returnType":"GpStatus"}, + {"name":"CloneBitmapArea2","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function CloneBitmapArea2 Lib \"gdiplus\" Alias \"GdipCloneBitmapArea\" (ByVal x!, ByVal y!, ByVal width!, ByVal height!, ByVal format As PixelFormat, ByVal srcBitmap As GpBitmap, dstBitmap As GpBitmap) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"CloneBitmapArea2I","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function CloneBitmapArea2I Lib \"gdiplus\" Alias \"GdipCloneBitmapAreaI\" (ByVal x&, ByVal y&, ByVal width&, ByVal height&, ByVal format As PixelFormat, ByVal srcBitmap As GpBitmap, dstBitmap As GpBitmap) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"CloneBitmapAreaI","kind":"function","vis":"public","signature":"Function CloneBitmapAreaI(rect As GpRect, ByVal format As PixelFormat, ByVal srcBitmap As GpBitmap, dstBitmap As GpBitmap) As GpStatus","returnType":"GpStatus"}, + {"name":"CreateApplyEffect","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function CreateApplyEffect Lib \"gdiplus\" Alias \"GdipBitmapCreateApplyEffect\" (inputBitmaps As Any, ByVal numInputs&, ByVal effect As GpEffect, roi As GDIP_RECT, outputRect As GDIP_RECT, outputBitmap As GpBitmap, ByVal useAuxData As GDIP_BOOL, auxData As Any, auxDataSize As Long) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetPixel","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetPixel Lib \"gdiplus\" Alias \"GdipBitmapGetPixel\" (ByVal Me As GpImage, ByVal X&, ByVal Y&, Color As Color) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GpBitmap","kind":"function","vis":"public","signature":"Function GpBitmap() As GpBitmap","returnType":"GpBitmap"}, + {"name":"InitializePalette","kind":"function","vis":"public","signature":"Function InitializePalette( palette As ColorPalette, ByVal paletteTypee As PaletteType, ByVal optimalColors&, ByVal useTransparentColor As Boolean, Optional bitmap As Bitmap ) As GpStatus","returnType":"GpStatus"}, + {"name":"InitializePalette","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function InitializePalette Lib \"gdiplus\" Alias \"GdipInitializePalette\" (palette As ColorPalette, ByVal paletteType As PaletteType, ByVal optimalColors&, ByVal useTransparentColor As GDIP_BOOL, ByVal bitmap As GpBitmap) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetPixel","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetPixel Lib \"gdiplus\" Alias \"GdipBitmapSetPixel\" (ByVal Me As GpImage, ByVal X&, ByVal Y&, ByVal Color As Color) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]} + ] + }, + { + "name": "GDIP_BITMAPINFO", + "kind": "type", + "in": "GdipBitmap", + "vis": "public", + "file": "GdiPlus/Bitmap.twin", + "signature": "Public Type GDIP_BITMAPINFO", + "fields": [ + {"name":"bmiHeader","vis":"public","signature":"bmiHeader As GDIP_BITMAPINFOHEADER"}, + {"name":"bmiColors","vis":"public","signature":"bmiColors(0 To 0) As Long"} + ], + "members": [] + }, + { + "name": "GDIP_BITMAPINFOHEADER", + "kind": "type", + "in": "GdipBitmap", + "vis": "public", + "file": "GdiPlus/Bitmap.twin", + "signature": "Public Type GDIP_BITMAPINFOHEADER", + "fields": [ + {"name":"biSize","vis":"public","signature":"biSize As Long"}, + {"name":"biWidth","vis":"public","signature":"biWidth As Long"}, + {"name":"biHeight","vis":"public","signature":"biHeight As Long"}, + {"name":"biPlanes","vis":"public","signature":"biPlanes As Integer"}, + {"name":"biBitCount","vis":"public","signature":"biBitCount As Integer"}, + {"name":"biCompression","vis":"public","signature":"biCompression As GDIP_GDI_BITMAP_COMPRESSION"}, + {"name":"biSizeImage","vis":"public","signature":"biSizeImage As Long"}, + {"name":"biXPelsPerMeter","vis":"public","signature":"biXPelsPerMeter As Long"}, + {"name":"biYPelsPerMeter","vis":"public","signature":"biYPelsPerMeter As Long"}, + {"name":"biClrUsed","vis":"public","signature":"biClrUsed As Long"}, + {"name":"biClrImportant","vis":"public","signature":"biClrImportant As Long"} + ], + "members": [] + }, + { + "name": "GDIP_GDI_BITMAP_COMPRESSION", + "kind": "enum", + "in": "GdipBitmap", + "vis": "public", + "file": "GdiPlus/Bitmap.twin", + "signature": "Public Enum GDIP_GDI_BITMAP_COMPRESSION", + "values": [ + {"name":"BI_RGB","value":"0"}, + {"name":"BI_RLE8","value":"1"}, + {"name":"BI_RLE4","value":"2"}, + {"name":"BI_BITFIELDS","value":"3"}, + {"name":"BI_JPEG","value":"4"}, + {"name":"BI_PNG","value":"5"} + ] + }, + { + "name": "GpBitmap", + "kind": "type", + "in": "GdipBitmap", + "vis": "public", + "file": "GdiPlus/Bitmap.twin", + "signature": "Type GpBitmap", + "fields": [ + {"name":"Native","vis":"public","signature":"Native As LongPtr"} + ], + "members": [ + {"name":"ApplyEffect","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function ApplyEffect Lib \"gdiplus\" Alias \"GdipBitmapApplyEffect\" (ByVal Me As GpBitmap, ByVal effect As GpEffect, roi As GDIP_RECT, ByVal useAuxData As GDIP_BOOL, auxData As Any, auxDataSize As Long) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"Clone","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function Clone Lib \"gdiplus\" Alias \"GdipCloneImage\" (ByVal Me As GpBitmap, cloneImage As GpBitmap) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"ConvertFormat","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function ConvertFormat Lib \"gdiplus\" Alias \"GdipBitmapConvertFormat\" (ByVal Me As GpBitmap, ByVal format As PixelFormat, ByVal dithertype As DitherType, ByVal palettetype As PaletteType, palette As ColorPalette, ByVal alphaThresholdPercent As Single) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"CreateFromDirectDrawSurfaceInto","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function CreateFromDirectDrawSurfaceInto Lib \"gdiplus\" Alias \"GdipCreateBitmapFromDirectDrawSurface\" (surface As Any, bitmap As GpBitmap) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"CreateFromFileICMInto","kind":"function","vis":"public","declare":true,"signature":"DeclareWide PtrSafe Function CreateFromFileICMInto Lib \"gdiplus\" Alias \"GdipCreateBitmapFromFileICM\" (ByVal FileName$, ByRef bitmap As GpBitmap) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"CreateFromFileInto","kind":"function","vis":"public","declare":true,"signature":"DeclareWide PtrSafe Function CreateFromFileInto Lib \"gdiplus\" Alias \"GdipCreateBitmapFromFile\" (ByVal FileName$, ByRef bitmap As GpBitmap) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"CreateFromGdiDibInto","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function CreateFromGdiDibInto Lib \"gdiplus\" Alias \"GdipCreateBitmapFromGdiDib\" (gdiBitmapInfo As GDIP_BITMAPINFO, ByVal gdiBitmapData As LongPtr, bitmap As GpBitmap) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"CreateFromGraphicsInto","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function CreateFromGraphicsInto Lib \"gdiplus\" Alias \"GdipCreateBitmapFromGraphics\" (ByVal Width&, ByVal Height&, ByVal Graphics As GpGraphics, bitmap As GpBitmap) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"CreateFromHBITMAPInto","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function CreateFromHBITMAPInto Lib \"gdiplus\" Alias \"GdipCreateBitmapFromHBITMAP\" (ByVal hbm As LongPtr, ByVal hpal As LongPtr, bitmap As GpBitmap) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"CreateFromHICONInto","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function CreateFromHICONInto Lib \"gdiplus\" Alias \"GdipCreateBitmapFromHICON\" (ByVal hicon As LongPtr, bitmap As GpBitmap) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"CreateFromResourceInto","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function CreateFromResourceInto Lib \"gdiplus\" Alias \"GdipCreateBitmapFromResource\" (ByVal hInstance As LongPtr, ByVal lpBitmapName As LongPtr, ByRef bitmap As GpBitmap) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"CreateFromScan0Into","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function CreateFromScan0Into Lib \"gdiplus\" Alias \"GdipCreateBitmapFromScan0\" (ByVal Width&, ByVal Height&, ByVal stride&, ByVal format As PixelFormat, scan0 As Any, bitmap As GpBitmap) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"CreateFromStreamICMInto","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function CreateFromStreamICMInto Lib \"gdiplus\" Alias \"GdipCreateBitmapFromStreamICM\" (ByVal stream As GDIP_IStream, ByRef bitmap As GpBitmap) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"CreateFromStreamInto","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function CreateFromStreamInto Lib \"gdiplus\" Alias \"GdipCreateBitmapFromStream\" (ByVal stream As GDIP_IStream, ByRef bitmap As GpBitmap) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"CreateHBITMAP","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function CreateHBITMAP Lib \"gdiplus\" Alias \"GdipCreateHBITMAPFromBitmap\" (ByVal Me As GpBitmap, ByRef hbmReturn As LongPtr, ByVal Background As Color) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"CreateHICON","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function CreateHICON Lib \"gdiplus\" Alias \"GdipCreateHICONFromBitmap\" (ByVal Me As GpBitmap, hbmReturn As LongPtr) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"Delete","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function Delete Lib \"gdiplus\" Alias \"GdipDisposeImage\" (ByVal Me As GpBitmap) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"Dispose","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function Dispose Lib \"gdiplus\" Alias \"GdipDisposeImage\" (ByVal Me As GpBitmap) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"FindFirstItem","kind":"function","vis":"public","signature":"Function FindFirstItem(item() As GpImageItemData) As GpStatus","returnType":"GpStatus"}, + {"name":"FindNextItem","kind":"function","vis":"public","signature":"Function FindNextItem(item() As GpImageItemData) As GpStatus","returnType":"GpStatus"}, + {"name":"GetAllPropertyItems","kind":"function","vis":"public","signature":"Function GetAllPropertyItems(items() As GpPropertyItem) As GpStatus","returnType":"GpStatus"}, + {"name":"GetBounds","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetBounds Lib \"gdiplus\" Alias \"GdipGetImageBounds\" (ByVal Me As GpBitmap, srcRect As GpRectF, srcUnit As GpUnit) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetDimension","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetDimension Lib \"gdiplus\" Alias \"GdipGetImageDimension\" (ByVal Me As GpBitmap, ByRef Width!, ByRef Height!) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetEncoderParameterList","kind":"function","vis":"public","signature":"Function GetEncoderParameterList(ByVal clsidencoder As GDIP_UUID, params() As GpEncoderParameter) As GpStatus","returnType":"GpStatus","description":"Returns an array with parameters. The array starts at index 1 even though LBound(params)=0"}, + {"name":"GetEncoderParameterListSize","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetEncoderParameterListSize Lib \"gdiplus\" Alias \"GdipGetEncoderParameterListSize\" (ByVal Me As GpBitmap, clsidEncoder As GDIP_UUID, size&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetFlags","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetFlags Lib \"gdiplus\" Alias \"GdipGetImageFlags\" (ByVal Me As GpBitmap, flags&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetFrameCount","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetFrameCount Lib \"gdiplus\" Alias \"GdipImageGetFrameCount\" (ByVal Me As GpBitmap, dimensionID As GDIP_UUID, count&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetFrameDimensionsCount","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetFrameDimensionsCount Lib \"gdiplus\" Alias \"GdipImageGetFrameDimensionsCount\" (ByVal Me As GpBitmap, count&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetFrameDimensionsList","kind":"function","vis":"public","signature":"Function GetFrameDimensionsList(dims As GDIP_UUID()) As GpStatus","returnType":"GpStatus"}, + {"name":"GetGraphicsContext","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetGraphicsContext Lib \"gdiplus\" Alias \"GdipGetImageGraphicsContext\" (ByVal Me As GpBitmap, ByVal Graphics As GpGraphics) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetHeight","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetHeight Lib \"gdiplus\" Alias \"GdipGetImageHeight\" (ByVal Me As GpBitmap, Height As Long) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetHistogram","kind":"function","vis":"public","signature":"Function GetHistogram(ByVal format As HistogramFormat, histogram() As UINT) As GpStatus","returnType":"GpStatus","description":"The histogram returned has dimensions (N, 4)."}, + {"name":"GetHistogram2","kind":"function","vis":"private","declare":true,"signature":"Private Declare PtrSafe Function GetHistogram2 Lib \"gdiplus\" Alias \"GdipBitmapGetHistogram\" (ByVal Me As GpBitmap, ByVal format As HistogramFormat, ByVal NumberOfEntries As Long, channel0 As Long, channel1 As Long, channel2 As Long, channel3 As Long) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetHistogramSize","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetHistogramSize Lib \"gdiplus\" Alias \"GdipBitmapGetHistogramSize\" (ByVal format As HistogramFormat, NumberOfEntries As Long) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetHorizontalResolution","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetHorizontalResolution Lib \"gdiplus\" Alias \"GdipGetImageHorizontalResolution\" (ByVal Me As GpBitmap, resolution!) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetItemData","kind":"function","vis":"public","signature":"Function GetItemData(item() As GpImageItemData) As GpStatus","returnType":"GpStatus"}, + {"name":"GetPalette","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetPalette Lib \"gdiplus\" Alias \"GdipGetImagePalette\" (ByVal Me As GpBitmap, palette As ColorPalette, ByVal size&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetPaletteSize","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetPaletteSize Lib \"gdiplus\" Alias \"GdipGetImagePaletteSize\" (ByVal Me As GpBitmap, size As Long) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetPixel","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetPixel Lib \"gdiplus\" Alias \"GdipBitmapGetPixel\" (ByVal Me As GpBitmap, ByVal X&, ByVal Y&, Color As Color) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetPixelFormat","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetPixelFormat Lib \"gdiplus\" Alias \"GdipGetImagePixelFormat\" (ByVal Me As GpBitmap, format As PixelFormat) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetPropertyCount","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetPropertyCount Lib \"gdiplus\" Alias \"GdipGetPropertyCount\" (ByVal Me As GpBitmap, numOfProperty&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetPropertyIdList","kind":"function","vis":"public","signature":"Function GetPropertyIdList(propIDs() As PROPID) As GpStatus","returnType":"GpStatus"}, + {"name":"GetPropertyItem","kind":"function","vis":"public","signature":"Function GetPropertyItem(ByVal propID As PROPID, item() As GpPropertyItem) As GpStatus","returnType":"GpStatus"}, + {"name":"GetPropertyItemSize","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetPropertyItemSize Lib \"gdiplus\" Alias \"GdipGetPropertyItemSize\" (ByVal Me As GpBitmap, ByVal propId&, ByRef Size&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetPropertySize","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetPropertySize Lib \"gdiplus\" Alias \"GdipGetPropertySize\" (ByVal Me As GpBitmap, totalBufferSize&, numProperties&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetRawFormat","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetRawFormat Lib \"gdiplus\" Alias \"GdipGetImageRawFormat\" (ByVal Me As GpBitmap, Format As GDIP_UUID) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetSize","kind":"function","vis":"public","signature":"Function GetSize(size As GpSize) As GpStatus","returnType":"GpStatus"}, + {"name":"GetThumbnail","kind":"function","vis":"public","signature":"Function GetThumbnail(ByVal thumbSize As GpSize, thumbImage As GpImage, ByVal callback As LongPtr, callbackData As LongPtr) As GpStatus","returnType":"GpStatus"}, + {"name":"GetThumbnail2","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetThumbnail2 Lib \"gdiplus\" Alias \"GdipGetImageThumbnail\" (ByVal Me As GpBitmap, ByVal thumbWidth&, ByVal thumbHeight&, thumbImage As GpImage, ByVal callback As LongPtr, callbackData As Any) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetType","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetType Lib \"gdiplus\" Alias \"GdipGetImageType\" (ByVal Me As GpBitmap, type As GpImageType) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetVerticalResolution","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetVerticalResolution Lib \"gdiplus\" Alias \"GdipGetImageVerticalResolution\" (ByVal Me As GpBitmap, resolution!) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetWidth","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetWidth Lib \"gdiplus\" Alias \"GdipGetImageWidth\" (ByVal Me As GpBitmap, Width As Long) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"LoadFromFileICMInto","kind":"function","vis":"public","declare":true,"signature":"DeclareWide PtrSafe Function LoadFromFileICMInto Lib \"gdiplus\" Alias \"GdipLoadImageFromFileICM\" (ByVal FileName$, ByRef Image As GpBitmap) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"LoadFromFileInto","kind":"function","vis":"public","declare":true,"signature":"DeclareWide PtrSafe Function LoadFromFileInto Lib \"gdiplus\" Alias \"GdipLoadImageFromFile\" (ByVal FileName$, ByRef Image As GpBitmap) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"LoadFromStreamICMInto","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function LoadFromStreamICMInto Lib \"gdiplus\" Alias \"GdipLoadImageFromStreamICM\" (ByVal stream As GDIP_IStream, ByRef Image As GpBitmap) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"LoadFromStreamInto","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function LoadFromStreamInto Lib \"gdiplus\" Alias \"GdipLoadImageFromStream\" (ByVal stream As GDIP_IStream, ByRef Image As GpBitmap) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"LockBits","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function LockBits Lib \"gdiplus\" Alias \"GdipBitmapLockBits\" (ByVal Me As GpBitmap, Rect As GpRect, ByVal flags As Long, ByVal format As PixelFormat, lockedBitmapData As BitmapData) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"RemovePropertyItem","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function RemovePropertyItem Lib \"gdiplus\" Alias \"GdipRemovePropertyItem\" (ByVal Me As GpBitmap, ByVal propId As PROPID) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"RotateFlip","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function RotateFlip Lib \"gdiplus\" Alias \"GdipImageRotateFlip\" (ByVal Me As GpBitmap, ByVal rfType As RotateFlipType) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SaveAdd","kind":"function","vis":"public","signature":"Function SaveAdd(encoderParams() As GpEncoderParameter) As GpStatus","returnType":"GpStatus","description":"There should be a dummy encoderParams(0) that's not filled in. It's used internally."}, + {"name":"SaveAddImage","kind":"function","vis":"public","signature":"Function SaveAddImage(ByVal newImage As GpBitmap, encoderParams() As GpEncoderParameter) As GpStatus","returnType":"GpStatus","description":"There should be a dummy encoderParams(0) that's not filled in. It's used internally."}, + {"name":"SaveToFile","kind":"function","vis":"public","signature":"Function SaveToFile(ByVal FileName$, ByVal clsidEncoder As GDIP_UUID, encoderParams() As GpEncoderParameter) As GpStatus","returnType":"GpStatus","description":"There should be a dummy encoderParams(0) that's not filled in. It's used internally."}, + {"name":"SaveToStream","kind":"function","vis":"public","signature":"Function SaveToStream(ByVal stream As GDIP_IStream, ByVal clsidEncoder As GDIP_UUID, encoderParams() As GpEncoderParameter) As GpStatus","returnType":"GpStatus","description":"There should be a dummy encoderParams(0) that's not filled in. It's used internally."}, + {"name":"SelectActiveFrame","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SelectActiveFrame Lib \"gdiplus\" Alias \"GdipImageSelectActiveFrame\" (ByVal Me As GpBitmap, ByRef dimensionID As GDIP_UUID, ByVal frameIndex&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetAbort","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetAbort Lib \"gdiplus\" Alias \"GdipImageSetAbort\" (ByVal Me As GpBitmap, pIAbort As Any ) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}],"description":"⛔This API is not implemented in GdiPlus 1.0 nor 1.1.\n⛔NOTE: This API is a placeholder until tB supports no-vtable interfaces"}, + {"name":"SetPalette","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetPalette Lib \"gdiplus\" Alias \"GdipSetImagePalette\" (ByVal Me As GpBitmap, palette As ColorPalette) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetPixel","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetPixel Lib \"gdiplus\" Alias \"GdipBitmapSetPixel\" (ByVal Me As GpBitmap, ByVal X&, ByVal Y&, ByVal Color As Color) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetPropertyItem","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetPropertyItem Lib \"gdiplus\" Alias \"GdipSetPropertyItem\" (ByVal Me As GpBitmap, item As GpPropertyItem) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetResolution","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetResolution Lib \"gdiplus\" Alias \"GdipBitmapSetResolution\" (ByVal Me As GpBitmap, ByVal xdpi As Single, ByVal ydpi As Single) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"UnlockBits","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function UnlockBits Lib \"gdiplus\" Alias \"GdipBitmapUnlockBits\" (ByVal Me As GpBitmap, lockedBitmapData As BitmapData) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]} + ] + }, + { + "name": "GdipBrush", + "kind": "module", + "vis": "public", + "file": "GdiPlus/Brush.twin", + "signature": "Module GdipBrush", + "members": [ + {"name":"BrushFrom","kind":"function","vis":"public","signature":"Function BrushFrom(ByVal native As GpBrush) As IBrush","returnType":"IBrush"}, + {"name":"GpBrush","kind":"function","vis":"public","signature":"Function GpBrush() As GpBrush","returnType":"GpBrush"} + ] + }, + { + "name": "GpBrush", + "kind": "type", + "in": "GdipBrush", + "vis": "public", + "file": "GdiPlus/Brush.twin", + "signature": "Type GpBrush", + "fields": [ + {"name":"Native","vis":"public","signature":"Native As LongPtr"} + ], + "members": [ + {"name":"Clone","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function Clone Lib \"gdiplus\" Alias \"GdipCloneBrush\" (ByVal Me As GpBrush, cloneBrush As GpBrush) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"Delete","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function Delete Lib \"gdiplus\" Alias \"GdipDeleteBrush\" (ByVal Me As GpBrush) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetType","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetType Lib \"gdiplus\" Alias \"GdipGetBrushType\" (ByVal Me As GpBrush, type As GpBrushType) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"Release","kind":"function","vis":"public","signature":"Function Release() As GpBrush","returnType":"GpBrush"} + ] + }, + { + "name": "GdipCachedBitmap", + "kind": "module", + "vis": "public", + "file": "GdiPlus/CachedBitmap.twin", + "signature": "Module GdipCachedBitmap", + "members": [ + {"name":"CachedBitmap","kind":"function","vis":"public","signature":"Function CachedBitmap(bitmap As Bitmap, gr As Graphics) As CachedBitmap","returnType":"CachedBitmap"}, + {"name":"GpCachedBitmap","kind":"function","vis":"public","signature":"Function GpCachedBitmap() As GpCachedBitmap","returnType":"GpCachedBitmap"} + ] + }, + { + "name": "GpCachedBitmap", + "kind": "type", + "in": "GdipCachedBitmap", + "vis": "public", + "file": "GdiPlus/CachedBitmap.twin", + "signature": "Type GpCachedBitmap", + "fields": [ + {"name":"Native","vis":"public","signature":"Native As LongPtr"} + ], + "members": [ + {"name":"Create","kind":"function","vis":"public","signature":"Function Create(ByVal bitmap As GpBitmap, ByVal graphics As GpGraphics) As GpStatus","returnType":"GpStatus"}, + {"name":"CreateInto","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function CreateInto Lib \"gdiplus\" Alias \"GdipCreateCachedBitmap\" (ByVal bitmap As GpBitmap, ByVal Graphics As GpGraphics, cachedBitmap As GpCachedBitmap) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"Delete","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function Delete Lib \"gdiplus\" Alias \"GdipDeleteCachedBitmap\" (ByVal Me As GpCachedBitmap) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]} + ] + }, + { + "name": "GdipColor", + "kind": "module", + "vis": "public", + "file": "GdiPlus/Color.twin", + "signature": "Module GdipColor", + "members": [ + {"name":"Black","kind":"const","vis":"private","signature":"Private Const Black = &H000000"}, + {"name":"CheckColor","kind":"sub","vis":"private","signature":"Private Sub CheckColor()","attrs":[{"name":"DebugOnly"}]}, + {"name":"CheckHSL","kind":"sub","vis":"private","signature":"Private Sub CheckHSL()","attrs":[{"name":"DebugOnly"}]}, + {"name":"Color","kind":"function","vis":"public","signature":"Public Function Color() As Color","returnType":"Color","attrs":[{"name":"ConstantFoldable"}]}, + {"name":"Color","kind":"function","vis":"public","signature":"Public Function Color(ByVal r&, ByVal g&, ByVal b&) As Color","returnType":"Color"}, + {"name":"Color","kind":"function","vis":"public","signature":"Public Function Color(ByVal a&, ByVal r&, ByVal g&, ByVal b&) As Color","returnType":"Color"}, + {"name":"Color","kind":"function","vis":"public","signature":"Public Function Color(ByVal argb As ARGB) As Color","returnType":"Color"}, + {"name":"FromCOLORREF","kind":"function","vis":"public","signature":"Function FromCOLORREF(ByVal rgb As Long) As Color","returnType":"Color"}, + {"name":"HueToValue","kind":"function","vis":"public","signature":"Function HueToValue(ByVal hue!, ByVal M1!, ByVal M2!) As Single","returnType":"Single"}, + {"name":"MakeARGB","kind":"function","vis":"public","signature":"Public Function MakeARGB(ByVal a&, ByVal r&, ByVal g&, ByVal b&) As Long","returnType":"Long"}, + {"name":"NoColor","kind":"function","vis":"public","signature":"Public Function NoColor() As Color","returnType":"Color","attrs":[{"name":"ConstantFoldable"}]} + ] + }, + { + "name": "CColor", + "kind": "enum", + "in": "GdipColor", + "vis": "public", + "file": "GdiPlus/Color.twin", + "signature": "Enum CColor", + "values": [ + {"name":"AliceBlue","value":"&hFFF0F8FF"}, + {"name":"AntiqueWhite","value":"&hFFFAEBD7"}, + {"name":"Aqua","value":"&hFF00FFFF"}, + {"name":"Aquamarine","value":"&hFF7FFFD4"}, + {"name":"Azure","value":"&hFFF0FFFF"}, + {"name":"Beige","value":"&hFFF5F5DC"}, + {"name":"Bisque","value":"&hFFFFE4C4"}, + {"name":"Black","value":"&hFF000000"}, + {"name":"BlanchedAlmond","value":"&hFFFFEBCD"}, + {"name":"Blue","value":"&hFF0000FF"}, + {"name":"BlueViolet","value":"&hFF8A2BE2"}, + {"name":"Brown","value":"&hFFA52A2A"}, + {"name":"BurlyWood","value":"&hFFDEB887"}, + {"name":"CadetBlue","value":"&hFF5F9EA0"}, + {"name":"Chartreuse","value":"&hFF7FFF00"}, + {"name":"Chocolate","value":"&hFFD2691E"}, + {"name":"Coral","value":"&hFFFF7F50"}, + {"name":"CornflowerBlue","value":"&hFF6495ED"}, + {"name":"Cornsilk","value":"&hFFFFF8DC"}, + {"name":"Crimson","value":"&hFFDC143C"}, + {"name":"Cyan","value":"&hFF00FFFF"}, + {"name":"DarkBlue","value":"&hFF00008B"}, + {"name":"DarkCyan","value":"&hFF008B8B"}, + {"name":"DarkGoldenrod","value":"&hFFB8860B"}, + {"name":"DarkGray","value":"&hFFA9A9A9"}, + {"name":"DarkGreen","value":"&hFF006400"}, + {"name":"DarkKhaki","value":"&hFFBDB76B"}, + {"name":"DarkMagenta","value":"&hFF8B008B"}, + {"name":"DarkOliveGreen","value":"&hFF556B2F"}, + {"name":"DarkOrange","value":"&hFFFF8C00"}, + {"name":"DarkOrchid","value":"&hFF9932CC"}, + {"name":"DarkRed","value":"&hFF8B0000"}, + {"name":"DarkSalmon","value":"&hFFE9967A"}, + {"name":"DarkSeaGreen","value":"&hFF8FBC8B"}, + {"name":"DarkSlateBlue","value":"&hFF483D8B"}, + {"name":"DarkSlateGray","value":"&hFF2F4F4F"}, + {"name":"DarkTurquoise","value":"&hFF00CED1"}, + {"name":"DarkViolet","value":"&hFF9400D3"}, + {"name":"DeepPink","value":"&hFFFF1493"}, + {"name":"DeepSkyBlue","value":"&hFF00BFFF"}, + {"name":"DimGray","value":"&hFF696969"}, + {"name":"DodgerBlue","value":"&hFF1E90FF"}, + {"name":"Firebrick","value":"&hFFB22222"}, + {"name":"FloralWhite","value":"&hFFFFFAF0"}, + {"name":"ForestGreen","value":"&hFF228B22"}, + {"name":"Fuchsia","value":"&hFFFF00FF"}, + {"name":"Gainsboro","value":"&hFFDCDCDC"}, + {"name":"GhostWhite","value":"&hFFF8F8FF"}, + {"name":"Gold","value":"&hFFFFD700"}, + {"name":"Goldenrod","value":"&hFFDAA520"}, + {"name":"Gray","value":"&hFF808080"}, + {"name":"Green","value":"&hFF008000"}, + {"name":"GreenYellow","value":"&hFFADFF2F"}, + {"name":"Honeydew","value":"&hFFF0FFF0"}, + {"name":"HotPink","value":"&hFFFF69B4"}, + {"name":"IndianRed","value":"&hFFCD5C5C"}, + {"name":"Indigo","value":"&hFF4B0082"}, + {"name":"Ivory","value":"&hFFFFFFF0"}, + {"name":"Khaki","value":"&hFFF0E68C"}, + {"name":"Lavender","value":"&hFFE6E6FA"}, + {"name":"LavenderBlush","value":"&hFFFFF0F5"}, + {"name":"LawnGreen","value":"&hFF7CFC00"}, + {"name":"LemonChiffon","value":"&hFFFFFACD"}, + {"name":"LightBlue","value":"&hFFADD8E6"}, + {"name":"LightCoral","value":"&hFFF08080"}, + {"name":"LightCyan","value":"&hFFE0FFFF"}, + {"name":"LightGoldenrodYellow","value":"&hFFFAFAD2"}, + {"name":"LightGray","value":"&hFFD3D3D3"}, + {"name":"LightGreen","value":"&hFF90EE90"}, + {"name":"LightPink","value":"&hFFFFB6C1"}, + {"name":"LightSalmon","value":"&hFFFFA07A"}, + {"name":"LightSeaGreen","value":"&hFF20B2AA"}, + {"name":"LightSkyBlue","value":"&hFF87CEFA"}, + {"name":"LightSlateGray","value":"&hFF778899"}, + {"name":"LightSteelBlue","value":"&hFFB0C4DE"}, + {"name":"LightYellow","value":"&hFFFFFFE0"}, + {"name":"Lime","value":"&hFF00FF00"}, + {"name":"LimeGreen","value":"&hFF32CD32"}, + {"name":"Linen","value":"&hFFFAF0E6"}, + {"name":"Magenta","value":"&hFFFF00FF"}, + {"name":"Maroon","value":"&hFF800000"}, + {"name":"MediumAquamarine","value":"&hFF66CDAA"}, + {"name":"MediumBlue","value":"&hFF0000CD"}, + {"name":"MediumOrchid","value":"&hFFBA55D3"}, + {"name":"MediumPurple","value":"&hFF9370DB"}, + {"name":"MediumSeaGreen","value":"&hFF3CB371"}, + {"name":"MediumSlateBlue","value":"&hFF7B68EE"}, + {"name":"MediumSpringGreen","value":"&hFF00FA9A"}, + {"name":"MediumTurquoise","value":"&hFF48D1CC"}, + {"name":"MediumVioletRed","value":"&hFFC71585"}, + {"name":"MidnightBlue","value":"&hFF191970"}, + {"name":"MintCream","value":"&hFFF5FFFA"}, + {"name":"MistyRose","value":"&hFFFFE4E1"}, + {"name":"Moccasin","value":"&hFFFFE4B5"}, + {"name":"NavajoWhite","value":"&hFFFFDEAD"}, + {"name":"Navy","value":"&hFF000080"}, + {"name":"OldLace","value":"&hFFFDF5E6"}, + {"name":"Olive","value":"&hFF808000"}, + {"name":"OliveDrab","value":"&hFF6B8E23"}, + {"name":"Orange","value":"&hFFFFA500"}, + {"name":"OrangeRed","value":"&hFFFF4500"}, + {"name":"Orchid","value":"&hFFDA70D6"}, + {"name":"PaleGoldenrod","value":"&hFFEEE8AA"}, + {"name":"PaleGreen","value":"&hFF98FB98"}, + {"name":"PaleTurquoise","value":"&hFFAFEEEE"}, + {"name":"PaleVioletRed","value":"&hFFDB7093"}, + {"name":"PapayaWhip","value":"&hFFFFEFD5"}, + {"name":"PeachPuff","value":"&hFFFFDAB9"}, + {"name":"Peru","value":"&hFFCD853F"}, + {"name":"Pink","value":"&hFFFFC0CB"}, + {"name":"Plum","value":"&hFFDDA0DD"}, + {"name":"PowderBlue","value":"&hFFB0E0E6"}, + {"name":"Purple","value":"&hFF800080"}, + {"name":"Red","value":"&hFFFF0000"}, + {"name":"RosyBrown","value":"&hFFBC8F8F"}, + {"name":"RoyalBlue","value":"&hFF4169E1"}, + {"name":"SaddleBrown","value":"&hFF8B4513"}, + {"name":"Salmon","value":"&hFFFA8072"}, + {"name":"SandyBrown","value":"&hFFF4A460"}, + {"name":"SeaGreen","value":"&hFF2E8B57"}, + {"name":"SeaShell","value":"&hFFFFF5EE"}, + {"name":"Sienna","value":"&hFFA0522D"}, + {"name":"Silver","value":"&hFFC0C0C0"}, + {"name":"SkyBlue","value":"&hFF87CEEB"}, + {"name":"SlateBlue","value":"&hFF6A5ACD"}, + {"name":"SlateGray","value":"&hFF708090"}, + {"name":"Snow","value":"&hFFFFFAFA"}, + {"name":"SpringGreen","value":"&hFF00FF7F"}, + {"name":"SteelBlue","value":"&hFF4682B4"}, + {"name":"Tan","value":"&hFFD2B48C"}, + {"name":"Teal","value":"&hFF008080"}, + {"name":"Thistle","value":"&hFFD8BFD8"}, + {"name":"Tomato","value":"&hFFFF6347"}, + {"name":"Transparent","value":"&h00FFFFFF"}, + {"name":"Turquoise","value":"&hFF40E0D0"}, + {"name":"Violet","value":"&hFFEE82EE"}, + {"name":"Wheat","value":"&hFFF5DEB3"}, + {"name":"White","value":"&hFFFFFFFF"}, + {"name":"WhiteSmoke","value":"&hFFF5F5F5"}, + {"name":"Yellow","value":"&hFFFFFF00"}, + {"name":"YellowGreen","value":"&hFF9ACD32"} + ] + }, + { + "name": "Color", + "kind": "type", + "in": "GdipColor", + "vis": "public", + "file": "GdiPlus/Color.twin", + "signature": "Type Color", + "description": "A color representation with r,g,b,a values having 256 discrete values each.", + "fields": [ + {"name":"argb","vis":"public","signature":"argb As ARGB"} + ], + "members": [ + {"name":"A","kind":"property","vis":"public","signature":"Property Get A() As Integer","returnType":"Integer","accessor":"Get"}, + {"name":"A","kind":"property","vis":"public","signature":"Property Let A(ByVal a As Byte)","accessor":"Let"}, + {"name":"Alpha","kind":"property","vis":"public","signature":"Property Get Alpha() As Integer","returnType":"Integer","accessor":"Get"}, + {"name":"Alpha","kind":"property","vis":"public","signature":"Property Let Alpha(ByVal a As Byte)","accessor":"Let"}, + {"name":"AsCOLORREF","kind":"function","vis":"public","signature":"Function AsCOLORREF() As Long","returnType":"Long"}, + {"name":"AsHexRGB","kind":"function","vis":"public","signature":"Function AsHexRGB() As String","returnType":"String","description":"Gets the color as \"#rrggbb\", where r, g, and b are hexadecimal."}, + {"name":"AsHexRGBA","kind":"function","vis":"public","signature":"Function AsHexRGBA() As String","returnType":"String","description":"Gets the color as \"#rrggbbaa\", where r, g, b, and a are hexadecimal."}, + {"name":"B","kind":"property","vis":"public","signature":"Property Get B() As Integer","returnType":"Integer","accessor":"Get"}, + {"name":"B","kind":"property","vis":"public","signature":"Property Let B(ByVal b As Byte)","accessor":"Let"}, + {"name":"BGR","kind":"property","vis":"public","signature":"Property Get BGR() As Long","returnType":"Long","accessor":"Get"}, + {"name":"BGR","kind":"property","vis":"public","signature":"Property Let BGR(ByVal bgr&)","accessor":"Let"}, + {"name":"Blue","kind":"property","vis":"public","signature":"Property Get Blue() As Integer","returnType":"Integer","accessor":"Get"}, + {"name":"Blue","kind":"property","vis":"public","signature":"Property Let Blue(ByVal b As Byte)","accessor":"Let"}, + {"name":"G","kind":"property","vis":"public","signature":"Property Get G() As Integer","returnType":"Integer","accessor":"Get"}, + {"name":"G","kind":"property","vis":"public","signature":"Property Let G(ByVal g As Byte)","accessor":"Let"}, + {"name":"GetHSL","kind":"sub","vis":"public","signature":"Sub GetHSL(hOut!, sOut!, lOut!)","description":"Gets hue in [0.0°, 360.0°), and saturation and lightness in [0.0, 100.0]."}, + {"name":"GetHSLA","kind":"sub","vis":"public","signature":"Sub GetHSLA(hOut!, sOut!, lOut!, aOut!)","description":"Gets hue in degrees i.e. [0.0°, 360.0°), and saturation, lightness and alpha in [0.0, 100.0]."}, + {"name":"GetRGBB","kind":"sub","vis":"public","signature":"Sub GetRGBB(r As Byte, g As Byte, b As Byte)","description":"Extracts the RGB components. The output range is [0, 255]"}, + {"name":"GetRGBD","kind":"sub","vis":"public","signature":"Sub GetRGBD(r#, g#, b#)","description":"Extracts the RGB components. The output range is [0, 100]"}, + {"name":"GetRGBI","kind":"sub","vis":"public","signature":"Sub GetRGBI(r%, g%, b%)","description":"Extracts the RGB components. The output range is [0, 255]"}, + {"name":"GetRGBL","kind":"sub","vis":"public","signature":"Sub GetRGBL(r&, g&, b&)","description":"Extracts the RGB components. The output range is [0, 255]"}, + {"name":"GetRGBS","kind":"sub","vis":"public","signature":"Sub GetRGBS(r!, g!, b!)","description":"Extracts the RGB components. The output range is [0, 100]"}, + {"name":"Green","kind":"property","vis":"public","signature":"Property Get Green() As Integer","returnType":"Integer","accessor":"Get"}, + {"name":"Green","kind":"property","vis":"public","signature":"Property Let Green(ByVal g As Byte)","accessor":"Let"}, + {"name":"Inverse","kind":"property","vis":"public","signature":"Property Get Inverse() As Color","returnType":"Color","accessor":"Get","description":"Gets the inverse of the color, i.e. with hue rotated 180°"}, + {"name":"Inverse","kind":"property","vis":"public","signature":"Property Let Inverse(ByVal invColor As Color)","accessor":"Let","description":"Sets the color to an inverse of the given color."}, + {"name":"Invert","kind":"sub","vis":"public","signature":"Sub Invert()","description":"Inverts the color, i.e. rotates the hue by 180°"}, + {"name":"IsNull","kind":"property","vis":"public","signature":"Property Get IsNull() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"IsTransparent","kind":"property","vis":"public","signature":"Property Get IsTransparent() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"R","kind":"property","vis":"public","signature":"Property Get R() As Integer","returnType":"Integer","accessor":"Get"}, + {"name":"R","kind":"property","vis":"public","signature":"Property Let R(ByVal r As Byte)","accessor":"Let"}, + {"name":"RGB","kind":"property","vis":"public","signature":"Property Get RGB() As Long","returnType":"Long","accessor":"Get"}, + {"name":"Red","kind":"property","vis":"public","signature":"Property Get Red() As Integer","returnType":"Integer","accessor":"Get"}, + {"name":"Red","kind":"property","vis":"public","signature":"Property Let Red(ByVal r As Byte)","accessor":"Let"}, + {"name":"RotateHue","kind":"sub","vis":"public","signature":"Sub RotateHue(ByVal by!)","description":"Rotates/shifts the color's hue by a given number of degrees."}, + {"name":"RotatedHue","kind":"function","vis":"public","signature":"Function RotatedHue(ByVal by!) As Color","returnType":"Color","description":"Returns the color with its hue rotated/shifted a given number of degrees."}, + {"name":"SetFromCOLORREF","kind":"sub","vis":"public","signature":"Sub SetFromCOLORREF(ByVal rgb As Long)"}, + {"name":"SetHSL","kind":"sub","vis":"public","signature":"Sub SetHSL(ByVal H!, ByVal S!, ByVal L!)","description":"Sets hue from [0.0°, 360.0°), and saturation and lightness from [0.0, 100.0]."}, + {"name":"SetHSLA","kind":"sub","vis":"public","signature":"Sub SetHSLA(ByVal h!, ByVal s!, ByVal l!, ByVal a!)","description":"Sets hue from [0°, 360°), and saturation, lightness and alpha from [0, 100]."}, + {"name":"SetRGB","kind":"sub","vis":"public","signature":"Sub SetRGB(ByVal r&, ByVal g&, ByVal b&)","description":"Sets the RGB components. The input range is [0, 255]"}, + {"name":"SetRGBD","kind":"sub","vis":"public","signature":"Sub SetRGBD(ByVal r#, ByVal g#, ByVal b#)","description":"Sets the RGB components. The input range is [0.0, 100.0]"}, + {"name":"Value","kind":"property","vis":"public","signature":"Property Get Value() As ARGB","returnType":"ARGB","accessor":"Get"}, + {"name":"Value","kind":"property","vis":"public","signature":"Property Let Value(ByVal argb As ARGB)","accessor":"Let"} + ] + }, + { + "name": "ColorChannelFlags", + "kind": "enum", + "in": "GdipColor", + "vis": "public", + "file": "GdiPlus/Color.twin", + "signature": "Enum ColorChannelFlags", + "values": [ + {"name":"ColorChannelFlagsC","value":"0"}, + {"name":"ColorChannelFlagsM"}, + {"name":"ColorChannelFlagsY"}, + {"name":"ColorChannelFlagsK"}, + {"name":"ColorChannelFlagsLast"} + ] + }, + { + "name": "ColorMask", + "kind": "enum", + "in": "GdipColor", + "vis": "public", + "file": "GdiPlus/Color.twin", + "signature": "Public Enum ColorMask", + "values": [ + {"name":"AlphaMask","value":"&Hff& << AlphaShift"}, + {"name":"RedMask","value":"&Hff& << RedShift"}, + {"name":"GreenMask","value":"&Hff& << GreenShift"}, + {"name":"BlueMask","value":"&Hff& << BlueShift"} + ] + }, + { + "name": "ColorMode", + "kind": "enum", + "in": "GdipColor", + "vis": "public", + "file": "GdiPlus/Color.twin", + "signature": "Enum ColorMode", + "values": [ + {"name":"ColorModeARGB32","value":"0"}, + {"name":"ColorModeARGB64","value":"1"} + ] + }, + { + "name": "ColorShift", + "kind": "enum", + "in": "GdipColor", + "vis": "public", + "file": "GdiPlus/Color.twin", + "signature": "Public Enum ColorShift", + "values": [ + {"name":"AlphaShift","value":"24"}, + {"name":"RedShift","value":"16"}, + {"name":"GreenShift","value":"8"}, + {"name":"BlueShift","value":"0"} + ] + }, + { + "name": "GdipColorMatrix", + "kind": "module", + "vis": "public", + "file": "GdiPlus/ColorMatrix.twin", + "signature": "Module GdipColorMatrix", + "members": [] + }, + { + "name": "ColorAdjustType", + "kind": "enum", + "in": "GdipColorMatrix", + "vis": "public", + "file": "GdiPlus/ColorMatrix.twin", + "signature": "Enum ColorAdjustType", + "values": [ + {"name":"ColorAdjustTypeDefault"}, + {"name":"ColorAdjustTypeBitmap"}, + {"name":"ColorAdjustTypeBrush"}, + {"name":"ColorAdjustTypePen"}, + {"name":"ColorAdjustTypeText"}, + {"name":"ColorAdjustTypeCount"}, + {"name":"ColorAdjustTypeAny"} + ] + }, + { + "name": "ColorChannelLUT", + "kind": "type", + "in": "GdipColorMatrix", + "vis": "public", + "file": "GdiPlus/ColorMatrix.twin", + "signature": "Public Type ColorChannelLUT", + "fields": [ + {"name":"b","vis":"public","signature":"b(0 To 255) As Byte"} + ], + "members": [] + }, + { + "name": "ColorMatrix", + "kind": "type", + "in": "GdipColorMatrix", + "vis": "public", + "file": "GdiPlus/ColorMatrix.twin", + "signature": "Public Type ColorMatrix", + "description": " NOTE: Array dimensions are switched vs C++ to match the underlying memory layout.", + "fields": [ + {"name":"m","vis":"public","signature":"m(0 To 4, 0 To 4) As Single"} + ], + "members": [] + }, + { + "name": "ColorMatrixFlags", + "kind": "enum", + "in": "GdipColorMatrix", + "vis": "public", + "file": "GdiPlus/ColorMatrix.twin", + "signature": "Public Enum ColorMatrixFlags", + "values": [ + {"name":"ColorMatrixFlagsDefault","value":"0"}, + {"name":"ColorMatrixFlagsSkipGrays","value":"1"}, + {"name":"ColorMatrixFlagsAltGray","value":"2"} + ] + }, + { + "name": "HistogramFormat", + "kind": "enum", + "in": "GdipColorMatrix", + "vis": "public", + "file": "GdiPlus/ColorMatrix.twin", + "signature": "Enum HistogramFormat", + "values": [ + {"name":"HistogramFormatARGB"}, + {"name":"HistogramFormatPARGB"}, + {"name":"HistogramFormatRGB"}, + {"name":"HistogramFormatGray"}, + {"name":"HistogramFormatB"}, + {"name":"HistogramFormatG"}, + {"name":"HistogramFormatR"}, + {"name":"HistogramFormatA"} + ] + }, + { + "name": "GdipEffects", + "kind": "module", + "vis": "public", + "file": "GdiPlus/Effects.twin", + "signature": "Module GdipEffects", + "members": [ + {"name":"Blur","kind":"function","vis":"public","signature":"Function Blur() As Blur","returnType":"Blur"}, + {"name":"Blur","kind":"function","vis":"public","signature":"Function Blur(params As BlurParams) As Blur","returnType":"Blur"}, + {"name":"Blur","kind":"function","vis":"public","signature":"Function Blur(ByVal radius!, ByVal expandEdge As Boolean) As Blur","returnType":"Blur"}, + {"name":"BlurEffectGuid","kind":"function","vis":"public","signature":"Public Function BlurEffectGuid() As GDIP_UUID","returnType":"GDIP_UUID"}, + {"name":"BlurParams","kind":"function","vis":"public","signature":"Function BlurParams(ByVal radius!, ByVal expandEdge As Boolean) As BlurParams","returnType":"BlurParams"}, + {"name":"BrightnessContrast","kind":"function","vis":"public","signature":"Function BrightnessContrast() As BrightnessContrast","returnType":"BrightnessContrast"}, + {"name":"BrightnessContrast","kind":"function","vis":"public","signature":"Function BrightnessContrast(params As BrightnessContrastParams) As BrightnessContrast","returnType":"BrightnessContrast"}, + {"name":"BrightnessContrast","kind":"function","vis":"public","signature":"Function BrightnessContrast(ByVal brightness&, ByVal contrast&) As BrightnessContrast","returnType":"BrightnessContrast"}, + {"name":"BrightnessContrastEffectGuid","kind":"function","vis":"public","signature":"Public Function BrightnessContrastEffectGuid() As GDIP_UUID","returnType":"GDIP_UUID"}, + {"name":"BrightnessContrastParams","kind":"function","vis":"public","signature":"Function BrightnessContrastParams(ByVal brightness&, ByVal contrast&) As BrightnessContrastParams","returnType":"BrightnessContrastParams"}, + {"name":"ColorBalance","kind":"function","vis":"public","signature":"Function ColorBalance() As ColorBalance","returnType":"ColorBalance"}, + {"name":"ColorBalance","kind":"function","vis":"public","signature":"Function ColorBalance(params As ColorBalanceParams) As ColorBalance","returnType":"ColorBalance"}, + {"name":"ColorBalance","kind":"function","vis":"public","signature":"Function ColorBalance(ByVal cyanRed&, ByVal magentaGreen&, ByVal yellowBlue&) As ColorBalance","returnType":"ColorBalance"}, + {"name":"ColorBalanceEffectGuid","kind":"function","vis":"public","signature":"Public Function ColorBalanceEffectGuid() As GDIP_UUID","returnType":"GDIP_UUID"}, + {"name":"ColorBalanceParams","kind":"function","vis":"public","signature":"Function ColorBalanceParams(ByVal cyanRed&, ByVal magentaGreen&, ByVal yellowBlue&) As ColorBalanceParams","returnType":"ColorBalanceParams"}, + {"name":"ColorCurve","kind":"function","vis":"public","signature":"Function ColorCurve() As ColorCurve","returnType":"ColorCurve"}, + {"name":"ColorCurve","kind":"function","vis":"public","signature":"Function ColorCurve(params As ColorCurveParams) As ColorCurve","returnType":"ColorCurve"}, + {"name":"ColorCurve","kind":"function","vis":"public","signature":"Function ColorCurve(ByVal adjustment As CurveAdjustments, ByVal channel As CurveChannel, ByVal value&) As ColorCurve","returnType":"ColorCurve"}, + {"name":"ColorCurveEffectGuid","kind":"function","vis":"public","signature":"Public Function ColorCurveEffectGuid() As GDIP_UUID","returnType":"GDIP_UUID"}, + {"name":"ColorCurveParams","kind":"function","vis":"public","signature":"Function ColorCurveParams(ByVal adjustment As CurveAdjustments, ByVal channel As CurveChannel, ByVal value&) As ColorCurveParams","returnType":"ColorCurveParams"}, + {"name":"ColorLUT","kind":"function","vis":"public","signature":"Function ColorLUT() As ColorLUT","returnType":"ColorLUT"}, + {"name":"ColorLUT","kind":"function","vis":"public","signature":"Function ColorLUT(params As ColorLUTParams) As ColorLUT","returnType":"ColorLUT"}, + {"name":"ColorLUT","kind":"function","vis":"public","signature":"Function ColorLUT(lutB() As Byte, lutG() As Byte, lutR() As Byte, lutA() As Byte) As ColorLUT","returnType":"ColorLUT"}, + {"name":"ColorLUTEffectGuid","kind":"function","vis":"public","signature":"Public Function ColorLUTEffectGuid() As GDIP_UUID","returnType":"GDIP_UUID"}, + {"name":"ColorLutParams","kind":"function","vis":"public","signature":"Function ColorLutParams(lutB() As Byte, lutG() As Byte, lutR() As Byte, lutA() As Byte) As ColorLUTParams","returnType":"ColorLUTParams"}, + {"name":"ColorMatrixEffect","kind":"function","vis":"public","signature":"Function ColorMatrixEffect() As ColorMatrixEffect","returnType":"ColorMatrixEffect"}, + {"name":"ColorMatrixEffect","kind":"function","vis":"public","signature":"Function ColorMatrixEffect(params As ColorMatrix) As ColorMatrixEffect","returnType":"ColorMatrixEffect"}, + {"name":"ColorMatrixEffectGuid","kind":"function","vis":"public","signature":"Public Function ColorMatrixEffectGuid() As GDIP_UUID","returnType":"GDIP_UUID"}, + {"name":"GetParameters","kind":"function","vis":"public","signature":"Function GetParameters(Of T)(ByVal Me As GpEffect, params As T) As GpStatus","returnType":"GpStatus"}, + {"name":"GpEffect","kind":"function","vis":"public","signature":"Function GpEffect() As GpEffect","returnType":"GpEffect"}, + {"name":"HueSaturationLightness","kind":"function","vis":"public","signature":"Function HueSaturationLightness() As HueSaturationLightness","returnType":"HueSaturationLightness"}, + {"name":"HueSaturationLightness","kind":"function","vis":"public","signature":"Function HueSaturationLightness(params As HueSaturationLightnessParams) As HueSaturationLightness","returnType":"HueSaturationLightness"}, + {"name":"HueSaturationLightness","kind":"function","vis":"public","signature":"Function HueSaturationLightness(ByVal hue&, ByVal saturation&, ByVal lightness&) As HueSaturationLightness","returnType":"HueSaturationLightness"}, + {"name":"HueSaturationLightnessEffectGuid","kind":"function","vis":"public","signature":"Public Function HueSaturationLightnessEffectGuid() As GDIP_UUID","returnType":"GDIP_UUID"}, + {"name":"HueSaturationLightnessParams","kind":"function","vis":"public","signature":"Function HueSaturationLightnessParams(ByVal hue&, ByVal saturation&, ByVal lightness&) As HueSaturationLightnessParams","returnType":"HueSaturationLightnessParams"}, + {"name":"Levels","kind":"function","vis":"public","signature":"Function Levels() As Levels","returnType":"Levels"}, + {"name":"Levels","kind":"function","vis":"public","signature":"Function Levels(params As LevelsParams) As Levels","returnType":"Levels"}, + {"name":"Levels","kind":"function","vis":"public","signature":"Function Levels(ByVal highlight&, ByVal midtone&, ByVal shadow&) As Levels","returnType":"Levels"}, + {"name":"LevelsEffectGuid","kind":"function","vis":"public","signature":"Public Function LevelsEffectGuid() As GDIP_UUID","returnType":"GDIP_UUID"}, + {"name":"LevelsParams","kind":"function","vis":"public","signature":"Function LevelsParams(ByVal highlight&, ByVal midtone&, ByVal shadow&) As LevelsParams","returnType":"LevelsParams"}, + {"name":"RedEyeCorrection","kind":"function","vis":"public","signature":"Function RedEyeCorrection() As RedEyeCorrection","returnType":"RedEyeCorrection"}, + {"name":"RedEyeCorrection","kind":"function","vis":"public","signature":"Function RedEyeCorrection(params As RedEyeCorrectionParams) As RedEyeCorrection","returnType":"RedEyeCorrection"}, + {"name":"RedEyeCorrectionEffectGuid","kind":"function","vis":"public","signature":"Public Function RedEyeCorrectionEffectGuid() As GDIP_UUID","returnType":"GDIP_UUID"}, + {"name":"RedEyeCorrectionParams","kind":"function","vis":"public","signature":"Function RedEyeCorrectionParams(areas() As GpRect) As RedEyeCorrectionParams","returnType":"RedEyeCorrectionParams"}, + {"name":"SetParameters","kind":"function","vis":"public","signature":"Function SetParameters(Of T)(ByVal Me As GpEffect, params As T) As GpStatus","returnType":"GpStatus"}, + {"name":"Sharpen","kind":"function","vis":"public","signature":"Function Sharpen() As Sharpen","returnType":"Sharpen"}, + {"name":"Sharpen","kind":"function","vis":"public","signature":"Function Sharpen(params As SharpenParams) As Sharpen","returnType":"Sharpen"}, + {"name":"Sharpen","kind":"function","vis":"public","signature":"Function Sharpen(ByVal radius!, ByVal amount!) As Sharpen","returnType":"Sharpen"}, + {"name":"SharpenEffectGuid","kind":"function","vis":"public","signature":"Public Function SharpenEffectGuid() As GDIP_UUID","returnType":"GDIP_UUID"}, + {"name":"SharpenParams","kind":"function","vis":"public","signature":"Function SharpenParams(ByVal radius!, ByVal amount!) As SharpenParams","returnType":"SharpenParams"}, + {"name":"Tint","kind":"function","vis":"public","signature":"Function Tint() As Tint","returnType":"Tint"}, + {"name":"Tint","kind":"function","vis":"public","signature":"Function Tint(params As TintParams) As Tint","returnType":"Tint"}, + {"name":"Tint","kind":"function","vis":"public","signature":"Function Tint(ByVal hue&, ByVal amount&) As Tint","returnType":"Tint"}, + {"name":"TintEffectGuid","kind":"function","vis":"public","signature":"Public Function TintEffectGuid() As GDIP_UUID","returnType":"GDIP_UUID"}, + {"name":"TintParams","kind":"function","vis":"public","signature":"Function TintParams(ByVal hue&, ByVal amount&) As TintParams","returnType":"TintParams"} + ] + }, + { + "name": "BlurParams", + "kind": "type", + "in": "GdipEffects", + "vis": "public", + "file": "GdiPlus/Effects.twin", + "signature": "Type BlurParams", + "fields": [ + {"name":"radius","vis":"public","signature":"radius!"}, + {"name":"expandEdge","vis":"public","signature":"expandEdge As GDIP_BOOL"} + ], + "members": [] + }, + { + "name": "BrightnessContrastParams", + "kind": "type", + "in": "GdipEffects", + "vis": "public", + "file": "GdiPlus/Effects.twin", + "signature": "Type BrightnessContrastParams", + "fields": [ + {"name":"brightness","vis":"public","signature":"brightness&"}, + {"name":"contrast","vis":"public","signature":"contrast&"} + ], + "members": [] + }, + { + "name": "ColorBalanceParams", + "kind": "type", + "in": "GdipEffects", + "vis": "public", + "file": "GdiPlus/Effects.twin", + "signature": "Type ColorBalanceParams", + "fields": [ + {"name":"cyanRed","vis":"public","signature":"cyanRed&"}, + {"name":"magentaGreen","vis":"public","signature":"magentaGreen&"}, + {"name":"yellowBlue","vis":"public","signature":"yellowBlue&"} + ], + "members": [] + }, + { + "name": "ColorCurveParams", + "kind": "type", + "in": "GdipEffects", + "vis": "public", + "file": "GdiPlus/Effects.twin", + "signature": "Type ColorCurveParams", + "fields": [ + {"name":"adjustment","vis":"public","signature":"adjustment As CurveAdjustments"}, + {"name":"channel","vis":"public","signature":"channel As CurveChannel"}, + {"name":"value","vis":"public","signature":"value&"} + ], + "members": [ + {"name":"adjustValue","kind":"property","vis":"public","signature":"Property Get adjustValue() As Long","returnType":"Long","accessor":"Get"}, + {"name":"adjustValue","kind":"property","vis":"public","signature":"Property Let adjustValue(ByVal newValue&)","accessor":"Let"} + ] + }, + { + "name": "ColorLUTParams", + "kind": "type", + "in": "GdipEffects", + "vis": "public", + "file": "GdiPlus/Effects.twin", + "signature": "Type ColorLUTParams", + "fields": [ + {"name":"lutB","vis":"public","signature":"lutB As ColorChannelLUT"}, + {"name":"lutG","vis":"public","signature":"lutG As ColorChannelLUT"}, + {"name":"lutR","vis":"public","signature":"lutR As ColorChannelLUT"}, + {"name":"lutA","vis":"public","signature":"lutA As ColorChannelLUT"} + ], + "members": [] + }, + { + "name": "CurveAdjustments", + "kind": "enum", + "in": "GdipEffects", + "vis": "public", + "file": "GdiPlus/Effects.twin", + "signature": "Enum CurveAdjustments", + "values": [ + {"name":"AdjustExposure"}, + {"name":"AdjustDensity"}, + {"name":"AdjustContrast"}, + {"name":"AdjustHighlight"}, + {"name":"AdjustShadow"}, + {"name":"AdjustMidtone"}, + {"name":"AdjustWhiteSaturation"}, + {"name":"AdjustBlackSaturation"} + ] + }, + { + "name": "CurveChannel", + "kind": "enum", + "in": "GdipEffects", + "vis": "public", + "file": "GdiPlus/Effects.twin", + "signature": "Enum CurveChannel", + "values": [ + {"name":"CurveChannelAll"}, + {"name":"CurveChannelRed"}, + {"name":"CurveChannelGreen"}, + {"name":"CurveChannelBlue"} + ] + }, + { + "name": "GpEffect", + "kind": "type", + "in": "GdipEffects", + "vis": "public", + "file": "GdiPlus/Effects.twin", + "signature": "Type GpEffect", + "fields": [ + {"name":"Native","vis":"public","signature":"Native As LongPtr"} + ], + "members": [ + {"name":"Create","kind":"function","vis":"public","signature":"Function Create(ByVal guid As GDIP_UUID) As GpStatus","returnType":"GpStatus"}, + {"name":"CreateInto","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function CreateInto Lib \"gdiplus\" Alias \"GdipCreateEffect\" (ByVal guid As GDIP_UUID, effect As GpEffect) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"Delete","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function Delete Lib \"gdiplus\" Alias \"GdipDeleteEffect\" (ByVal Me As GpEffect) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetParameterSize","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function GetParameterSize Lib \"gdiplus\" Alias \"GdipGetEffectParameterSize\" (ByVal Me As GpEffect, size As Long) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetParameters","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function GetParameters Lib \"gdiplus\" Alias \"GdipGetEffectParameters\" (ByVal Me As GpEffect, size As Long, params As Any) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetParameters","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function SetParameters Lib \"gdiplus\" Alias \"GdipSetEffectParameters\" (ByVal Me As GpEffect, params As Any, ByVal size As Long) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]} + ] + }, + { + "name": "HueSaturationLightnessParams", + "kind": "type", + "in": "GdipEffects", + "vis": "public", + "file": "GdiPlus/Effects.twin", + "signature": "Type HueSaturationLightnessParams", + "fields": [ + {"name":"hue","vis":"public","signature":"hue&"}, + {"name":"saturation","vis":"public","signature":"saturation&"}, + {"name":"lightness","vis":"public","signature":"lightness&"} + ], + "members": [ + {"name":"hueLevel","kind":"property","vis":"public","signature":"Property Get hueLevel() As Long","returnType":"Long","accessor":"Get"}, + {"name":"hueLevel","kind":"property","vis":"public","signature":"Property Set hueLevel(ByVal level&)","accessor":"Set"}, + {"name":"lightnessLevel","kind":"property","vis":"public","signature":"Property Get lightnessLevel() As Long","returnType":"Long","accessor":"Get"}, + {"name":"lightnessLevel","kind":"property","vis":"public","signature":"Property Set lightnessLevel(ByVal level&)","accessor":"Set"}, + {"name":"saturationLevel","kind":"property","vis":"public","signature":"Property Get saturationLevel() As Long","returnType":"Long","accessor":"Get"}, + {"name":"saturationLevel","kind":"property","vis":"public","signature":"Property Set saturationLevel(ByVal level&)","accessor":"Set"} + ] + }, + { + "name": "LevelsParams", + "kind": "type", + "in": "GdipEffects", + "vis": "public", + "file": "GdiPlus/Effects.twin", + "signature": "Type LevelsParams", + "fields": [ + {"name":"highight","vis":"public","signature":"highight&"}, + {"name":"midtone","vis":"public","signature":"midtone&"}, + {"name":"shadow","vis":"public","signature":"shadow&"} + ], + "members": [] + }, + { + "name": "RedEyeCorrectionParams", + "kind": "type", + "in": "GdipEffects", + "vis": "public", + "file": "GdiPlus/Effects.twin", + "signature": "Type RedEyeCorrectionParams", + "fields": [ + {"name":"numberOfAreas","vis":"public","signature":"numberOfAreas As UINT"}, + {"name":"areas","vis":"public","signature":"areas As LongPtr"} + ], + "members": [ + {"name":"Allocate","kind":"function","vis":"public","signature":"Function Allocate(ByVal newCount&) As GpStatus","returnType":"GpStatus"}, + {"name":"Area","kind":"property","vis":"public","signature":"Property Get Area(ByVal index&) As GpRect","returnType":"GpRect","accessor":"Get"}, + {"name":"Area","kind":"property","vis":"public","signature":"Property Set Area(ByVal index&, value As GpRect)","accessor":"Set"}, + {"name":"Free","kind":"sub","vis":"public","signature":"Sub Free()"}, + {"name":"GetAreas","kind":"function","vis":"public","signature":"Function GetAreas() As GDIP_RECT()","returnType":"GDIP_RECT()","description":"Returns a view into the areas array.\nThe view is valid only as long as the RedEyeCorrectionParams exists."}, + {"name":"GetGpAreas","kind":"function","vis":"public","signature":"Function GetGpAreas() As GpRect()","returnType":"GpRect()"} + ] + }, + { + "name": "SharpenParams", + "kind": "type", + "in": "GdipEffects", + "vis": "public", + "file": "GdiPlus/Effects.twin", + "signature": "Type SharpenParams", + "fields": [ + {"name":"radius","vis":"public","signature":"radius!"}, + {"name":"amount","vis":"public","signature":"amount!"} + ], + "members": [] + }, + { + "name": "TintParams", + "kind": "type", + "in": "GdipEffects", + "vis": "public", + "file": "GdiPlus/Effects.twin", + "signature": "Type TintParams", + "fields": [ + {"name":"hue","vis":"public","signature":"hue&"}, + {"name":"amount","vis":"public","signature":"amount&"} + ], + "members": [] + }, + { + "name": "GdipEnums", + "kind": "module", + "vis": "public", + "file": "GdiPlus/Enums.twin", + "signature": "Module GdipEnums", + "members": [ + {"name":"FlatnessDefault","kind":"const","vis":"public","signature":"Public Const FlatnessDefault = 1.0! / 4.0!"}, + {"name":"GDIP_EMFPLUS_RECORD_BASE","kind":"const","vis":"public","signature":"Public Const GDIP_EMFPLUS_RECORD_BASE = &h00004000"}, + {"name":"GDIP_EMFPLUS_RECORD_TO_WMF","kind":"function","vis":"public","signature":"Function GDIP_EMFPLUS_RECORD_TO_WMF(ByVal n&) As Long","returnType":"Long"}, + {"name":"GDIP_IS_WMF_RECORDTYPE","kind":"function","vis":"public","signature":"Function GDIP_IS_WMF_RECORDTYPE(ByVal n&) As Boolean","returnType":"Boolean"}, + {"name":"GDIP_WMF_RECORD_BASE","kind":"const","vis":"public","signature":"Public Const GDIP_WMF_RECORD_BASE = &h00010000"}, + {"name":"GDIP_WMF_RECORD_TO_EMFPLUS","kind":"function","vis":"public","signature":"Function GDIP_WMF_RECORD_TO_EMFPLUS(ByVal n&) As GpEmfPlusRecordType","returnType":"GpEmfPlusRecordType"}, + {"name":"ObjectTypeIsValid","kind":"function","vis":"public","signature":"Function ObjectTypeIsValid(type As GpObjectType) As Boolean","returnType":"Boolean"} + ] + }, + { + "name": "GpBrushType", + "kind": "enum", + "in": "GdipEnums", + "vis": "public", + "file": "GdiPlus/Enums.twin", + "signature": "Enum GpBrushType", + "values": [ + {"name":"BrushTypeSolidColor","value":"0"}, + {"name":"BrushTypeHatchFill","value":"1"}, + {"name":"BrushTypeTextureFill","value":"2"}, + {"name":"BrushTypePathGradient","value":"3"}, + {"name":"BrushTypeLinearGradient","value":"4"} + ] + }, + { + "name": "GpCombineMode", + "kind": "enum", + "in": "GdipEnums", + "vis": "public", + "file": "GdiPlus/Enums.twin", + "signature": "Enum GpCombineMode", + "values": [ + {"name":"CombineModeReplace"}, + {"name":"CombineModeIntersect"}, + {"name":"CombineModeUnion"}, + {"name":"CombineModeXor"}, + {"name":"CombineModeExclude"}, + {"name":"CombineModeComplement"} + ] + }, + { + "name": "GpCompositingMode", + "kind": "enum", + "in": "GdipEnums", + "vis": "public", + "file": "GdiPlus/Enums.twin", + "signature": "Enum GpCompositingMode", + "values": [ + {"name":"CompositingModeSourceOver"}, + {"name":"CompositingModeSourceCopy"} + ] + }, + { + "name": "GpCompositingQuality", + "kind": "enum", + "in": "GdipEnums", + "vis": "public", + "file": "GdiPlus/Enums.twin", + "signature": "Enum GpCompositingQuality", + "values": [ + {"name":"CompositingQualityInvalid","value":"QualityModeInvalid"}, + {"name":"CompositingQualityDefault","value":"QualityModeDefault"}, + {"name":"CompositingQualityHighSpeed","value":"QualityModeLow"}, + {"name":"CompositingQualityHighQuality","value":"QualityModeHigh"}, + {"name":"CompositingQualityGammaCorrected"}, + {"name":"CompositingQualityAssumeLinear"} + ] + }, + { + "name": "GpConvertToEmfPlusFlags", + "kind": "enum", + "in": "GdipEnums", + "vis": "public", + "file": "GdiPlus/Enums.twin", + "signature": "Enum GpConvertToEmfPlusFlags", + "values": [ + {"name":"ConvertToEmfPlusFlagsDefault","value":"&h00000000"}, + {"name":"ConvertToEmfPlusFlagsRopUsed","value":"&h00000001"}, + {"name":"ConvertToEmfPlusFlagsText","value":"&h00000002"}, + {"name":"ConvertToEmfPlusFlagsInvalidRecord","value":"&h00000004"} + ] + }, + { + "name": "GpCoordinateSpace", + "kind": "enum", + "in": "GdipEnums", + "vis": "public", + "file": "GdiPlus/Enums.twin", + "signature": "Enum GpCoordinateSpace", + "values": [ + {"name":"CoordinateSpaceWorld"}, + {"name":"CoordinateSpacePage"}, + {"name":"CoordinateSpaceDevice"} + ] + }, + { + "name": "GpCustomLineCapType", + "kind": "enum", + "in": "GdipEnums", + "vis": "public", + "file": "GdiPlus/Enums.twin", + "signature": "Enum GpCustomLineCapType", + "values": [ + {"name":"CustomLineCapTypeDefault","value":"0"}, + {"name":"CustomLineCapTypeAdjustableArrow","value":"1"} + ] + }, + { + "name": "GpDashCap", + "kind": "enum", + "in": "GdipEnums", + "vis": "public", + "file": "GdiPlus/Enums.twin", + "signature": "Enum GpDashCap", + "values": [ + {"name":"DashCapFlat","value":"0"}, + {"name":"DashCapRound","value":"2"}, + {"name":"DashCapTriangle","value":"3"} + ] + }, + { + "name": "GpDashStyle", + "kind": "enum", + "in": "GdipEnums", + "vis": "public", + "file": "GdiPlus/Enums.twin", + "signature": "Enum GpDashStyle", + "values": [ + {"name":"DashStyleSolid"}, + {"name":"DashStyleDash"}, + {"name":"DashStyleDot"}, + {"name":"DashStyleDashDot"}, + {"name":"DashStyleDashDotDot"}, + {"name":"DashStyleCustom"} + ] + }, + { + "name": "GpDriverStringOptions", + "kind": "enum", + "in": "GdipEnums", + "vis": "public", + "file": "GdiPlus/Enums.twin", + "signature": "Enum GpDriverStringOptions", + "values": [ + {"name":"DriverStringOptionsCmapLookup","value":"1"}, + {"name":"DriverStringOptionsVertical","value":"2"}, + {"name":"DriverStringOptionsRealizedAdvance","value":"4"}, + {"name":"DriverStringOptionsLimitSubpixel","value":"8"} + ] + }, + { + "name": "GpEMR", + "kind": "enum", + "in": "GdipEnums", + "vis": "public", + "file": "GdiPlus/Enums.twin", + "signature": "Enum GpEMR", + "values": [ + {"name":"EMR_HEADER","value":"1"}, + {"name":"EMR_POLYBEZIER","value":"2"}, + {"name":"EMR_POLYGON","value":"3"}, + {"name":"EMR_POLYLINE","value":"4"}, + {"name":"EMR_POLYBEZIERTO","value":"5"}, + {"name":"EMR_POLYLINETO","value":"6"}, + {"name":"EMR_POLYPOLYLINE","value":"7"}, + {"name":"EMR_POLYPOLYGON","value":"8"}, + {"name":"EMR_SETWINDOWEXTEX","value":"9"}, + {"name":"EMR_SETWINDOWORGEX","value":"10"}, + {"name":"EMR_SETVIEWPORTEXTEX","value":"11"}, + {"name":"EMR_SETVIEWPORTORGEX","value":"12"}, + {"name":"EMR_SETBRUSHORGEX","value":"13"}, + {"name":"EMR_EOF","value":"14"}, + {"name":"EMR_SETPIXELV","value":"15"}, + {"name":"EMR_SETMAPPERFLAGS","value":"16"}, + {"name":"EMR_SETMAPMODE","value":"17"}, + {"name":"EMR_SETBKMODE","value":"18"}, + {"name":"EMR_SETPOLYFILLMODE","value":"19"}, + {"name":"EMR_SETROP2","value":"20"}, + {"name":"EMR_SETSTRETCHBLTMODE","value":"21"}, + {"name":"EMR_SETTEXTALIGN","value":"22"}, + {"name":"EMR_SETCOLORADJUSTMENT","value":"23"}, + {"name":"EMR_SETTEXTCOLOR","value":"24"}, + {"name":"EMR_SETBKCOLOR","value":"25"}, + {"name":"EMR_OFFSETCLIPRGN","value":"26"}, + {"name":"EMR_MOVETOEX","value":"27"}, + {"name":"EMR_SETMETARGN","value":"28"}, + {"name":"EMR_EXCLUDECLIPRECT","value":"29"}, + {"name":"EMR_INTERSECTCLIPRECT","value":"30"}, + {"name":"EMR_SCALEVIEWPORTEXTEX","value":"31"}, + {"name":"EMR_SCALEWINDOWEXTEX","value":"32"}, + {"name":"EMR_SAVEDC","value":"33"}, + {"name":"EMR_RESTOREDC","value":"34"}, + {"name":"EMR_SETWORLDTRANSFORM","value":"35"}, + {"name":"EMR_MODIFYWORLDTRANSFORM","value":"36"}, + {"name":"EMR_SELECTOBJECT","value":"37"}, + {"name":"EMR_CREATEPEN","value":"38"}, + {"name":"EMR_CREATEBRUSHINDIRECT","value":"39"}, + {"name":"EMR_DELETEOBJECT","value":"40"}, + {"name":"EMR_ANGLEARC","value":"41"}, + {"name":"EMR_ELLIPSE","value":"42"}, + {"name":"EMR_RECTANGLE","value":"43"}, + {"name":"EMR_ROUNDRECT","value":"44"}, + {"name":"EMR_ARC","value":"45"}, + {"name":"EMR_CHORD","value":"46"}, + {"name":"EMR_PIE","value":"47"}, + {"name":"EMR_SELECTPALETTE","value":"48"}, + {"name":"EMR_CREATEPALETTE","value":"49"}, + {"name":"EMR_SETPALETTEENTRIES","value":"50"}, + {"name":"EMR_RESIZEPALETTE","value":"51"}, + {"name":"EMR_REALIZEPALETTE","value":"52"}, + {"name":"EMR_EXTFLOODFILL","value":"53"}, + {"name":"EMR_LINETO","value":"54"}, + {"name":"EMR_ARCTO","value":"55"}, + {"name":"EMR_POLYDRAW","value":"56"}, + {"name":"EMR_SETARCDIRECTION","value":"57"}, + {"name":"EMR_SETMITERLIMIT","value":"58"}, + {"name":"EMR_BEGINPATH","value":"59"}, + {"name":"EMR_ENDPATH","value":"60"}, + {"name":"EMR_CLOSEFIGURE","value":"61"}, + {"name":"EMR_FILLPATH","value":"62"}, + {"name":"EMR_STROKEANDFILLPATH","value":"63"}, + {"name":"EMR_STROKEPATH","value":"64"}, + {"name":"EMR_FLATTENPATH","value":"65"}, + {"name":"EMR_WIDENPATH","value":"66"}, + {"name":"EMR_SELECTCLIPPATH","value":"67"}, + {"name":"EMR_ABORTPATH","value":"68"}, + {"name":"EMR_GDICOMMENT","value":"70"}, + {"name":"EMR_FILLRGN","value":"71"}, + {"name":"EMR_FRAMERGN","value":"72"}, + {"name":"EMR_INVERTRGN","value":"73"}, + {"name":"EMR_PAINTRGN","value":"74"}, + {"name":"EMR_EXTSELECTCLIPRGN","value":"75"}, + {"name":"EMR_BITBLT","value":"76"}, + {"name":"EMR_STRETCHBLT","value":"77"}, + {"name":"EMR_MASKBLT","value":"78"}, + {"name":"EMR_PLGBLT","value":"79"}, + {"name":"EMR_SETDIBITSTODEVICE","value":"80"}, + {"name":"EMR_STRETCHDIBITS","value":"81"}, + {"name":"EMR_EXTCREATEFONTINDIRECTW","value":"82"}, + {"name":"EMR_EXTTEXTOUTA","value":"83"}, + {"name":"EMR_EXTTEXTOUTW","value":"84"}, + {"name":"EMR_POLYBEZIER16","value":"85"}, + {"name":"EMR_POLYGON16","value":"86"}, + {"name":"EMR_POLYLINE16","value":"87"}, + {"name":"EMR_POLYBEZIERTO16","value":"88"}, + {"name":"EMR_POLYLINETO16","value":"89"}, + {"name":"EMR_POLYPOLYLINE16","value":"90"}, + {"name":"EMR_POLYPOLYGON16","value":"91"}, + {"name":"EMR_POLYDRAW16","value":"92"}, + {"name":"EMR_CREATEMONOBRUSH","value":"93"}, + {"name":"EMR_CREATEDIBPATTERNBRUSHPT","value":"94"}, + {"name":"EMR_EXTCREATEPEN","value":"95"}, + {"name":"EMR_POLYTEXTOUTA","value":"96"}, + {"name":"EMR_POLYTEXTOUTW","value":"97"}, + {"name":"EMR_SETICMMODE","value":"98"}, + {"name":"EMR_CREATECOLORSPACE","value":"99"}, + {"name":"EMR_SETCOLORSPACE","value":"100"}, + {"name":"EMR_DELETECOLORSPACE","value":"101"}, + {"name":"EMR_GLSRECORD","value":"102"}, + {"name":"EMR_GLSBOUNDEDRECORD","value":"103"}, + {"name":"EMR_PIXELFORMAT","value":"104"}, + {"name":"EMR_RESERVED_105","value":"105"}, + {"name":"EMR_RESERVED_106","value":"106"}, + {"name":"EMR_RESERVED_107","value":"107"}, + {"name":"EMR_RESERVED_108","value":"108"}, + {"name":"EMR_RESERVED_109","value":"109"}, + {"name":"EMR_RESERVED_110","value":"110"}, + {"name":"EMR_COLORCORRECTPALETTE","value":"111"}, + {"name":"EMR_SETICMPROFILEA","value":"112"}, + {"name":"EMR_SETICMPROFILEW","value":"113"}, + {"name":"EMR_ALPHABLEND","value":"114"}, + {"name":"EMR_SETLAYOUT","value":"115"}, + {"name":"EMR_TRANSPARENTBLT","value":"116"}, + {"name":"EMR_RESERVED_117","value":"117"}, + {"name":"EMR_GRADIENTFILL","value":"118"}, + {"name":"EMR_RESERVED_119","value":"119"}, + {"name":"EMR_RESERVED_120","value":"120"}, + {"name":"EMR_COLORMATCHTOTARGETW","value":"121"}, + {"name":"EMR_CREATECOLORSPACEW","value":"122"}, + {"name":"EMR_MIN","value":"1"}, + {"name":"EMR_MAX","value":"122"} + ] + }, + { + "name": "GpEmfPlusRecordType", + "kind": "enum", + "in": "GdipEnums", + "vis": "public", + "file": "GdiPlus/Enums.twin", + "signature": "Enum GpEmfPlusRecordType", + "values": [ + {"name":"WmfRecordTypeSetBkColor","value":"META_SETBKCOLOR Or GDIP_WMF_RECORD_BASE"}, + {"name":"WmfRecordTypeSetBkMode","value":"META_SETBKMODE Or GDIP_WMF_RECORD_BASE"}, + {"name":"WmfRecordTypeSetMapMode","value":"META_SETMAPMODE Or GDIP_WMF_RECORD_BASE"}, + {"name":"WmfRecordTypeSetROP2","value":"META_SETROP2 Or GDIP_WMF_RECORD_BASE"}, + {"name":"WmfRecordTypeSetRelAbs","value":"META_SETRELABS Or GDIP_WMF_RECORD_BASE"}, + {"name":"WmfRecordTypeSetPolyFillMode","value":"META_SETPOLYFILLMODE Or GDIP_WMF_RECORD_BASE"}, + {"name":"WmfRecordTypeSetStretchBltMode","value":"META_SETSTRETCHBLTMODE Or GDIP_WMF_RECORD_BASE"}, + {"name":"WmfRecordTypeSetTextCharExtra","value":"META_SETTEXTCHAREXTRA Or GDIP_WMF_RECORD_BASE"}, + {"name":"WmfRecordTypeSetTextColor","value":"META_SETTEXTCOLOR Or GDIP_WMF_RECORD_BASE"}, + {"name":"WmfRecordTypeSetTextJustification","value":"META_SETTEXTJUSTIFICATION Or GDIP_WMF_RECORD_BASE"}, + {"name":"WmfRecordTypeSetWindowOrg","value":"META_SETWINDOWORG Or GDIP_WMF_RECORD_BASE"}, + {"name":"WmfRecordTypeSetWindowExt","value":"META_SETWINDOWEXT Or GDIP_WMF_RECORD_BASE"}, + {"name":"WmfRecordTypeSetViewportOrg","value":"META_SETVIEWPORTORG Or GDIP_WMF_RECORD_BASE"}, + {"name":"WmfRecordTypeSetViewportExt","value":"META_SETVIEWPORTEXT Or GDIP_WMF_RECORD_BASE"}, + {"name":"WmfRecordTypeOffsetWindowOrg","value":"META_OFFSETWINDOWORG Or GDIP_WMF_RECORD_BASE"}, + {"name":"WmfRecordTypeScaleWindowExt","value":"META_SCALEWINDOWEXT Or GDIP_WMF_RECORD_BASE"}, + {"name":"WmfRecordTypeOffsetViewportOrg","value":"META_OFFSETVIEWPORTORG Or GDIP_WMF_RECORD_BASE"}, + {"name":"WmfRecordTypeScaleViewportExt","value":"META_SCALEVIEWPORTEXT Or GDIP_WMF_RECORD_BASE"}, + {"name":"WmfRecordTypeLineTo","value":"META_LINETO Or GDIP_WMF_RECORD_BASE"}, + {"name":"WmfRecordTypeMoveTo","value":"META_MOVETO Or GDIP_WMF_RECORD_BASE"}, + {"name":"WmfRecordTypeExcludeClipRect","value":"META_EXCLUDECLIPRECT Or GDIP_WMF_RECORD_BASE"}, + {"name":"WmfRecordTypeIntersectClipRect","value":"META_INTERSECTCLIPRECT Or GDIP_WMF_RECORD_BASE"}, + {"name":"WmfRecordTypeArc","value":"META_ARC Or GDIP_WMF_RECORD_BASE"}, + {"name":"WmfRecordTypeEllipse","value":"META_ELLIPSE Or GDIP_WMF_RECORD_BASE"}, + {"name":"WmfRecordTypeFloodFill","value":"META_FLOODFILL Or GDIP_WMF_RECORD_BASE"}, + {"name":"WmfRecordTypePie","value":"META_PIE Or GDIP_WMF_RECORD_BASE"}, + {"name":"WmfRecordTypeRectangle","value":"META_RECTANGLE Or GDIP_WMF_RECORD_BASE"}, + {"name":"WmfRecordTypeRoundRect","value":"META_ROUNDRECT Or GDIP_WMF_RECORD_BASE"}, + {"name":"WmfRecordTypePatBlt","value":"META_PATBLT Or GDIP_WMF_RECORD_BASE"}, + {"name":"WmfRecordTypeSaveDC","value":"META_SAVEDC Or GDIP_WMF_RECORD_BASE"}, + {"name":"WmfRecordTypeSetPixel","value":"META_SETPIXEL Or GDIP_WMF_RECORD_BASE"}, + {"name":"WmfRecordTypeOffsetClipRgn","value":"META_OFFSETCLIPRGN Or GDIP_WMF_RECORD_BASE"}, + {"name":"WmfRecordTypeTextOut","value":"META_TEXTOUT Or GDIP_WMF_RECORD_BASE"}, + {"name":"WmfRecordTypeBitBlt","value":"META_BITBLT Or GDIP_WMF_RECORD_BASE"}, + {"name":"WmfRecordTypeStretchBlt","value":"META_STRETCHBLT Or GDIP_WMF_RECORD_BASE"}, + {"name":"WmfRecordTypePolygon","value":"META_POLYGON Or GDIP_WMF_RECORD_BASE"}, + {"name":"WmfRecordTypePolyline","value":"META_POLYLINE Or GDIP_WMF_RECORD_BASE"}, + {"name":"WmfRecordTypeEscape","value":"META_ESCAPE Or GDIP_WMF_RECORD_BASE"}, + {"name":"WmfRecordTypeRestoreDC","value":"META_RESTOREDC Or GDIP_WMF_RECORD_BASE"}, + {"name":"WmfRecordTypeFillRegion","value":"META_FILLREGION Or GDIP_WMF_RECORD_BASE"}, + {"name":"WmfRecordTypeFrameRegion","value":"META_FRAMEREGION Or GDIP_WMF_RECORD_BASE"}, + {"name":"WmfRecordTypeInvertRegion","value":"META_INVERTREGION Or GDIP_WMF_RECORD_BASE"}, + {"name":"WmfRecordTypePaintRegion","value":"META_PAINTREGION Or GDIP_WMF_RECORD_BASE"}, + {"name":"WmfRecordTypeSelectClipRegion","value":"META_SELECTCLIPREGION Or GDIP_WMF_RECORD_BASE"}, + {"name":"WmfRecordTypeSelectObject","value":"META_SELECTOBJECT Or GDIP_WMF_RECORD_BASE"}, + {"name":"WmfRecordTypeSetTextAlign","value":"META_SETTEXTALIGN Or GDIP_WMF_RECORD_BASE"}, + {"name":"WmfRecordTypeDrawText","value":"&h062F Or GDIP_WMF_RECORD_BASE"}, + {"name":"WmfRecordTypeChord","value":"META_CHORD Or GDIP_WMF_RECORD_BASE"}, + {"name":"WmfRecordTypeSetMapperFlags","value":"META_SETMAPPERFLAGS Or GDIP_WMF_RECORD_BASE"}, + {"name":"WmfRecordTypeExtTextOut","value":"META_EXTTEXTOUT Or GDIP_WMF_RECORD_BASE"}, + {"name":"WmfRecordTypeSetDIBToDev","value":"META_SETDIBTODEV Or GDIP_WMF_RECORD_BASE"}, + {"name":"WmfRecordTypeSelectPalette","value":"META_SELECTPALETTE Or GDIP_WMF_RECORD_BASE"}, + {"name":"WmfRecordTypeRealizePalette","value":"META_REALIZEPALETTE Or GDIP_WMF_RECORD_BASE"}, + {"name":"WmfRecordTypeAnimatePalette","value":"META_ANIMATEPALETTE Or GDIP_WMF_RECORD_BASE"}, + {"name":"WmfRecordTypeSetPalEntries","value":"META_SETPALENTRIES Or GDIP_WMF_RECORD_BASE"}, + {"name":"WmfRecordTypePolyPolygon","value":"META_POLYPOLYGON Or GDIP_WMF_RECORD_BASE"}, + {"name":"WmfRecordTypeResizePalette","value":"META_RESIZEPALETTE Or GDIP_WMF_RECORD_BASE"}, + {"name":"WmfRecordTypeDIBBitBlt","value":"META_DIBBITBLT Or GDIP_WMF_RECORD_BASE"}, + {"name":"WmfRecordTypeDIBStretchBlt","value":"META_DIBSTRETCHBLT Or GDIP_WMF_RECORD_BASE"}, + {"name":"WmfRecordTypeDIBCreatePatternBrush","value":"META_DIBCREATEPATTERNBRUSH Or GDIP_WMF_RECORD_BASE"}, + {"name":"WmfRecordTypeStretchDIB","value":"META_STRETCHDIB Or GDIP_WMF_RECORD_BASE"}, + {"name":"WmfRecordTypeExtFloodFill","value":"META_EXTFLOODFILL Or GDIP_WMF_RECORD_BASE"}, + {"name":"WmfRecordTypeSetLayout","value":"&h0149 Or GDIP_WMF_RECORD_BASE"}, + {"name":"WmfRecordTypeResetDC","value":"&h014C Or GDIP_WMF_RECORD_BASE"}, + {"name":"WmfRecordTypeStartDoc","value":"&h014D Or GDIP_WMF_RECORD_BASE"}, + {"name":"WmfRecordTypeStartPage","value":"&h004F Or GDIP_WMF_RECORD_BASE"}, + {"name":"WmfRecordTypeEndPage","value":"&h0050 Or GDIP_WMF_RECORD_BASE"}, + {"name":"WmfRecordTypeAbortDoc","value":"&h0052 Or GDIP_WMF_RECORD_BASE"}, + {"name":"WmfRecordTypeEndDoc","value":"&h005E Or GDIP_WMF_RECORD_BASE"}, + {"name":"WmfRecordTypeDeleteObject","value":"META_DELETEOBJECT Or GDIP_WMF_RECORD_BASE"}, + {"name":"WmfRecordTypeCreatePalette","value":"META_CREATEPALETTE Or GDIP_WMF_RECORD_BASE"}, + {"name":"WmfRecordTypeCreateBrush","value":"&h00F8 Or GDIP_WMF_RECORD_BASE"}, + {"name":"WmfRecordTypeCreatePatternBrush","value":"META_CREATEPATTERNBRUSH Or GDIP_WMF_RECORD_BASE"}, + {"name":"WmfRecordTypeCreatePenIndirect","value":"META_CREATEPENINDIRECT Or GDIP_WMF_RECORD_BASE"}, + {"name":"WmfRecordTypeCreateFontIndirect","value":"META_CREATEFONTINDIRECT Or GDIP_WMF_RECORD_BASE"}, + {"name":"WmfRecordTypeCreateBrushIndirect","value":"META_CREATEBRUSHINDIRECT Or GDIP_WMF_RECORD_BASE"}, + {"name":"WmfRecordTypeCreateBitmapIndirect","value":"&h02FD Or GDIP_WMF_RECORD_BASE"}, + {"name":"WmfRecordTypeCreateBitmap","value":"&h06FE Or GDIP_WMF_RECORD_BASE"}, + {"name":"WmfRecordTypeCreateRegion","value":"META_CREATEREGION Or GDIP_WMF_RECORD_BASE"}, + {"name":"EmfRecordTypeHeader","value":"EMR_HEADER"}, + {"name":"EmfRecordTypePolyBezier","value":"EMR_POLYBEZIER"}, + {"name":"EmfRecordTypePolygon","value":"EMR_POLYGON"}, + {"name":"EmfRecordTypePolyline","value":"EMR_POLYLINE"}, + {"name":"EmfRecordTypePolyBezierTo","value":"EMR_POLYBEZIERTO"}, + {"name":"EmfRecordTypePolyLineTo","value":"EMR_POLYLINETO"}, + {"name":"EmfRecordTypePolyPolyline","value":"EMR_POLYPOLYLINE"}, + {"name":"EmfRecordTypePolyPolygon","value":"EMR_POLYPOLYGON"}, + {"name":"EmfRecordTypeSetWindowExtEx","value":"EMR_SETWINDOWEXTEX"}, + {"name":"EmfRecordTypeSetWindowOrgEx","value":"EMR_SETWINDOWORGEX"}, + {"name":"EmfRecordTypeSetViewportExtEx","value":"EMR_SETVIEWPORTEXTEX"}, + {"name":"EmfRecordTypeSetViewportOrgEx","value":"EMR_SETVIEWPORTORGEX"}, + {"name":"EmfRecordTypeSetBrushOrgEx","value":"EMR_SETBRUSHORGEX"}, + {"name":"EmfRecordTypeEOF","value":"EMR_EOF"}, + {"name":"EmfRecordTypeSetPixelV","value":"EMR_SETPIXELV"}, + {"name":"EmfRecordTypeSetMapperFlags","value":"EMR_SETMAPPERFLAGS"}, + {"name":"EmfRecordTypeSetMapMode","value":"EMR_SETMAPMODE"}, + {"name":"EmfRecordTypeSetBkMode","value":"EMR_SETBKMODE"}, + {"name":"EmfRecordTypeSetPolyFillMode","value":"EMR_SETPOLYFILLMODE"}, + {"name":"EmfRecordTypeSetROP2","value":"EMR_SETROP2"}, + {"name":"EmfRecordTypeSetStretchBltMode","value":"EMR_SETSTRETCHBLTMODE"}, + {"name":"EmfRecordTypeSetTextAlign","value":"EMR_SETTEXTALIGN"}, + {"name":"EmfRecordTypeSetColorAdjustment","value":"EMR_SETCOLORADJUSTMENT"}, + {"name":"EmfRecordTypeSetTextColor","value":"EMR_SETTEXTCOLOR"}, + {"name":"EmfRecordTypeSetBkColor","value":"EMR_SETBKCOLOR"}, + {"name":"EmfRecordTypeOffsetClipRgn","value":"EMR_OFFSETCLIPRGN"}, + {"name":"EmfRecordTypeMoveToEx","value":"EMR_MOVETOEX"}, + {"name":"EmfRecordTypeSetMetaRgn","value":"EMR_SETMETARGN"}, + {"name":"EmfRecordTypeExcludeClipRect","value":"EMR_EXCLUDECLIPRECT"}, + {"name":"EmfRecordTypeIntersectClipRect","value":"EMR_INTERSECTCLIPRECT"}, + {"name":"EmfRecordTypeScaleViewportExtEx","value":"EMR_SCALEVIEWPORTEXTEX"}, + {"name":"EmfRecordTypeScaleWindowExtEx","value":"EMR_SCALEWINDOWEXTEX"}, + {"name":"EmfRecordTypeSaveDC","value":"EMR_SAVEDC"}, + {"name":"EmfRecordTypeRestoreDC","value":"EMR_RESTOREDC"}, + {"name":"EmfRecordTypeSetWorldTransform","value":"EMR_SETWORLDTRANSFORM"}, + {"name":"EmfRecordTypeModifyWorldTransform","value":"EMR_MODIFYWORLDTRANSFORM"}, + {"name":"EmfRecordTypeSelectObject","value":"EMR_SELECTOBJECT"}, + {"name":"EmfRecordTypeCreatePen","value":"EMR_CREATEPEN"}, + {"name":"EmfRecordTypeCreateBrushIndirect","value":"EMR_CREATEBRUSHINDIRECT"}, + {"name":"EmfRecordTypeDeleteObject","value":"EMR_DELETEOBJECT"}, + {"name":"EmfRecordTypeAngleArc","value":"EMR_ANGLEARC"}, + {"name":"EmfRecordTypeEllipse","value":"EMR_ELLIPSE"}, + {"name":"EmfRecordTypeRectangle","value":"EMR_RECTANGLE"}, + {"name":"EmfRecordTypeRoundRect","value":"EMR_ROUNDRECT"}, + {"name":"EmfRecordTypeArc","value":"EMR_ARC"}, + {"name":"EmfRecordTypeChord","value":"EMR_CHORD"}, + {"name":"EmfRecordTypePie","value":"EMR_PIE"}, + {"name":"EmfRecordTypeSelectPalette","value":"EMR_SELECTPALETTE"}, + {"name":"EmfRecordTypeCreatePalette","value":"EMR_CREATEPALETTE"}, + {"name":"EmfRecordTypeSetPaletteEntries","value":"EMR_SETPALETTEENTRIES"}, + {"name":"EmfRecordTypeResizePalette","value":"EMR_RESIZEPALETTE"}, + {"name":"EmfRecordTypeRealizePalette","value":"EMR_REALIZEPALETTE"}, + {"name":"EmfRecordTypeExtFloodFill","value":"EMR_EXTFLOODFILL"}, + {"name":"EmfRecordTypeLineTo","value":"EMR_LINETO"}, + {"name":"EmfRecordTypeArcTo","value":"EMR_ARCTO"}, + {"name":"EmfRecordTypePolyDraw","value":"EMR_POLYDRAW"}, + {"name":"EmfRecordTypeSetArcDirection","value":"EMR_SETARCDIRECTION"}, + {"name":"EmfRecordTypeSetMiterLimit","value":"EMR_SETMITERLIMIT"}, + {"name":"EmfRecordTypeBeginPath","value":"EMR_BEGINPATH"}, + {"name":"EmfRecordTypeEndPath","value":"EMR_ENDPATH"}, + {"name":"EmfRecordTypeCloseFigure","value":"EMR_CLOSEFIGURE"}, + {"name":"EmfRecordTypeFillPath","value":"EMR_FILLPATH"}, + {"name":"EmfRecordTypeStrokeAndFillPath","value":"EMR_STROKEANDFILLPATH"}, + {"name":"EmfRecordTypeStrokePath","value":"EMR_STROKEPATH"}, + {"name":"EmfRecordTypeFlattenPath","value":"EMR_FLATTENPATH"}, + {"name":"EmfRecordTypeWidenPath","value":"EMR_WIDENPATH"}, + {"name":"EmfRecordTypeSelectClipPath","value":"EMR_SELECTCLIPPATH"}, + {"name":"EmfRecordTypeAbortPath","value":"EMR_ABORTPATH"}, + {"name":"EmfRecordTypeReserved_069","value":"69"}, + {"name":"EmfRecordTypeGdiComment","value":"EMR_GDICOMMENT"}, + {"name":"EmfRecordTypeFillRgn","value":"EMR_FILLRGN"}, + {"name":"EmfRecordTypeFrameRgn","value":"EMR_FRAMERGN"}, + {"name":"EmfRecordTypeInvertRgn","value":"EMR_INVERTRGN"}, + {"name":"EmfRecordTypePaintRgn","value":"EMR_PAINTRGN"}, + {"name":"EmfRecordTypeExtSelectClipRgn","value":"EMR_EXTSELECTCLIPRGN"}, + {"name":"EmfRecordTypeBitBlt","value":"EMR_BITBLT"}, + {"name":"EmfRecordTypeStretchBlt","value":"EMR_STRETCHBLT"}, + {"name":"EmfRecordTypeMaskBlt","value":"EMR_MASKBLT"}, + {"name":"EmfRecordTypePlgBlt","value":"EMR_PLGBLT"}, + {"name":"EmfRecordTypeSetDIBitsToDevice","value":"EMR_SETDIBITSTODEVICE"}, + {"name":"EmfRecordTypeStretchDIBits","value":"EMR_STRETCHDIBITS"}, + {"name":"EmfRecordTypeExtCreateFontIndirect","value":"EMR_EXTCREATEFONTINDIRECTW"}, + {"name":"EmfRecordTypeExtTextOutA","value":"EMR_EXTTEXTOUTA"}, + {"name":"EmfRecordTypeExtTextOutW","value":"EMR_EXTTEXTOUTW"}, + {"name":"EmfRecordTypePolyBezier16","value":"EMR_POLYBEZIER16"}, + {"name":"EmfRecordTypePolygon16","value":"EMR_POLYGON16"}, + {"name":"EmfRecordTypePolyline16","value":"EMR_POLYLINE16"}, + {"name":"EmfRecordTypePolyBezierTo16","value":"EMR_POLYBEZIERTO16"}, + {"name":"EmfRecordTypePolylineTo16","value":"EMR_POLYLINETO16"}, + {"name":"EmfRecordTypePolyPolyline16","value":"EMR_POLYPOLYLINE16"}, + {"name":"EmfRecordTypePolyPolygon16","value":"EMR_POLYPOLYGON16"}, + {"name":"EmfRecordTypePolyDraw16","value":"EMR_POLYDRAW16"}, + {"name":"EmfRecordTypeCreateMonoBrush","value":"EMR_CREATEMONOBRUSH"}, + {"name":"EmfRecordTypeCreateDIBPatternBrushPt","value":"EMR_CREATEDIBPATTERNBRUSHPT"}, + {"name":"EmfRecordTypeExtCreatePen","value":"EMR_EXTCREATEPEN"}, + {"name":"EmfRecordTypePolyTextOutA","value":"EMR_POLYTEXTOUTA"}, + {"name":"EmfRecordTypePolyTextOutW","value":"EMR_POLYTEXTOUTW"}, + {"name":"EmfRecordTypeSetICMMode","value":"98"}, + {"name":"EmfRecordTypeCreateColorSpace","value":"99"}, + {"name":"EmfRecordTypeSetColorSpace","value":"100"}, + {"name":"EmfRecordTypeDeleteColorSpace","value":"101"}, + {"name":"EmfRecordTypeGLSRecord","value":"102"}, + {"name":"EmfRecordTypeGLSBoundedRecord","value":"103"}, + {"name":"EmfRecordTypePixelFormat","value":"104"}, + {"name":"EmfRecordTypeDrawEscape","value":"105"}, + {"name":"EmfRecordTypeExtEscape","value":"106"}, + {"name":"EmfRecordTypeStartDoc","value":"107"}, + {"name":"EmfRecordTypeSmallTextOut","value":"108"}, + {"name":"EmfRecordTypeForceUFIMapping","value":"109"}, + {"name":"EmfRecordTypeNamedEscape","value":"110"}, + {"name":"EmfRecordTypeColorCorrectPalette","value":"111"}, + {"name":"EmfRecordTypeSetICMProfileA","value":"112"}, + {"name":"EmfRecordTypeSetICMProfileW","value":"113"}, + {"name":"EmfRecordTypeAlphaBlend","value":"114"}, + {"name":"EmfRecordTypeSetLayout","value":"115"}, + {"name":"EmfRecordTypeTransparentBlt","value":"116"}, + {"name":"EmfRecordTypeReserved_117","value":"117"}, + {"name":"EmfRecordTypeGradientFill","value":"118"}, + {"name":"EmfRecordTypeSetLinkedUFIs","value":"119"}, + {"name":"EmfRecordTypeSetTextJustification","value":"120"}, + {"name":"EmfRecordTypeColorMatchToTargetW","value":"121"}, + {"name":"EmfRecordTypeCreateColorSpaceW","value":"122"}, + {"name":"EmfRecordTypeMax","value":"122"}, + {"name":"EmfRecordTypeMin","value":"1"}, + {"name":"EmfPlusRecordTypeInvalid","value":"GDIP_EMFPLUS_RECORD_BASE"}, + {"name":"EmfPlusRecordTypeHeader"}, + {"name":"EmfPlusRecordTypeEndOfFile"}, + {"name":"EmfPlusRecordTypeComment"}, + {"name":"EmfPlusRecordTypeGetDC"}, + {"name":"EmfPlusRecordTypeMultiFormatStart"}, + {"name":"EmfPlusRecordTypeMultiFormatSection"}, + {"name":"EmfPlusRecordTypeMultiFormatEnd"}, + {"name":"EmfPlusRecordTypeObject"}, + {"name":"EmfPlusRecordTypeClear"}, + {"name":"EmfPlusRecordTypeFillRects"}, + {"name":"EmfPlusRecordTypeDrawRects"}, + {"name":"EmfPlusRecordTypeFillPolygon"}, + {"name":"EmfPlusRecordTypeDrawLines"}, + {"name":"EmfPlusRecordTypeFillEllipse"}, + {"name":"EmfPlusRecordTypeDrawEllipse"}, + {"name":"EmfPlusRecordTypeFillPie"}, + {"name":"EmfPlusRecordTypeDrawPie"}, + {"name":"EmfPlusRecordTypeDrawArc"}, + {"name":"EmfPlusRecordTypeFillRegion"}, + {"name":"EmfPlusRecordTypeFillPath"}, + {"name":"EmfPlusRecordTypeDrawPath"}, + {"name":"EmfPlusRecordTypeFillClosedCurve"}, + {"name":"EmfPlusRecordTypeDrawClosedCurve"}, + {"name":"EmfPlusRecordTypeDrawCurve"}, + {"name":"EmfPlusRecordTypeDrawBeziers"}, + {"name":"EmfPlusRecordTypeDrawImage"}, + {"name":"EmfPlusRecordTypeDrawImagePoints"}, + {"name":"EmfPlusRecordTypeDrawString"}, + {"name":"EmfPlusRecordTypeSetRenderingOrigin"}, + {"name":"EmfPlusRecordTypeSetAntiAliasMode"}, + {"name":"EmfPlusRecordTypeSetTextRenderingHint"}, + {"name":"EmfPlusRecordTypeSetTextContrast"}, + {"name":"EmfPlusRecordTypeSetInterpolationMode"}, + {"name":"EmfPlusRecordTypeSetPixelOffsetMode"}, + {"name":"EmfPlusRecordTypeSetCompositingMode"}, + {"name":"EmfPlusRecordTypeSetCompositingQuality"}, + {"name":"EmfPlusRecordTypeSave"}, + {"name":"EmfPlusRecordTypeRestore"}, + {"name":"EmfPlusRecordTypeBeginContainer"}, + {"name":"EmfPlusRecordTypeBeginContainerNoParams"}, + {"name":"EmfPlusRecordTypeEndContainer"}, + {"name":"EmfPlusRecordTypeSetWorldTransform"}, + {"name":"EmfPlusRecordTypeResetWorldTransform"}, + {"name":"EmfPlusRecordTypeMultiplyWorldTransform"}, + {"name":"EmfPlusRecordTypeTranslateWorldTransform"}, + {"name":"EmfPlusRecordTypeScaleWorldTransform"}, + {"name":"EmfPlusRecordTypeRotateWorldTransform"}, + {"name":"EmfPlusRecordTypeSetPageTransform"}, + {"name":"EmfPlusRecordTypeResetClip"}, + {"name":"EmfPlusRecordTypeSetClipRect"}, + {"name":"EmfPlusRecordTypeSetClipPath"}, + {"name":"EmfPlusRecordTypeSetClipRegion"}, + {"name":"EmfPlusRecordTypeOffsetClip"}, + {"name":"EmfPlusRecordTypeDrawDriverString"}, + {"name":"EmfPlusRecordTypeStrokeFillPath"}, + {"name":"EmfPlusRecordTypeSerializableObject"}, + {"name":"EmfPlusRecordTypeSetTSGraphics"}, + {"name":"EmfPlusRecordTypeSetTSClip"}, + {"name":"EmfPlusRecordTotal"}, + {"name":"EmfPlusRecordTypeMax","value":"EmfPlusRecordTotal - 1"}, + {"name":"EmfPlusRecordTypeMin","value":"EmfPlusRecordTypeHeader"} + ] + }, + { + "name": "GpEmfToWmfBitsFlags", + "kind": "enum", + "in": "GdipEnums", + "vis": "public", + "file": "GdiPlus/Enums.twin", + "signature": "Enum GpEmfToWmfBitsFlags", + "values": [ + {"name":"EmfToWmfBitsFlagsDefault","value":"&h00000000"}, + {"name":"EmfToWmfBitsFlagsEmbedEmf","value":"&h00000001"}, + {"name":"EmfToWmfBitsFlagsIncludePlaceable","value":"&h00000002"}, + {"name":"EmfToWmfBitsFlagsNoXORClip","value":"&h00000004"} + ] + }, + { + "name": "GpEmfType", + "kind": "enum", + "in": "GdipEnums", + "vis": "public", + "file": "GdiPlus/Enums.twin", + "signature": "Enum GpEmfType", + "values": [ + {"name":"EmfTypeEmfOnly","value":"MetafileTypeEmf"}, + {"name":"EmfTypeEmfPlusOnly","value":"MetafileTypeEmfPlusOnly"}, + {"name":"EmfTypeEmfPlusDual","value":"MetafileTypeEmfPlusDual"} + ] + }, + { + "name": "GpEncoderParameterValueType", + "kind": "enum", + "in": "GdipEnums", + "vis": "public", + "file": "GdiPlus/Enums.twin", + "signature": "Enum GpEncoderParameterValueType", + "values": [ + {"name":"EncoderParameterValueTypeByte","value":"1"}, + {"name":"EncoderParameterValueTypeASCII","value":"2"}, + {"name":"EncoderParameterValueTypeShort","value":"3"}, + {"name":"EncoderParameterValueTypeLong","value":"4"}, + {"name":"EncoderParameterValueTypeRational","value":"5"}, + {"name":"EncoderParameterValueTypeLongRange","value":"6"}, + {"name":"EncoderParameterValueTypeUndefined","value":"7"}, + {"name":"EncoderParameterValueTypeRationalRange","value":"8"}, + {"name":"EncoderParameterValueTypePointer","value":"9"}, + {"name":"MinEncoderParameterValueType","value":"0"}, + {"name":"MaxEncoderParameterValueType","value":"EncoderParameterValueTypePointer"} + ] + }, + { + "name": "GpEncoderValue", + "kind": "enum", + "in": "GdipEnums", + "vis": "public", + "file": "GdiPlus/Enums.twin", + "signature": "Enum GpEncoderValue", + "values": [ + {"name":"EncoderValueColorTypeCMYK"}, + {"name":"EncoderValueColorTypeYCCK"}, + {"name":"EncoderValueCompressionLZW"}, + {"name":"EncoderValueCompressionCCITT3"}, + {"name":"EncoderValueCompressionCCITT4"}, + {"name":"EncoderValueCompressionRle"}, + {"name":"EncoderValueCompressionNone"}, + {"name":"EncoderValueScanMethodInterlaced"}, + {"name":"EncoderValueScanMethodNonInterlaced"}, + {"name":"EncoderValueVersionGif87"}, + {"name":"EncoderValueVersionGif89"}, + {"name":"EncoderValueRenderProgressive"}, + {"name":"EncoderValueRenderNonProgressive"}, + {"name":"EncoderValueTransformRotate90"}, + {"name":"EncoderValueTransformRotate180"}, + {"name":"EncoderValueTransformRotate270"}, + {"name":"EncoderValueTransformFlipHorizontal"}, + {"name":"EncoderValueTransformFlipVertical"}, + {"name":"EncoderValueMultiFrame"}, + {"name":"EncoderValueLastFrame"}, + {"name":"EncoderValueFlush"}, + {"name":"EncoderValueFrameDimensionTime"}, + {"name":"EncoderValueFrameDimensionResolution"}, + {"name":"EncoderValueFrameDimensionPage"}, + {"name":"EncoderValueColorTypeGray"}, + {"name":"EncoderValueColorTypeRGB"} + ] + }, + { + "name": "GpFillmode", + "kind": "enum", + "in": "GdipEnums", + "vis": "public", + "file": "GdiPlus/Enums.twin", + "signature": "Enum GpFillmode", + "values": [ + {"name":"FillModeAlternate"}, + {"name":"FillModeWinding"} + ] + }, + { + "name": "GpFlushIntention", + "kind": "enum", + "in": "GdipEnums", + "vis": "public", + "file": "GdiPlus/Enums.twin", + "signature": "Enum GpFlushIntention", + "values": [ + {"name":"FlushIntentionFlush","value":"0"}, + {"name":"FlushIntentionSync","value":"1"} + ] + }, + { + "name": "GpFontStyle", + "kind": "enum", + "in": "GdipEnums", + "vis": "public", + "file": "GdiPlus/Enums.twin", + "signature": "Enum GpFontStyle", + "values": [ + {"name":"FontStyleRegular","value":"0"}, + {"name":"FontStyleBold","value":"1"}, + {"name":"FontStyleItalic","value":"2"}, + {"name":"FontStyleBoldItalic","value":"3"}, + {"name":"FontStyleUnderline","value":"4"}, + {"name":"FontStyleStrikeout","value":"8"} + ] + }, + { + "name": "GpGenericFontFamily", + "kind": "enum", + "in": "GdipEnums", + "vis": "public", + "file": "GdiPlus/Enums.twin", + "signature": "Enum GpGenericFontFamily", + "values": [ + {"name":"GenericFontFamilySerif"}, + {"name":"GenericFontFamilySansSerif"}, + {"name":"GenericFontFamilyMonospace"} + ] + }, + { + "name": "GpHatchStyle", + "kind": "enum", + "in": "GdipEnums", + "vis": "public", + "file": "GdiPlus/Enums.twin", + "signature": "Enum GpHatchStyle", + "values": [ + {"name":"HatchStyleHorizontal"}, + {"name":"HatchStyleVertical"}, + {"name":"HatchStyleForwardDiagonal"}, + {"name":"HatchStyleBackwardDiagonal"}, + {"name":"HatchStyleCross"}, + {"name":"HatchStyleDiagonalCross"}, + {"name":"HatchStyle05Percent"}, + {"name":"HatchStyle10Percent"}, + {"name":"HatchStyle20Percent"}, + {"name":"HatchStyle25Percent"}, + {"name":"HatchStyle30Percent"}, + {"name":"HatchStyle40Percent"}, + {"name":"HatchStyle50Percent"}, + {"name":"HatchStyle60Percent"}, + {"name":"HatchStyle70Percent"}, + {"name":"HatchStyle75Percent"}, + {"name":"HatchStyle80Percent"}, + {"name":"HatchStyle90Percent"}, + {"name":"HatchStyleLightDownwardDiagonal"}, + {"name":"HatchStyleLightUpwardDiagonal"}, + {"name":"HatchStyleDarkDownwardDiagonal"}, + {"name":"HatchStyleDarkUpwardDiagonal"}, + {"name":"HatchStyleWideDownwardDiagonal"}, + {"name":"HatchStyleWideUpwardDiagonal"}, + {"name":"HatchStyleLightVertical"}, + {"name":"HatchStyleLightHorizontal"}, + {"name":"HatchStyleNarrowVertical"}, + {"name":"HatchStyleNarrowHorizontal"}, + {"name":"HatchStyleDarkVertical"}, + {"name":"HatchStyleDarkHorizontal"}, + {"name":"HatchStyleDashedDownwardDiagonal"}, + {"name":"HatchStyleDashedUpwardDiagonal"}, + {"name":"HatchStyleDashedHorizontal"}, + {"name":"HatchStyleDashedVertical"}, + {"name":"HatchStyleSmallConfetti"}, + {"name":"HatchStyleLargeConfetti"}, + {"name":"HatchStyleZigZag"}, + {"name":"HatchStyleWave"}, + {"name":"HatchStyleDiagonalBrick"}, + {"name":"HatchStyleHorizontalBrick"}, + {"name":"HatchStyleWeave"}, + {"name":"HatchStylePlaid"}, + {"name":"HatchStyleDivot"}, + {"name":"HatchStyleDottedGrid"}, + {"name":"HatchStyleDottedDiamond"}, + {"name":"HatchStyleShingle"}, + {"name":"HatchStyleTrellis"}, + {"name":"HatchStyleSphere"}, + {"name":"HatchStyleSmallGrid"}, + {"name":"HatchStyleSmallCheckerBoard"}, + {"name":"HatchStyleLargeCheckerBoard"}, + {"name":"HatchStyleOutlinedDiamond"}, + {"name":"HatchStyleSolidDiamond"}, + {"name":"HatchStyleTotal"}, + {"name":"HatchStyleLargeGrid","value":"HatchStyleCross"}, + {"name":"HatchStyleMin","value":"HatchStyleHorizontal"}, + {"name":"HatchStyleMax","value":"HatchStyleTotal - 1"} + ] + }, + { + "name": "GpHotkeyPrefix", + "kind": "enum", + "in": "GdipEnums", + "vis": "public", + "file": "GdiPlus/Enums.twin", + "signature": "Enum GpHotkeyPrefix", + "values": [ + {"name":"HotkeyPrefixNone","value":"0"}, + {"name":"HotkeyPrefixShow","value":"1"}, + {"name":"HotkeyPrefixHide","value":"2"} + ] + }, + { + "name": "GpImageType", + "kind": "enum", + "in": "GdipEnums", + "vis": "public", + "file": "GdiPlus/Enums.twin", + "signature": "Enum GpImageType", + "values": [ + {"name":"ImageTypeUnknown"}, + {"name":"ImageTypeBitmap"}, + {"name":"ImageTypeMetafile"} + ] + }, + { + "name": "GpInterpolationMode", + "kind": "enum", + "in": "GdipEnums", + "vis": "public", + "file": "GdiPlus/Enums.twin", + "signature": "Enum GpInterpolationMode", + "values": [ + {"name":"InterpolationModeInvalid","value":"QualityModeInvalid"}, + {"name":"InterpolationModeDefault","value":"QualityModeDefault"}, + {"name":"InterpolationModeLowQuality","value":"QualityModeLow"}, + {"name":"InterpolationModeHighQuality","value":"QualityModeHigh"}, + {"name":"InterpolationModeBilinear"}, + {"name":"InterpolationModeBicubic"}, + {"name":"InterpolationModeNearestNeighbor"}, + {"name":"InterpolationModeHighQualityBilinear"}, + {"name":"InterpolationModeHighQualityBicubic"} + ] + }, + { + "name": "GpLineCap", + "kind": "enum", + "in": "GdipEnums", + "vis": "public", + "file": "GdiPlus/Enums.twin", + "signature": "Enum GpLineCap", + "values": [ + {"name":"LineCapFlat","value":"0"}, + {"name":"LineCapSquare","value":"1"}, + {"name":"LineCapRound","value":"2"}, + {"name":"LineCapTriangle","value":"3"}, + {"name":"LineCapNoAnchor","value":"&h10"}, + {"name":"LineCapSquareAnchor","value":"&h11"}, + {"name":"LineCapRoundAnchor","value":"&h12"}, + {"name":"LineCapDiamondAnchor","value":"&h13"}, + {"name":"LineCapArrowAnchor","value":"&h14"}, + {"name":"LineCapCustom","value":"&hff"}, + {"name":"LineCapAnchorMask","value":"&hf0"} + ] + }, + { + "name": "GpLineJoin", + "kind": "enum", + "in": "GdipEnums", + "vis": "public", + "file": "GdiPlus/Enums.twin", + "signature": "Enum GpLineJoin", + "values": [ + {"name":"LineJoinMiter","value":"0"}, + {"name":"LineJoinBevel","value":"1"}, + {"name":"LineJoinRound","value":"2"}, + {"name":"LineJoinMiterClipped","value":"3"} + ] + }, + { + "name": "GpLinearGradientMode", + "kind": "enum", + "in": "GdipEnums", + "vis": "public", + "file": "GdiPlus/Enums.twin", + "signature": "Enum GpLinearGradientMode", + "values": [ + {"name":"LinearGradientModeHorizontal"}, + {"name":"LinearGradientModeVertical"}, + {"name":"LinearGradientModeForwardDiagonal"}, + {"name":"LinearGradientModeBackwardDiagonal"} + ] + }, + { + "name": "GpMatrixOrder", + "kind": "enum", + "in": "GdipEnums", + "vis": "public", + "file": "GdiPlus/Enums.twin", + "signature": "Enum GpMatrixOrder", + "values": [ + {"name":"MatrixOrderPrepend","value":"0"}, + {"name":"MatrixOrderAppend","value":"1"} + ] + }, + { + "name": "GpMetafileFrameUnit", + "kind": "enum", + "in": "GdipEnums", + "vis": "public", + "file": "GdiPlus/Enums.twin", + "signature": "Enum GpMetafileFrameUnit", + "values": [ + {"name":"MetafileFrameUnitPixel","value":"UnitPixel"}, + {"name":"MetafileFrameUnitPoint","value":"UnitPoint"}, + {"name":"MetafileFrameUnitInch","value":"UnitInch"}, + {"name":"MetafileFrameUnitDocument","value":"UnitDocument"}, + {"name":"MetafileFrameUnitMillimeter","value":"UnitMillimeter"}, + {"name":"MetafileFrameUnitGdi"} + ] + }, + { + "name": "GpMetafileFunctions", + "kind": "enum", + "in": "GdipEnums", + "vis": "public", + "file": "GdiPlus/Enums.twin", + "signature": "Public Enum GpMetafileFunctions", + "values": [ + {"name":"META_SETBKCOLOR","value":"&H0201"}, + {"name":"META_SETBKMODE","value":"&H0102"}, + {"name":"META_SETMAPMODE","value":"&H0103"}, + {"name":"META_SETROP2","value":"&H0104"}, + {"name":"META_SETRELABS","value":"&H0105"}, + {"name":"META_SETPOLYFILLMODE","value":"&H0106"}, + {"name":"META_SETSTRETCHBLTMODE","value":"&H0107"}, + {"name":"META_SETTEXTCHAREXTRA","value":"&H0108"}, + {"name":"META_SETTEXTCOLOR","value":"&H0209"}, + {"name":"META_SETTEXTJUSTIFICATION","value":"&H020A"}, + {"name":"META_SETWINDOWORG","value":"&H020B"}, + {"name":"META_SETWINDOWEXT","value":"&H020C"}, + {"name":"META_SETVIEWPORTORG","value":"&H020D"}, + {"name":"META_SETVIEWPORTEXT","value":"&H020E"}, + {"name":"META_OFFSETWINDOWORG","value":"&H020F"}, + {"name":"META_SCALEWINDOWEXT","value":"&H0410"}, + {"name":"META_OFFSETVIEWPORTORG","value":"&H0211"}, + {"name":"META_SCALEVIEWPORTEXT","value":"&H0412"}, + {"name":"META_LINETO","value":"&H0213"}, + {"name":"META_MOVETO","value":"&H0214"}, + {"name":"META_EXCLUDECLIPRECT","value":"&H0415"}, + {"name":"META_INTERSECTCLIPRECT","value":"&H0416"}, + {"name":"META_ARC","value":"&H0817"}, + {"name":"META_ELLIPSE","value":"&H0418"}, + {"name":"META_FLOODFILL","value":"&H0419"}, + {"name":"META_PIE","value":"&H081A"}, + {"name":"META_RECTANGLE","value":"&H041B"}, + {"name":"META_ROUNDRECT","value":"&H061C"}, + {"name":"META_PATBLT","value":"&H061D"}, + {"name":"META_SAVEDC","value":"&H001E"}, + {"name":"META_SETPIXEL","value":"&H041F"}, + {"name":"META_OFFSETCLIPRGN","value":"&H0220"}, + {"name":"META_TEXTOUT","value":"&H0521"}, + {"name":"META_BITBLT","value":"&H0922"}, + {"name":"META_STRETCHBLT","value":"&H0B23"}, + {"name":"META_POLYGON","value":"&H0324"}, + {"name":"META_POLYLINE","value":"&H0325"}, + {"name":"META_ESCAPE","value":"&H0626"}, + {"name":"META_RESTOREDC","value":"&H0127"}, + {"name":"META_FILLREGION","value":"&H0228"}, + {"name":"META_FRAMEREGION","value":"&H0429"}, + {"name":"META_INVERTREGION","value":"&H012A"}, + {"name":"META_PAINTREGION","value":"&H012B"}, + {"name":"META_SELECTCLIPREGION","value":"&H012C"}, + {"name":"META_SELECTOBJECT","value":"&H012D"}, + {"name":"META_SETTEXTALIGN","value":"&H012E"}, + {"name":"META_CHORD","value":"&H0830"}, + {"name":"META_SETMAPPERFLAGS","value":"&H0231"}, + {"name":"META_EXTTEXTOUT","value":"&H0a32"}, + {"name":"META_SETDIBTODEV","value":"&H0d33"}, + {"name":"META_SELECTPALETTE","value":"&H0234"}, + {"name":"META_REALIZEPALETTE","value":"&H0035"}, + {"name":"META_ANIMATEPALETTE","value":"&H0436"}, + {"name":"META_SETPALENTRIES","value":"&H0037"}, + {"name":"META_POLYPOLYGON","value":"&H0538"}, + {"name":"META_RESIZEPALETTE","value":"&H0139"}, + {"name":"META_DIBBITBLT","value":"&H0940"}, + {"name":"META_DIBSTRETCHBLT","value":"&H0b41"}, + {"name":"META_DIBCREATEPATTERNBRUSH","value":"&H0142"}, + {"name":"META_STRETCHDIB","value":"&H0f43"}, + {"name":"META_EXTFLOODFILL","value":"&H0548"}, + {"name":"META_SETLAYOUT","value":"&H0149"}, + {"name":"META_DELETEOBJECT","value":"&H01f0"}, + {"name":"META_CREATEPALETTE","value":"&H00f7"}, + {"name":"META_CREATEPATTERNBRUSH","value":"&H01F9"}, + {"name":"META_CREATEPENINDIRECT","value":"&H02FA"}, + {"name":"META_CREATEFONTINDIRECT","value":"&H02FB"}, + {"name":"META_CREATEBRUSHINDIRECT","value":"&H02FC"}, + {"name":"META_CREATEREGION","value":"&H06FF"}, + {"name":"META_DRAWTEXT","value":"&H062F"}, + {"name":"META_RESETDC","value":"&H014C"}, + {"name":"META_STARTDOC","value":"&H014D"}, + {"name":"META_STARTPAGE","value":"&H004F"}, + {"name":"META_ENDPAGE","value":"&H0050"}, + {"name":"META_ABORTDOC","value":"&H0052"}, + {"name":"META_ENDDOC","value":"&H005E"}, + {"name":"META_CREATEBRUSH","value":"&H00F8"}, + {"name":"META_CREATEBITMAPINDIRECT","value":"&H02FD"}, + {"name":"META_CREATEBITMAP","value":"&H06FE"}, + {"name":"META_UNKNOWN","value":"&H0529"} + ] + }, + { + "name": "GpMetafileType", + "kind": "enum", + "in": "GdipEnums", + "vis": "public", + "file": "GdiPlus/Enums.twin", + "signature": "Enum GpMetafileType", + "values": [ + {"name":"MetafileTypeInvalid"}, + {"name":"MetafileTypeWmf"}, + {"name":"MetafileTypeWmfPlaceable"}, + {"name":"MetafileTypeEmf"}, + {"name":"MetafileTypeEmfPlusOnly"}, + {"name":"MetafileTypeEmfPlusDual"} + ] + }, + { + "name": "GpObjectType", + "kind": "enum", + "in": "GdipEnums", + "vis": "public", + "file": "GdiPlus/Enums.twin", + "signature": "Enum GpObjectType", + "values": [ + {"name":"ObjectTypeInvalid"}, + {"name":"ObjectTypeBrush"}, + {"name":"ObjectTypePen"}, + {"name":"ObjectTypePath"}, + {"name":"ObjectTypeRegion"}, + {"name":"ObjectTypeImage"}, + {"name":"ObjectTypeFont"}, + {"name":"ObjectTypeStringFormat"}, + {"name":"ObjectTypeImageAttributes"}, + {"name":"ObjectTypeCustomLineCap"}, + {"name":"ObjectTypeGraphics"}, + {"name":"ObjectTypeMax","value":"ObjectTypeGraphics"}, + {"name":"ObjectTypeMin","value":"ObjectTypeBrush"} + ] + }, + { + "name": "GpPathPointType", + "kind": "enum", + "in": "GdipEnums", + "vis": "public", + "file": "GdiPlus/Enums.twin", + "signature": "Enum GpPathPointType", + "values": [ + {"name":"PathPointTypeStart","value":"0"}, + {"name":"PathPointTypeLine","value":"1"}, + {"name":"PathPointTypeBezier","value":"3"}, + {"name":"PathPointTypePathTypeMask","value":"&h07"}, + {"name":"PathPointTypeDashMode","value":"&h10"}, + {"name":"PathPointTypePathMarker","value":"&h20"}, + {"name":"PathPointTypeCloseSubpath","value":"&h80"}, + {"name":"PathPointTypeBezier3","value":"3"}, + {"name":"PathPointTypeReserved","value":"2"}, + {"name":"PathPointTypeReservedFlag1","value":"&h08"}, + {"name":"PathPointTypeReservedFlag2","value":"&h40"} + ] + }, + { + "name": "GpPenAlignment", + "kind": "enum", + "in": "GdipEnums", + "vis": "public", + "file": "GdiPlus/Enums.twin", + "signature": "Enum GpPenAlignment", + "values": [ + {"name":"PenAlignmentCenter","value":"0"}, + {"name":"PenAlignmentInset","value":"1"} + ] + }, + { + "name": "GpPenType", + "kind": "enum", + "in": "GdipEnums", + "vis": "public", + "file": "GdiPlus/Enums.twin", + "signature": "Enum GpPenType", + "values": [ + {"name":"PenTypeSolidColor","value":"BrushTypeSolidColor"}, + {"name":"PenTypeHatchFill","value":"BrushTypeHatchFill"}, + {"name":"PenTypeTextureFill","value":"BrushTypeTextureFill"}, + {"name":"PenTypePathGradient","value":"BrushTypePathGradient"}, + {"name":"PenTypeLinearGradient","value":"BrushTypeLinearGradient"}, + {"name":"PenTypeUnknown","value":"-1"} + ] + }, + { + "name": "GpPixelOffsetMode", + "kind": "enum", + "in": "GdipEnums", + "vis": "public", + "file": "GdiPlus/Enums.twin", + "signature": "Enum GpPixelOffsetMode", + "values": [ + {"name":"PixelOffsetModeInvalid","value":"QualityModeInvalid"}, + {"name":"PixelOffsetModeDefault","value":"QualityModeDefault"}, + {"name":"PixelOffsetModeHighSpeed","value":"QualityModeLow"}, + {"name":"PixelOffsetModeHighQuality","value":"QualityModeHigh"}, + {"name":"PixelOffsetModeNone"}, + {"name":"PixelOffsetModeHalf"} + ] + }, + { + "name": "GpQualityMode", + "kind": "enum", + "in": "GdipEnums", + "vis": "public", + "file": "GdiPlus/Enums.twin", + "signature": "Enum GpQualityMode", + "values": [ + {"name":"QualityModeInvalid","value":"-1"}, + {"name":"QualityModeDefault","value":"0"}, + {"name":"QualityModeLow","value":"1"}, + {"name":"QualityModeHigh","value":"2"} + ] + }, + { + "name": "GpSmoothingMode", + "kind": "enum", + "in": "GdipEnums", + "vis": "public", + "file": "GdiPlus/Enums.twin", + "signature": "Enum GpSmoothingMode", + "values": [ + {"name":"SmoothingModeInvalid","value":"QualityModeInvalid"}, + {"name":"SmoothingModeDefault","value":"QualityModeDefault"}, + {"name":"SmoothingModeHighSpeed","value":"QualityModeLow"}, + {"name":"SmoothingModeHighQuality","value":"QualityModeHigh"}, + {"name":"SmoothingModeNone"}, + {"name":"SmoothingModeAntiAlias"}, + {"name":"SmoothingModeAntiAlias8x4","value":"SmoothingModeAntiAlias"}, + {"name":"SmoothingModeAntiAlias8x8"} + ] + }, + { + "name": "GpStringAlignment", + "kind": "enum", + "in": "GdipEnums", + "vis": "public", + "file": "GdiPlus/Enums.twin", + "signature": "Enum GpStringAlignment", + "values": [ + {"name":"StringAlignmentNear","value":"0"}, + {"name":"StringAlignmentCenter","value":"1"}, + {"name":"StringAlignmentFar","value":"2"} + ] + }, + { + "name": "GpStringDigitSubstitute", + "kind": "enum", + "in": "GdipEnums", + "vis": "public", + "file": "GdiPlus/Enums.twin", + "signature": "Enum GpStringDigitSubstitute", + "values": [ + {"name":"StringDigitSubstituteUser","value":"0"}, + {"name":"StringDigitSubstituteNone","value":"1"}, + {"name":"StringDigitSubstituteNational","value":"2"}, + {"name":"StringDigitSubstituteTraditional","value":"3"} + ] + }, + { + "name": "GpStringFormatFlags", + "kind": "enum", + "in": "GdipEnums", + "vis": "public", + "file": "GdiPlus/Enums.twin", + "signature": "Enum GpStringFormatFlags", + "values": [ + {"name":"StringFormatFlagsDirectionRightToLeft","value":"&h00000001"}, + {"name":"StringFormatFlagsDirectionVertical","value":"&h00000002"}, + {"name":"StringFormatFlagsNoFitBlackBox","value":"&h00000004"}, + {"name":"StringFormatFlagsDisplayFormatControl","value":"&h00000020"}, + {"name":"StringFormatFlagsNoFontFallback","value":"&h00000400"}, + {"name":"StringFormatFlagsMeasureTrailingSpaces","value":"&h00000800"}, + {"name":"StringFormatFlagsNoWrap","value":"&h00001000"}, + {"name":"StringFormatFlagsLineLimit","value":"&h00002000"}, + {"name":"StringFormatFlagsNoClip","value":"&h00004000"}, + {"name":"StringFormatFlagsBypassGDI","value":"&h80000000"} + ] + }, + { + "name": "GpStringTrimming", + "kind": "enum", + "in": "GdipEnums", + "vis": "public", + "file": "GdiPlus/Enums.twin", + "signature": "Enum GpStringTrimming", + "values": [ + {"name":"StringTrimmingNone","value":"0"}, + {"name":"StringTrimmingCharacter","value":"1"}, + {"name":"StringTrimmingWord","value":"2"}, + {"name":"StringTrimmingEllipsisCharacter","value":"3"}, + {"name":"StringTrimmingEllipsisWord","value":"4"}, + {"name":"StringTrimmingEllipsisPath","value":"5"} + ] + }, + { + "name": "GpTestControlEnum", + "kind": "enum", + "in": "GdipEnums", + "vis": "public", + "file": "GdiPlus/Enums.twin", + "signature": "Enum GpTestControlEnum", + "values": [ + {"name":"TestControlForceBilinear","value":"0"}, + {"name":"TestControlNoICM","value":"1"}, + {"name":"TestControlGetBuildNumber","value":"2"} + ] + }, + { + "name": "GpTextRenderingHint", + "kind": "enum", + "in": "GdipEnums", + "vis": "public", + "file": "GdiPlus/Enums.twin", + "signature": "Enum GpTextRenderingHint", + "values": [ + {"name":"TextRenderingHintSystemDefault","value":"0"}, + {"name":"TextRenderingHintSingleBitPerPixelGridFit"}, + {"name":"TextRenderingHintSingleBitPerPixel"}, + {"name":"TextRenderingHintAntiAliasGridFit"}, + {"name":"TextRenderingHintAntiAlias"}, + {"name":"TextRenderingHintClearTypeGridFit"} + ] + }, + { + "name": "GpUnit", + "kind": "enum", + "in": "GdipEnums", + "vis": "public", + "file": "GdiPlus/Enums.twin", + "signature": "Enum GpUnit", + "values": [ + {"name":"UnitWorld"}, + {"name":"UnitDisplay"}, + {"name":"UnitPixel"}, + {"name":"UnitPoint"}, + {"name":"UnitInch"}, + {"name":"UnitDocument"}, + {"name":"UnitMillimeter"} + ] + }, + { + "name": "GpWarpMode", + "kind": "enum", + "in": "GdipEnums", + "vis": "public", + "file": "GdiPlus/Enums.twin", + "signature": "Enum GpWarpMode", + "values": [ + {"name":"WarpModePerspective"}, + {"name":"WarpModeBilinear"} + ] + }, + { + "name": "GpWrapMode", + "kind": "enum", + "in": "GdipEnums", + "vis": "public", + "file": "GdiPlus/Enums.twin", + "signature": "Enum GpWrapMode", + "values": [ + {"name":"WrapModeTile"}, + {"name":"WrapModeTileFlipX"}, + {"name":"WrapModeTileFlipY"}, + {"name":"WrapModeTileFlipXY"}, + {"name":"WrapModeClamp"} + ] + }, + { + "name": "GdipFont", + "kind": "module", + "vis": "public", + "file": "GdiPlus/Font.twin", + "signature": "Module GdipFont", + "members": [ + {"name":"Font","kind":"function","vis":"public","signature":"Function Font(ByVal hdc As LongPtr) As Font","returnType":"Font"}, + {"name":"Font","kind":"function","vis":"public","signature":"Function Font(ByVal hdc As LongPtr, ByVal hfont As LongPtr) As Font","returnType":"Font"}, + {"name":"Font","kind":"function","vis":"public","signature":"Function Font(ByVal hdc As LongPtr, logfont As GDIP_LOGFONTA) As Font","returnType":"Font"}, + {"name":"Font","kind":"function","vis":"public","signature":"Function Font(ByVal hdc As LongPtr, logfont As GDIP_LOGFONTW) As Font","returnType":"Font"}, + {"name":"Font","kind":"function","vis":"public","signature":"Function Font(family As FontFamily, ByVal emSize!, ByVal style As GpFontStyle = FontStyleRegular, ByVal unit As GpUnit = UnitPoint) As Font","returnType":"Font"}, + {"name":"Font","kind":"function","vis":"public","signature":"Function Font(family As FontFamily, ByVal emSize!, ByVal style As GpFontStyle = FontStyleRegular, ByVal unit As GpUnit = UnitPoint, Optional fontCollection As FontCollection) As Font","returnType":"Font"}, + {"name":"Font","kind":"function","vis":"public","signature":"Function Font(ByVal familyName$, ByVal emSize!, ByVal style As GpFontStyle = FontStyleRegular, ByVal unit As GpUnit = UnitPoint, Optional fontCollection As FontCollection) As Font","returnType":"Font"}, + {"name":"GDIP_LF_FACESIZE","kind":"const","vis":"public","signature":"Public Const GDIP_LF_FACESIZE = 32"}, + {"name":"GetObjectW","kind":"function","vis":"private","declare":true,"signature":"Private DeclareWide PtrSafe Function GetObjectW Lib \"gdi32\" (ByVal hObject As LongPtr, ByVal nCount As Long, lpObject As Any) As Long","returnType":"Long"}, + {"name":"GpFont","kind":"function","vis":"public","signature":"Function GpFont() As GpFont","returnType":"GpFont"} + ] + }, + { + "name": "GDIP_FontWeight", + "kind": "enum", + "in": "GdipFont", + "vis": "public", + "file": "GdiPlus/Font.twin", + "signature": "Public Enum GDIP_FontWeight", + "values": [ + {"name":"FW_DONTCARE","value":"0"}, + {"name":"FW_THIN","value":"100"}, + {"name":"FW_EXTRALIGHT","value":"200"}, + {"name":"FW_LIGHT","value":"300"}, + {"name":"FW_NORMAL","value":"400"}, + {"name":"FW_MEDIUM","value":"500"}, + {"name":"FW_SEMIBOLD","value":"600"}, + {"name":"FW_BOLD","value":"700"}, + {"name":"FW_EXTRABOLD","value":"800"}, + {"name":"FW_HEAVY","value":"900"}, + {"name":"FW_ULTRALIGHT","value":"FW_EXTRALIGHT"}, + {"name":"FW_REGULAR","value":"FW_NORMAL"}, + {"name":"FW_DEMIBOLD","value":"FW_SEMIBOLD"}, + {"name":"FW_ULTRABOLD","value":"FW_EXTRABOLD"}, + {"name":"FW_BLACK","value":"FW_HEAVY"} + ] + }, + { + "name": "GDIP_LOGFONTA", + "kind": "type", + "in": "GdipFont", + "vis": "public", + "file": "GdiPlus/Font.twin", + "signature": "Public Type GDIP_LOGFONTA", + "fields": [ + {"name":"LFHeight","vis":"public","signature":"LFHeight As Long"}, + {"name":"LFWidth","vis":"public","signature":"LFWidth As Long"}, + {"name":"LFEscapement","vis":"public","signature":"LFEscapement As Long"}, + {"name":"LFOrientation","vis":"public","signature":"LFOrientation As Long"}, + {"name":"LFWeight","vis":"public","signature":"LFWeight As GDIP_FontWeight"}, + {"name":"LFItalic","vis":"public","signature":"LFItalic As Byte"}, + {"name":"LFUnderline","vis":"public","signature":"LFUnderline As Byte"}, + {"name":"LFStrikeOut","vis":"public","signature":"LFStrikeOut As Byte"}, + {"name":"LFCharset","vis":"public","signature":"LFCharset As Byte"}, + {"name":"LFOutPrecision","vis":"public","signature":"LFOutPrecision As Byte"}, + {"name":"LFClipPrecision","vis":"public","signature":"LFClipPrecision As Byte"}, + {"name":"LFQuality","vis":"public","signature":"LFQuality As Byte"}, + {"name":"LFPitchAndFamily","vis":"public","signature":"LFPitchAndFamily As Byte"}, + {"name":"LFFaceName","vis":"public","signature":"LFFaceName (GDIP_LF_FACESIZE - 1) As Byte"} + ], + "members": [] + }, + { + "name": "GDIP_LOGFONTW", + "kind": "type", + "in": "GdipFont", + "vis": "public", + "file": "GdiPlus/Font.twin", + "signature": "Public Type GDIP_LOGFONTW", + "fields": [ + {"name":"LFHeight","vis":"public","signature":"LFHeight As Long"}, + {"name":"LFWidth","vis":"public","signature":"LFWidth As Long"}, + {"name":"LFEscapement","vis":"public","signature":"LFEscapement As Long"}, + {"name":"LFOrientation","vis":"public","signature":"LFOrientation As Long"}, + {"name":"LFWeight","vis":"public","signature":"LFWeight As GDIP_FontWeight"}, + {"name":"LFItalic","vis":"public","signature":"LFItalic As Byte"}, + {"name":"LFUnderline","vis":"public","signature":"LFUnderline As Byte"}, + {"name":"LFStrikeOut","vis":"public","signature":"LFStrikeOut As Byte"}, + {"name":"LFCharset","vis":"public","signature":"LFCharset As Byte"}, + {"name":"LFOutPrecision","vis":"public","signature":"LFOutPrecision As Byte"}, + {"name":"LFClipPrecision","vis":"public","signature":"LFClipPrecision As Byte"}, + {"name":"LFQuality","vis":"public","signature":"LFQuality As Byte"}, + {"name":"LFPitchAndFamily","vis":"public","signature":"LFPitchAndFamily As Byte"}, + {"name":"LFFaceName","vis":"public","signature":"LFFaceName (GDIP_LF_FACESIZE - 1) As Integer"} + ], + "members": [] + }, + { + "name": "GpFont", + "kind": "type", + "in": "GdipFont", + "vis": "public", + "file": "GdiPlus/Font.twin", + "signature": "Type GpFont", + "fields": [ + {"name":"Native","vis":"public","signature":"Native As LongPtr"} + ], + "members": [ + {"name":"Clone","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function Clone Lib \"gdiplus\" Alias \"GdipCloneFont\" (ByVal Me As GpFont, cloneFont As GpFont) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"Create","kind":"function","vis":"public","signature":"Function Create(ByVal familyName$, ByVal emSize!, fontCollection As GpFontCollection, nativeFamily As GpFontFamily, ByVal style As GpFontStyle = FontStyleRegular, ByVal unit As GpUnit = UnitPoint) As GpStatus","returnType":"GpStatus"}, + {"name":"CreateFrom","kind":"function","vis":"public","signature":"Function CreateFrom(ByVal hdc As LongPtr, ByVal hfont As LongPtr) As GpStatus","returnType":"GpStatus"}, + {"name":"CreateFromDCInto","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function CreateFromDCInto Lib \"gdiplus\" Alias \"GdipCreateFontFromDC\" (ByVal hdc As LongPtr, font As GpFont) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"CreateFromLogfontAInto","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function CreateFromLogfontAInto Lib \"gdiplus\" Alias \"GdipCreateFontFromLogfontA\" (ByVal hdc As LongPtr, logfont As GDIP_LOGFONTA, font As GpFont) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"CreateFromLogfontWInto","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function CreateFromLogfontWInto Lib \"gdiplus\" Alias \"GdipCreateFontFromLogfontW\" (ByVal hdc As LongPtr, logfont As GDIP_LOGFONTW, font As GpFont) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"CreateInto","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function CreateInto Lib \"gdiplus\" Alias \"GdipCreateFont\" (ByVal fontFamily As GpFontFamily, ByVal emSize As Single, ByVal style As Long, ByVal unit As GpUnit, font As GpFont) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"Delete","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function Delete Lib \"gdiplus\" Alias \"GdipDeleteFont\" (ByVal Me As GpFont) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetFamily","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetFamily Lib \"gdiplus\" Alias \"GdipGetFamily\" (ByVal Me As GpFont, family As GpFontFamily) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetHeight","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetHeight Lib \"gdiplus\" Alias \"GdipGetFontHeight\" (ByVal Me As GpFont, ByVal Graphics As GpGraphics, height As Single) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetHeightGivenDPI","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetHeightGivenDPI Lib \"gdiplus\" Alias \"GdipGetFontHeightGivenDPI\" (ByVal Me As GpFont, ByVal dpi As Single, height As Single) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetLogFontA","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetLogFontA Lib \"gdiplus\" Alias \"GdipGetLogFontA\" (ByVal Me As GpFont, ByVal Graphics As GpGraphics, logfontA As GDIP_LOGFONTA) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetLogFontW","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetLogFontW Lib \"gdiplus\" Alias \"GdipGetLogFontW\" (ByVal Me As GpFont, ByVal Graphics As GpGraphics, logfontA As GDIP_LOGFONTW) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetSize","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetSize Lib \"gdiplus\" Alias \"GdipGetFontSize\" (ByVal Me As GpFont, size As Single) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetStyle","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetStyle Lib \"gdiplus\" Alias \"GdipGetFontStyle\" (ByVal Me As GpFont, style As Long) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetUnit","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetUnit Lib \"gdiplus\" Alias \"GdipGetFontUnit\" (ByVal Me As GpFont, unit As GpUnit) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]} + ] + }, + { + "name": "GdipFontCollection", + "kind": "module", + "vis": "public", + "file": "GdiPlus/FontCollection.twin", + "signature": "Module GdipFontCollection", + "members": [ + {"name":"GdipFontCollectionEnumerable","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function GdipFontCollectionEnumerable Lib \"gdiplus\" (ByVal fontCollection As LongPtr, ByVal graphics As LongPtr, numFound As Long) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GdipFontCollectionEnumerate","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function GdipFontCollectionEnumerate Lib \"gdiplus\" (ByVal fontCollection As LongPtr, ByVal numSought As Long, gpfamilies As LongPtr, numFound As Long, ByVal Graphics As LongPtr) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GdipGetFontCollectionFamilyCount","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function GdipGetFontCollectionFamilyCount Lib \"gdiplus\" (ByVal Me As LongPtr, numFound&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GdipGetFontCollectionFamilyList","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function GdipGetFontCollectionFamilyList Lib \"gdiplus\" (ByVal Me As LongPtr, ByVal numSought&, gpfamilies As GpFontFamily, numFound&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetFamilyListImpl","kind":"function","vis":"public","signature":"Function GetFamilyListImpl(ByVal Me As LongPtr, list() As GpFontFamily) As GpStatus","returnType":"GpStatus"}, + {"name":"GpFontCollection","kind":"function","vis":"public","signature":"Function GpFontCollection() As GpFontCollection","returnType":"GpFontCollection"} + ] + }, + { + "name": "GpFontCollection", + "kind": "type", + "in": "GdipFontCollection", + "vis": "public", + "file": "GdiPlus/FontCollection.twin", + "signature": "Type GpFontCollection", + "fields": [ + {"name":"Native","vis":"public","signature":"Native As LongPtr"} + ], + "members": [ + {"name":"GetFamilyCount","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function GetFamilyCount Lib \"gdiplus\" Alias \"GdipGetFontCollectionFamilyCount\" (ByVal Me As GpFontCollection, numFound&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetFamilyList","kind":"function","vis":"public","signature":"Function GetFamilyList(list() As GpFontFamily) As GpStatus","returnType":"GpStatus"} + ] + }, + { + "name": "GdipFontFamily", + "kind": "module", + "vis": "public", + "file": "GdiPlus/FontFamily.twin", + "signature": "Module GdipFontFamily", + "members": [ + {"name":"FontFamily","kind":"function","vis":"public","signature":"Function FontFamily(ByVal name$, Optional fontCollection As FontCollection) As FontFamily","returnType":"FontFamily"}, + {"name":"GdipGetGenericFontFamilyMonospace","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GdipGetGenericFontFamilyMonospace Lib \"gdiplus\" (Me As GpFontFamily) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GdipGetGenericFontFamilySansSerif","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GdipGetGenericFontFamilySansSerif Lib \"gdiplus\" (Me As GpFontFamily) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GdipGetGenericFontFamilySerif","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GdipGetGenericFontFamilySerif Lib \"gdiplus\" (Me As GpFontFamily) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GenericMonospace","kind":"function","vis":"public","signature":"Function GenericMonospace() As FontFamily","returnType":"FontFamily"}, + {"name":"GenericSansSerif","kind":"function","vis":"public","signature":"Function GenericSansSerif() As FontFamily","returnType":"FontFamily"}, + {"name":"GenericSerif","kind":"function","vis":"public","signature":"Function GenericSerif() As FontFamily","returnType":"FontFamily"}, + {"name":"GpFontFamily","kind":"function","vis":"public","signature":"Function GpFontFamily() As GpFontFamily","returnType":"GpFontFamily"} + ] + }, + { + "name": "GpFontFamily", + "kind": "type", + "in": "GdipFontFamily", + "vis": "public", + "file": "GdiPlus/FontFamily.twin", + "signature": "Type GpFontFamily", + "fields": [ + {"name":"Native","vis":"public","signature":"Native As LongPtr"} + ], + "members": [ + {"name":"Clone","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function Clone Lib \"gdiplus\" Alias \"GdipCloneFontFamily\" (ByVal Me As GpFontFamily, clonedFontFamily As GpFontFamily) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"CreateFromNameInto","kind":"function","vis":"public","declare":true,"signature":"DeclareWide PtrSafe Function CreateFromNameInto Lib \"gdiplus\" Alias \"GdipCreateFontFamilyFromName\" (ByVal Name As String, ByVal fontCollection As GpFontCollection, fontFamily As GpFontFamily) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"Delete","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function Delete Lib \"gdiplus\" Alias \"GdipDeleteFontFamily\" (ByVal Me As GpFontFamily) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetCellAscent","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetCellAscent Lib \"gdiplus\" Alias \"GdipGetCellAscent\" (ByVal Me As GpFontFamily, ByVal style As Long, CellAscent As Integer) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetCellDescent","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetCellDescent Lib \"gdiplus\" Alias \"GdipGetCellDescent\" (ByVal Me As GpFontFamily, ByVal style As Long, CellDescent As Integer) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetEmHeight","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetEmHeight Lib \"gdiplus\" Alias \"GdipGetEmHeight\" (ByVal Me As GpFontFamily, ByVal style As Long, EmHeight As Integer) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetFamilyName","kind":"function","vis":"public","signature":"Function GetFamilyName(name$, ByVal language% = 0) As GpStatus","returnType":"GpStatus"}, + {"name":"GetFamilyName2","kind":"function","vis":"public","declare":true,"signature":"DeclareWide PtrSafe Function GetFamilyName2 Lib \"gdiplus\" Alias \"GdipGetFamilyName\" (ByVal Me As GpFontFamily, ByVal Name As String, ByVal language As Integer) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetLineSpacing","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetLineSpacing Lib \"gdiplus\" Alias \"GdipGetLineSpacing\" (ByVal Me As GpFontFamily, ByVal style As Long, LineSpacing As Integer) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"IsBoldAvailable","kind":"function","vis":"public","signature":"Function IsBoldAvailable(result As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"IsBoldItalicAvailable","kind":"function","vis":"public","signature":"Function IsBoldItalicAvailable(result As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"IsItalicAvailable","kind":"function","vis":"public","signature":"Function IsItalicAvailable(result As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"IsStrikeoutAvailable","kind":"function","vis":"public","signature":"Function IsStrikeoutAvailable(result As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"IsStyleAvailable","kind":"function","vis":"public","signature":"Function IsStyleAvailable(ByVal style As GpFontStyle, result As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"IsStyleAvailable2","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function IsStyleAvailable2 Lib \"gdiplus\" Alias \"GdipIsStyleAvailable\" (ByVal Me As GpFontFamily, ByVal style As Long, IsStyleAvailable As GDIP_BOOL) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"IsUnderlinedAvailable","kind":"function","vis":"public","signature":"Function IsUnderlinedAvailable(result As Boolean) As GpStatus","returnType":"GpStatus"} + ] + }, + { + "name": "GdipGdiPlusUser", + "kind": "module", + "vis": "public", + "file": "GdiPlus/GdiPlusUser.twin", + "signature": "Module GdipGdiPlusUser", + "members": [ + {"name":"GdiPlusUser","kind":"function","vis":"public","signature":"Function GdiPlusUser(ByVal startupParams As GdiplusStartupParams = GdiplusStartupDefault) As GdiPlusUser","returnType":"GdiPlusUser"}, + {"name":"GdiPlusUser","kind":"function","vis":"public","signature":"Function GdiPlusUser(ByRef input As GdiplusStartupInput) As GdiPlusUser","returnType":"GdiPlusUser"}, + {"name":"GdiPlusUser","kind":"function","vis":"public","signature":"Function GdiPlusUser(ByRef input As GdiplusStartupInput, ByRef output As GdiplusStartupOutput) As GdiPlusUser","returnType":"GdiPlusUser"}, + {"name":"GdiplusStartupInput","kind":"function","vis":"public","signature":"Function GdiplusStartupInput( Optional debugEventCallback As DebugEventProc, ByVal suppressBackgroundThread As Boolean = False, ByVal suppressExternalCodecs As Boolean = False) As GdiplusStartupInput","returnType":"GdiplusStartupInput"}, + {"name":"GdiplusStartupInput","kind":"function","vis":"public","signature":"Function GdiplusStartupInput( ByVal startupParameters As GdiplusStartupParams = 0, Optional debugEventCallback As DebugEventProc, ByVal suppressBackgroundThread As Boolean = False, ByVal suppressExternalCodecs As Boolean = False) As GdiplusStartupInput","returnType":"GdiplusStartupInput"}, + {"name":"GdiplusStartupInput","kind":"function","vis":"public","signature":"Function GdiplusStartupInput( ByVal gdiplusVersion As UINT, ByVal startupParameters As GdiplusStartupParams = 0, Optional debugEventCallback As DebugEventProc, ByVal suppressBackgroundThread As Boolean = False, ByVal suppressExternalCodecs As Boolean = False) As GdiplusStartupInput","returnType":"GdiplusStartupInput"}, + {"name":"GetBuildNumber","kind":"function","vis":"public","signature":"Function GetBuildNumber(buildNumber&) As GpStatus","returnType":"GpStatus"}, + {"name":"NotificationHook","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function NotificationHook Lib \"gdiplus\" Alias \"GdiplusNotificationHook\" (Me As LongPtr) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"NotificationUnhook","kind":"sub","vis":"public","declare":true,"signature":"Public Declare PtrSafe Sub NotificationUnhook Lib \"gdiplus\" Alias \"GdiplusNotificationUnhook\" (ByVal Me As LongPtr)","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"TestControl","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function TestControl Lib \"gdiplus\" Alias \"GdipTestControl\" (ByVal control As GpTestControlEnum, param As Any) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"TestControlForceBilinear","kind":"function","vis":"public","signature":"Function TestControlForceBilinear(ByVal force As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"TestControlNoICM","kind":"function","vis":"public","signature":"Function TestControlNoICM(ByVal noICM As Boolean) As GpStatus","returnType":"GpStatus"} + ] + }, + { + "name": "GdiplusDebugEventLevel", + "kind": "enum", + "in": "GdipGdiPlusUser", + "vis": "public", + "file": "GdiPlus/GdiPlusUser.twin", + "signature": "Enum GdiplusDebugEventLevel", + "values": [ + {"name":"DebugEventLevelFatal"}, + {"name":"DebugEventLevelWarning"} + ] + }, + { + "name": "GdiplusStartupInput", + "kind": "type", + "in": "GdipGdiPlusUser", + "vis": "public", + "file": "GdiPlus/GdiPlusUser.twin", + "signature": "Public Type GdiplusStartupInput", + "fields": [ + {"name":"GdiplusVersion","vis":"public","signature":"GdiplusVersion As Long","description":"Currently supported are versions 1, 2 and 3.\n- version 1: available in Windows XP and up\n- version 2: available on some Windows 10 and up\n- version 3: enables Heif and Avif image codecs. These two codecs require COM to be initiailized."}, + {"name":"DebugEventCallback","vis":"public","signature":"DebugEventCallback As DebugEventProc"}, + {"name":"SuppressBackgroundThread","vis":"public","signature":"SuppressBackgroundThread As GDIP_BOOL","description":"FALSE unless you're prepared to call the hook/unhook functions properly"}, + {"name":"SuppressExternalCodecs","vis":"public","signature":"SuppressExternalCodecs As GDIP_BOOL","description":"FALSE unless you want GDI+ only to use its internal image codecs."}, + {"name":"StartupParameters","vis":"public","signature":"StartupParameters As GdiplusStartupParams"} + ], + "members": [] + }, + { + "name": "GdiplusStartupOutput", + "kind": "type", + "in": "GdipGdiPlusUser", + "vis": "public", + "file": "GdiPlus/GdiPlusUser.twin", + "signature": "Public Type GdiplusStartupOutput", + "description": "Notification functions which the user must call appropriately if SuppressBackgroundThread is set.", + "fields": [ + {"name":"NotificationHook","vis":"public","signature":"NotificationHook As NotificationHookProc"}, + {"name":"NotificationUnhook","vis":"public","signature":"NotificationUnhook As NotificationUnhookProc"} + ], + "members": [] + }, + { + "name": "GdiplusStartupParams", + "kind": "enum", + "in": "GdipGdiPlusUser", + "vis": "public", + "file": "GdiPlus/GdiPlusUser.twin", + "signature": "Enum GdiplusStartupParams", + "values": [ + {"name":"GdiplusStartupDefault","value":"0"}, + {"name":"GdiplusStartupNoSetRound","value":"1"}, + {"name":"GdiplusStartupSetPSValue","value":"2"}, + {"name":"GdiplusStartupReserved0","value":"4"}, + {"name":"GdiplusStartupReserved1"}, + {"name":"GdiplusStartupReserved2"}, + {"name":"GdiplusStartupTransparencyMask","value":"&hFF00_0000"} + ] + }, + { + "name": "GpToken", + "kind": "type", + "in": "GdipGdiPlusUser", + "vis": "public", + "file": "GdiPlus/GdiPlusUser.twin", + "signature": "Type GpToken", + "fields": [ + {"name":"value","vis":"public","signature":"value As LongPtr"} + ], + "members": [ + {"name":"Release","kind":"sub","vis":"public","signature":"Sub Release()"}, + {"name":"Shutdown","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function Shutdown Lib \"gdiplus\" Alias \"GdiplusShutdown\" (ByVal Me As GpToken) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"Startup","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function Startup Lib \"gdiplus\" Alias \"GdiplusStartup\" (Me As GpToken, input As GdiplusStartupInput, output As GdiplusStartupOutput) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"Type_Initialize","kind":"sub","vis":"public","signature":"Sub Type_Initialize()"} + ] + }, + { + "name": "GdipGraphics", + "kind": "module", + "vis": "public", + "file": "GdiPlus/Graphics.twin", + "signature": "Module GdipGraphics", + "members": [ + {"name":"BufferedGraphicsFromHDC","kind":"function","vis":"public","signature":"Function BufferedGraphicsFromHDC(ByVal hdc As LongPtr, drawArea As GpRect) As Graphics","returnType":"Graphics"}, + {"name":"BufferedGraphicsFromHWND","kind":"function","vis":"public","signature":"Function BufferedGraphicsFromHWND(ByVal hwnd As LongPtr) As Graphics","returnType":"Graphics"}, + {"name":"CreateHalftonePalette","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function CreateHalftonePalette Lib \"gdiplus\" Alias \"GdipCreateHalftonePalette\" () As LongPtr","returnType":"LongPtr","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"Graphics","kind":"function","vis":"public","signature":"Function Graphics(image As Image) As Graphics","returnType":"Graphics"}, + {"name":"Graphics","kind":"function","vis":"public","signature":"Function Graphics(ByVal options As GraphicsCreationOptions, ByVal h1&, ByVal h2&) As Graphics","returnType":"Graphics"}, + {"name":"GraphicsFromHDC","kind":"function","vis":"public","signature":"Function GraphicsFromHDC(ByVal hdc As LongPtr, ByVal hdevice As LongPtr = 0) As Graphics","returnType":"Graphics"}, + {"name":"GraphicsFromHWND","kind":"function","vis":"public","signature":"Function GraphicsFromHWND(ByVal hwnd As LongPtr) As Graphics","returnType":"Graphics"}, + {"name":"GraphicsFromHWNDWithICM","kind":"function","vis":"public","signature":"Function GraphicsFromHWNDWithICM(ByVal hwnd As LongPtr) As Graphics","returnType":"Graphics"}, + {"name":"GraphicsFromImage","kind":"function","vis":"public","signature":"Function GraphicsFromImage(image As Image) As Graphics","returnType":"Graphics"} + ] + }, + { + "name": "GpGraphics", + "kind": "type", + "in": "GdipGraphics", + "vis": "public", + "file": "GdiPlus/Graphics.twin", + "signature": "Type GpGraphics", + "fields": [ + {"name":"Native","vis":"public","signature":"Native As LongPtr"} + ], + "members": [ + {"name":"AddMetafileComment","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function AddMetafileComment Lib \"gdiplus\" Alias \"GdipComment\" (ByVal Me As GpGraphics, ByVal sizeData&, data As Byte) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"BeginContainer","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function BeginContainer Lib \"gdiplus\" Alias \"GdipBeginContainer\" (ByVal Me As GpGraphics, dstrect As GpRectF, srcrect As GpRectF, ByVal unit As GpUnit, state&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"BeginContainer2","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function BeginContainer2 Lib \"gdiplus\" Alias \"GdipBeginContainer2\" (ByVal Me As GpGraphics, state&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"BeginContainerI","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function BeginContainerI Lib \"gdiplus\" Alias \"GdipBeginContainerI\" (ByVal Me As GpGraphics, dstrect As GpRect, srcrect As GpRect, ByVal unit As GpUnit, state&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"Clear","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function Clear Lib \"gdiplus\" Alias \"GdipGraphicsClear\" (ByVal Me As GpGraphics, ByVal color As Color) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"ClearRGB","kind":"function","vis":"public","signature":"Function ClearRGB(ByVal rgb&) As GpStatus","returnType":"GpStatus"}, + {"name":"CreateFromHDC","kind":"function","vis":"public","signature":"Function CreateFromHDC(ByVal hDC As LongPtr, ByVal hDevice As LongPtr = 0) As GpStatus","returnType":"GpStatus"}, + {"name":"CreateFromHDCInto1","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function CreateFromHDCInto1 Lib \"gdiplus\" Alias \"GdipCreateFromHDC\" (ByVal hDC As LongPtr, Graphics As GpGraphics) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"CreateFromHDCInto2","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function CreateFromHDCInto2 Lib \"gdiplus\" Alias \"GdipCreateFromHDC2\" (ByVal hDC As LongPtr, ByVal hDevice As LongPtr, Graphics As GpGraphics) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"CreateFromHWND","kind":"function","vis":"public","signature":"Function CreateFromHWND(ByVal hWND As LongPtr) As GpStatus","returnType":"GpStatus"}, + {"name":"CreateFromHWNDICM","kind":"function","vis":"public","signature":"Function CreateFromHWNDICM(ByVal hWND As LongPtr) As GpStatus","returnType":"GpStatus"}, + {"name":"CreateFromHWNDICMInto","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function CreateFromHWNDICMInto Lib \"gdiplus\" Alias \"GdipCreateFromHWNDICM\" (ByVal hwnd As LongPtr, Graphics As GpGraphics) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"CreateFromHWNDInto","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function CreateFromHWNDInto Lib \"gdiplus\" Alias \"GdipCreateFromHWND\" (ByVal hwnd As LongPtr, Graphics As GpGraphics) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"CreateFromImage","kind":"function","vis":"public","signature":"Function CreateFromImage(image As Image) As GpStatus","returnType":"GpStatus"}, + {"name":"Delete","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function Delete Lib \"gdiplus\" Alias \"GdipDeleteGraphics\" (ByVal Me As GpGraphics) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"DrawArc","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function DrawArc Lib \"gdiplus\" Alias \"GdipDrawArc\" (ByVal Me As GpGraphics, ByVal pen As GpPen, ByVal X!, ByVal Y!, ByVal Width!, ByVal Height!, ByVal startAngle!, ByVal sweepAngle!) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"DrawArcI","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function DrawArcI Lib \"gdiplus\" Alias \"GdipDrawArcI\" (ByVal Me As GpGraphics, ByVal pen As GpPen, ByVal X&, ByVal Y&, ByVal Width&, ByVal Height&, ByVal startAngle!, ByVal sweepAngle!) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"DrawArcPS","kind":"function","vis":"public","signature":"Function DrawArcPS(ByVal pen As GpPen, ByVal pt As GpPointF, ByVal size As GpSizeF, ByVal startAngle!, ByVal sweepAngle!) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawArcPSI","kind":"function","vis":"public","signature":"Function DrawArcPSI(ByVal pen As GpPen, ByVal pt As GpPoint, ByVal size As GpSize, ByVal startAngle!, ByVal sweepAngle!) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawArcR","kind":"function","vis":"public","signature":"Function DrawArcR(ByVal pen As GpPen, rect As GpRectF, ByVal startAngle!, ByVal sweepAngle!) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawArcRI","kind":"function","vis":"public","signature":"Function DrawArcRI(ByVal pen As GpPen, rect As GpRect, ByVal startAngle!, ByVal sweepAngle!) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawBezier","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function DrawBezier Lib \"gdiplus\" Alias \"GdipDrawBezier\" (ByVal Me As GpGraphics, ByVal pen As GpPen, ByVal x1!, ByVal y1!, ByVal x2!, ByVal y2!, ByVal x3!, ByVal y3!, ByVal x4!, ByVal y4!) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"DrawBezierI","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function DrawBezierI Lib \"gdiplus\" Alias \"GdipDrawBezierI\" (ByVal Me As GpGraphics, ByVal pen As GpPen, ByVal x1&, ByVal y1&, ByVal x2&, ByVal y2&, ByVal x3&, ByVal y3&, ByVal x4&, ByVal y4&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"DrawBezierP","kind":"function","vis":"public","signature":"Function DrawBezierP(ByVal pen As GpPen, ByVal pt1 As GpPointF, ByVal pt2 As GpPointF, ByVal pt3 As GpPointF, ByVal pt4 As GpPointF) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawBezierPI","kind":"function","vis":"public","signature":"Function DrawBezierPI(ByVal pen As GpPen, ByVal pt1 As GpPoint, ByVal pt2 As GpPoint, ByVal pt3 As GpPoint, ByVal pt4 As GpPoint) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawBeziers","kind":"function","vis":"public","signature":"Function DrawBeziers(ByVal pen As GpPen, points() As GpPointF) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawBeziersI","kind":"function","vis":"public","signature":"Function DrawBeziersI(ByVal pen As GpPen, points() As GpPoint) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawBeziersX","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function DrawBeziersX Lib \"gdiplus\" Alias \"GdipDrawBeziers\" (ByVal Me As GpGraphics, ByVal pen As GpPen, Points As GpPointF, ByVal count&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"DrawBeziersXI","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function DrawBeziersXI Lib \"gdiplus\" Alias \"GdipDrawBeziersI\" (ByVal Me As GpGraphics, ByVal pen As GpPen, Points As GpPoint, ByVal count&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"DrawCachedBitmap","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function DrawCachedBitmap Lib \"gdiplus\" Alias \"GdipDrawCachedBitmap\" (ByVal Me As GpGraphics, ByVal cachedBitmap As GpCachedBitmap, ByVal x&, ByVal y&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"DrawCachedBitmapP","kind":"function","vis":"public","signature":"Function DrawCachedBitmapP(ByVal cb As GpCachedBitmap, ByVal offset As GpPoint) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawClosedCurve","kind":"function","vis":"public","signature":"Function DrawClosedCurve(ByVal pen As GpPen, points() As GpPointF) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawClosedCurve2","kind":"function","vis":"public","signature":"Function DrawClosedCurve2(ByVal pen As GpPen, points() As GpPointF, ByVal tension!) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawClosedCurve2I","kind":"function","vis":"public","signature":"Function DrawClosedCurve2I(ByVal pen As GpPen, points() As GpPoint, ByVal tension!) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawClosedCurve2X","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function DrawClosedCurve2X Lib \"gdiplus\" Alias \"GdipDrawClosedCurve2\" (ByVal Me As GpGraphics, ByVal pen As GpPen, Points As GpPointF, ByVal count&, ByVal tension!) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"DrawClosedCurve2XI","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function DrawClosedCurve2XI Lib \"gdiplus\" Alias \"GdipDrawClosedCurve2I\" (ByVal Me As GpGraphics, ByVal pen As GpPen, Points As GpPoint, ByVal count&, ByVal tension!) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"DrawClosedCurveI","kind":"function","vis":"public","signature":"Function DrawClosedCurveI(ByVal pen As GpPen, points() As GpPoint) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawClosedCurveX","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function DrawClosedCurveX Lib \"gdiplus\" Alias \"GdipDrawClosedCurve\" (ByVal Me As GpGraphics, ByVal pen As GpPen, Points As GpPointF, ByVal count&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"DrawClosedCurveXI","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function DrawClosedCurveXI Lib \"gdiplus\" Alias \"GdipDrawClosedCurveI\" (ByVal Me As GpGraphics, ByVal pen As GpPen, Points As GpPoint, ByVal count&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"DrawCurve","kind":"function","vis":"public","signature":"Function DrawCurve(ByVal pen As GpPen, points() As GpPointF) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawCurve2","kind":"function","vis":"public","signature":"Function DrawCurve2(ByVal pen As GpPen, points() As GpPointF, ByVal tension!) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawCurve2I","kind":"function","vis":"public","signature":"Function DrawCurve2I(ByVal pen As GpPen, points() As GpPoint, ByVal tension!) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawCurve2X","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function DrawCurve2X Lib \"gdiplus\" Alias \"GdipDrawCurve2\" (ByVal Me As GpGraphics, ByVal pen As GpPen, Points As GpPointF, ByVal count&, ByVal tension!) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"DrawCurve2XI","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function DrawCurve2XI Lib \"gdiplus\" Alias \"GdipDrawCurve2I\" (ByVal Me As GpGraphics, ByVal pen As GpPen, Points As GpPoint, ByVal count&, ByVal tension!) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"DrawCurve3","kind":"function","vis":"public","signature":"Function DrawCurve3(ByVal pen As GpPen, points() As GpPointF, ByVal offset&, ByVal numberOfSegments&, ByVal tension!) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawCurve3I","kind":"function","vis":"public","signature":"Function DrawCurve3I(ByVal pen As GpPen, points() As GpPoint, ByVal offset&, ByVal numberOfSegments&, ByVal tension!) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawCurve3X","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function DrawCurve3X Lib \"gdiplus\" Alias \"GdipDrawCurve3\" (ByVal Me As GpGraphics, ByVal pen As GpPen, Points As GpPointF, ByVal count&, ByVal offset&, ByVal numberOfSegments&, ByVal tension!) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"DrawCurve3XI","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function DrawCurve3XI Lib \"gdiplus\" Alias \"GdipDrawCurve3I\" (ByVal Me As GpGraphics, ByVal pen As GpPen, Points As GpPoint, ByVal count&, ByVal offset&, ByVal numberOfSegments&, ByVal tension!) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"DrawCurveI","kind":"function","vis":"public","signature":"Function DrawCurveI(ByVal pen As GpPen, points() As GpPoint) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawCurveX","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function DrawCurveX Lib \"gdiplus\" Alias \"GdipDrawCurve\" (ByVal Me As GpGraphics, ByVal pen As GpPen, Points As GpPointF, ByVal count&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"DrawCurveXI","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function DrawCurveXI Lib \"gdiplus\" Alias \"GdipDrawCurveI\" (ByVal Me As GpGraphics, ByVal pen As GpPen, Points As GpPoint, ByVal count&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"DrawDriverGlyphPositions","kind":"function","vis":"public","signature":"Function DrawDriverGlyphPositions(glyphs() As Integer, ByVal font As GpFont, ByVal brush As GpBrush, positions() As GpPointF, ByVal flags&, ByVal matrix As GpMatrix) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawDriverGlyphs","kind":"function","vis":"public","signature":"Function DrawDriverGlyphs(glyphs() As Integer, ByVal font As GpFont, ByVal brush As GpBrush, ByVal position As GpPointF, ByVal flags&, ByVal matrix As GpMatrix) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawDriverString","kind":"function","vis":"public","signature":"Function DrawDriverString(ByVal str$, ByVal font As GpFont, ByVal brush As GpBrush, ByVal position As GpPointF, ByVal flags&, ByVal matrix As GpMatrix) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawDriverStringPositions","kind":"function","vis":"public","signature":"Function DrawDriverStringPositions(ByVal str$, ByVal font As GpFont, ByVal brush As GpBrush, positions() As GpPointF, ByVal flags&, ByVal matrix As GpMatrix) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawDriverStringX","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function DrawDriverStringX Lib \"gdiplus\" Alias \"GdipDrawDriverString\" (ByVal Me As GpGraphics, ByVal str As LongPtr, ByVal length&, ByVal font As GpFont, ByVal Brush As GpBrush, positions As GpPointF, ByVal flags&, ByVal matrix As GpMatrix) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"DrawEllipse","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function DrawEllipse Lib \"gdiplus\" Alias \"GdipDrawEllipse\" (ByVal Me As GpGraphics, ByVal pen As GpPen, ByVal X!, ByVal Y!, ByVal Width!, ByVal Height!) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"DrawEllipseI","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function DrawEllipseI Lib \"gdiplus\" Alias \"GdipDrawEllipseI\" (ByVal Me As GpGraphics, ByVal pen As GpPen, ByVal X&, ByVal Y&, ByVal Width&, ByVal Height&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"DrawEllipsePS","kind":"function","vis":"public","signature":"Function DrawEllipsePS(ByVal pen As GpPen, ByVal pt As GpPointF, ByVal size As GpSizeF) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawEllipsePSI","kind":"function","vis":"public","signature":"Function DrawEllipsePSI(ByVal pen As GpPen, ByVal pt As GpPoint, ByVal size As GpSize) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawEllipseR","kind":"function","vis":"public","signature":"Function DrawEllipseR(ByVal pen As GpPen, rect As GpRectF) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawEllipseRI","kind":"function","vis":"public","signature":"Function DrawEllipseRI(ByVal pen As GpPen, rect As GpRect) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawImage","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function DrawImage Lib \"gdiplus\" Alias \"GdipDrawImage\" (ByVal Me As GpGraphics, ByVal Image As GpImage, ByVal X!, ByVal Y!) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"DrawImageFX","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function DrawImageFX Lib \"gdiplus\" Alias \"GdipDrawImageFX\" (ByVal Me As GpGraphics, ByVal image As GpImage, source As GpRectF, ByVal xForm As GpMatrix, ByVal effect As GpEffect, ByVal imageAttributes As GpImageAttributes, ByVal srcUnit As GpUnit) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"DrawImageI","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function DrawImageI Lib \"gdiplus\" Alias \"GdipDrawImageI\" (ByVal Me As GpGraphics, ByVal Image As GpImage, ByVal X&, ByVal Y&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"DrawImageP","kind":"function","vis":"public","signature":"Function DrawImageP(ByVal image As GpImage, ByVal point As GpPointF) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawImagePI","kind":"function","vis":"public","signature":"Function DrawImagePI(ByVal image As GpImage, ByVal point As GpPoint) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawImagePointRect","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function DrawImagePointRect Lib \"gdiplus\" Alias \"GdipDrawImagePointRect\" (ByVal Me As GpGraphics, ByVal Image As GpImage, ByVal X!, ByVal Y!, ByVal srcx!, ByVal srcy!, ByVal srcwidth!, ByVal srcheight!, ByVal srcUnit As GpUnit) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"DrawImagePointRectI","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function DrawImagePointRectI Lib \"gdiplus\" Alias \"GdipDrawImagePointRectI\" (ByVal Me As GpGraphics, ByVal Image As GpImage, ByVal X&, ByVal Y&, ByVal srcx&, ByVal srcy&, ByVal srcwidth&, ByVal srcheight&, ByVal srcUnit As GpUnit) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"DrawImagePoints","kind":"function","vis":"public","signature":"Function DrawImagePoints(ByVal image As GpImage, destPoints() As GpPointF) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawImagePointsI","kind":"function","vis":"public","signature":"Function DrawImagePointsI(ByVal image As GpImage, destPoints() As GpPoint) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawImagePointsRect","kind":"function","vis":"public","signature":"Function DrawImagePointsRect(ByVal image As GpImage, destPoints() As GpPointF, ByVal srcx!, ByVal srcy!, ByVal srcwidth!, ByVal srcheight!, ByVal srcUnit As GpUnit, imageAttributes As GpImageAttributes, Optional ByVal callback As LongPtr, Optional ByVal callbackData As LongPtr) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawImagePointsRectI","kind":"function","vis":"public","signature":"Function DrawImagePointsRectI(ByVal image As GpImage, destPoints() As GpPoint, ByVal srcx&, ByVal srcy&, ByVal srcwidth&, ByVal srcheight&, ByVal srcUnit As GpUnit, imageAttributes As GpImageAttributes, Optional ByVal callback As LongPtr, Optional ByVal callbackData As LongPtr) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawImagePointsRectX","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function DrawImagePointsRectX Lib \"gdiplus\" Alias \"GdipDrawImagePointsRect\" (ByVal Me As GpGraphics, ByVal Image As GpImage, points As GpPointF, ByVal count&, ByVal srcx!, ByVal srcy!, ByVal srcwidth!, ByVal srcheight!, ByVal srcUnit As GpUnit, imageAttributes As GpImageAttributes, Optional ByVal callback As LongPtr = 0, Optional ByVal callbackData As LongPtr = 0) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"DrawImagePointsRectXI","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function DrawImagePointsRectXI Lib \"gdiplus\" Alias \"GdipDrawImagePointsRectI\" (ByVal Me As GpGraphics, ByVal Image As GpImage, dstpoints As GpPoint, ByVal count&, ByVal srcx&, ByVal srcy&, ByVal srcwidth&, ByVal srcheight&, ByVal srcUnit As GpUnit, ByVal imageAttributes As GpImageAttributes, Optional ByVal callback As LongPtr = 0, Optional ByVal callbackData As LongPtr = 0) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"DrawImagePointsX","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function DrawImagePointsX Lib \"gdiplus\" Alias \"GdipDrawImagePoints\" (ByVal Me As GpGraphics, ByVal Image As GpImage, dstpoints As GpPointF, ByVal count&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"DrawImagePointsXI","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function DrawImagePointsXI Lib \"gdiplus\" Alias \"GdipDrawImagePointsI\" (ByVal Me As GpGraphics, ByVal Image As GpImage, dstpoints As GpPoint, ByVal count&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"DrawImageRect","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function DrawImageRect Lib \"gdiplus\" Alias \"GdipDrawImageRect\" (ByVal Me As GpGraphics, ByVal Image As GpImage, ByVal X!, ByVal Y!, ByVal Width!, ByVal Height!) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"DrawImageRectI","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function DrawImageRectI Lib \"gdiplus\" Alias \"GdipDrawImageRectI\" (ByVal Me As GpGraphics, ByVal Image As GpImage, ByVal X&, ByVal Y&, ByVal Width&, ByVal Height&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"DrawImageRectR","kind":"function","vis":"public","signature":"Function DrawImageRectR(ByVal image As GpImage, ByVal rect As GpRectF) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawImageRectRI","kind":"function","vis":"public","signature":"Function DrawImageRectRI(ByVal image As GpImage, ByVal rect As GpRect) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawImageRectRect","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function DrawImageRectRect Lib \"gdiplus\" Alias \"GdipDrawImageRectRect\" (ByVal Me As GpGraphics, ByVal Image As GpImage, ByVal dstx!, ByVal dsty!, ByVal dstwidth!, ByVal dstheight!, ByVal srcx!, ByVal srcy!, ByVal SrcWidth!, ByVal SrcHeight!, ByVal srcUnit As GpUnit, ByVal imageAttributes As GpImageAttributes, Optional ByVal CallBack As LongPtr, Optional ByVal callbackData As LongPtr) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"DrawImageRectRectI","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function DrawImageRectRectI Lib \"gdiplus\" Alias \"GdipDrawImageRectRectI\" (ByVal Me As GpGraphics, ByVal Image As GpImage, ByVal dstx&, ByVal dsty&, ByVal dstwidth&, ByVal dstheight&, ByVal srcx&, ByVal srcy&, ByVal SrcWidth&, ByVal SrcHeight&, ByVal srcUnit As GpUnit, ByVal imageAttributes As GpImageAttributes, Optional ByVal CallBack As LongPtr = 0, Optional ByVal callbackData As LongPtr) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"DrawImageRectRectR","kind":"function","vis":"public","signature":"Function DrawImageRectRectR(ByVal image As GpImage, destRect As GpRectF, srcRect As GpRectF, ByVal srcUnit As GpUnit, ByVal imageAttributes As GpImageAttributes, Optional ByVal callback As LongPtr, Optional ByVal callbackData As LongPtr) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawImageRectRectRI","kind":"function","vis":"public","signature":"Function DrawImageRectRectRI(ByVal image As GpImage, destRect As GpRect, srcRect As GpRect, ByVal srcUnit As GpUnit, ByVal imageAttributes As GpImageAttributes, Optional ByVal callback As LongPtr, Optional ByVal callbackData As LongPtr) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawLine","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function DrawLine Lib \"gdiplus\" Alias \"GdipDrawLine\" (ByVal Me As GpGraphics, ByVal pen As GpPen, ByVal X1!, ByVal Y1!, ByVal X2!, ByVal Y2!) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"DrawLineI","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function DrawLineI Lib \"gdiplus\" Alias \"GdipDrawLineI\" (ByVal Me As GpGraphics, ByVal pen As GpPen, ByVal X1&, ByVal Y1&, ByVal X2&, ByVal Y2&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"DrawLineP","kind":"function","vis":"public","signature":"Function DrawLineP(ByVal pen As GpPen, ByVal pt1 As GpPointF, ByVal pt2 As GpPointF) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawLinePI","kind":"function","vis":"public","signature":"Function DrawLinePI(ByVal pen As GpPen, ByVal pt1 As GpPoint, ByVal pt2 As GpPoint) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawLineR","kind":"function","vis":"public","signature":"Function DrawLineR(ByVal pen As GpPen, rect As GpRectF) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawLineRI","kind":"function","vis":"public","signature":"Function DrawLineRI(ByVal pen As GpPen, rect As GpRect) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawLines","kind":"function","vis":"public","signature":"Function DrawLines(ByVal pen As GpPen, points() As GpPointF) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawLinesI","kind":"function","vis":"public","signature":"Function DrawLinesI(ByVal pen As GpPen, points() As GpPoint) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawLinesX","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function DrawLinesX Lib \"gdiplus\" Alias \"GdipDrawLines\" (ByVal Me As GpGraphics, ByVal pen As GpPen, points As GpPointF, ByVal count&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"DrawLinesXI","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function DrawLinesXI Lib \"gdiplus\" Alias \"GdipDrawLinesI\" (ByVal Me As GpGraphics, ByVal pen As GpPen, points As GpPoint, ByVal count&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"DrawPath","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function DrawPath Lib \"gdiplus\" Alias \"GdipDrawPath\" (ByVal Me As GpGraphics, ByVal pen As GpPen, ByVal Path As GpPath) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"DrawPie","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function DrawPie Lib \"gdiplus\" Alias \"GdipDrawPie\" (ByVal Me As GpGraphics, ByVal pen As GpPen, ByVal x!, ByVal y!, ByVal width!, ByVal height!, ByVal startAngle!, ByVal sweepAngle!) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"DrawPieI","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function DrawPieI Lib \"gdiplus\" Alias \"GdipDrawPieI\" (ByVal Me As GpGraphics, ByVal pen As GpPen, ByVal x&, ByVal y&, ByVal width&, ByVal height&, ByVal startAngle!, ByVal sweepAngle!) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"DrawPiePS","kind":"function","vis":"public","signature":"Function DrawPiePS(ByVal pen As GpPen, ByVal pt As GpPointF, ByVal size As GpSizeF, ByVal startAngle!, ByVal sweepAngle!) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawPiePSI","kind":"function","vis":"public","signature":"Function DrawPiePSI(ByVal pen As GpPen, ByVal pt As GpPoint, ByVal size As GpSize, ByVal startAngle!, ByVal sweepAngle!) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawPieR","kind":"function","vis":"public","signature":"Function DrawPieR(ByVal pen As GpPen, rect As GpRectF, ByVal startAngle!, ByVal sweepAngle!) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawPieRI","kind":"function","vis":"public","signature":"Function DrawPieRI(ByVal pen As GpPen, rect As GpRect, ByVal startAngle!, ByVal sweepAngle!) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawPolygon","kind":"function","vis":"public","signature":"Function DrawPolygon(ByVal pen As GpPen, points() As GpPointF) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawPolygonI","kind":"function","vis":"public","signature":"Function DrawPolygonI(ByVal pen As GpPen, points() As GpPoint) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawPolygonX","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function DrawPolygonX Lib \"gdiplus\" Alias \"GdipDrawPolygon\" (ByVal Me As GpGraphics, ByVal pen As GpPen, Points As GpPointF, ByVal count&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"DrawPolygonXI","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function DrawPolygonXI Lib \"gdiplus\" Alias \"GdipDrawPolygonI\" (ByVal Me As GpGraphics, ByVal pen As GpPen, Points As GpPoint, ByVal count&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"DrawRectangle","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function DrawRectangle Lib \"gdiplus\" Alias \"GdipDrawRectangle\" (ByVal Me As GpGraphics, ByVal pen As GpPen, ByVal X!, ByVal Y!, ByVal Width!, ByVal Height!) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"DrawRectangleI","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function DrawRectangleI Lib \"gdiplus\" Alias \"GdipDrawRectangleI\" (ByVal Me As GpGraphics, ByVal pen As GpPen, ByVal X&, ByVal Y&, ByVal Width&, ByVal Height&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"DrawRectanglePS","kind":"function","vis":"public","signature":"Function DrawRectanglePS(ByVal pen As GpPen, ByVal pt As GpPointF, ByVal size As GpSizeF) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawRectanglePSI","kind":"function","vis":"public","signature":"Function DrawRectanglePSI(ByVal pen As GpPen, ByVal pt As GpPoint, ByVal size As GpSize) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawRectangleR","kind":"function","vis":"public","signature":"Function DrawRectangleR(ByVal pen As GpPen, rect As GpRectF) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawRectangleRI","kind":"function","vis":"public","signature":"Function DrawRectangleRI(ByVal pen As GpPen, rect As GpRect) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawRectangles","kind":"function","vis":"public","signature":"Function DrawRectangles(ByVal pen As GpPen, rects() As GpRectF) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawRectanglesI","kind":"function","vis":"public","signature":"Function DrawRectanglesI(ByVal pen As GpPen, rects() As GpRect) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawRectanglesX","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function DrawRectanglesX Lib \"gdiplus\" Alias \"GdipDrawRectangles\" (ByVal Me As GpGraphics, ByVal pen As GpPen, rects As GpRectF, ByVal count&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"DrawRectanglesXI","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function DrawRectanglesXI Lib \"gdiplus\" Alias \"GdipDrawRectanglesI\" (ByVal Me As GpGraphics, ByVal pen As GpPen, rects As GpRect, ByVal count&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"DrawString","kind":"function","vis":"public","signature":"Function DrawString(ByVal str$, ByVal font As GpFont, layoutRect As GpRectF, ByVal stringFormat As GpStringFormat, ByVal brush As GpBrush) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawStringP","kind":"function","vis":"public","signature":"Function DrawStringP(ByVal str$, ByVal font As GpFont, ByVal origin As GpPointF, ByVal brush As GpBrush) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawStringPF","kind":"function","vis":"public","signature":"Function DrawStringPF(ByVal str$, ByVal font As GpFont, ByVal origin As GpPointF, ByVal format As GpStringFormat, ByVal brush As GpBrush) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawStringX","kind":"function","vis":"public","declare":true,"signature":"DeclareWide PtrSafe Function DrawStringX Lib \"gdiplus\" Alias \"GdipDrawString\" (ByVal Me As GpGraphics, ByVal str$, ByVal length&, ByVal font As GpFont, layoutRect As GpRectF, ByVal StringFormat As GpStringFormat, ByVal Brush As GpBrush) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"DrawStringXY","kind":"function","vis":"public","signature":"Function DrawStringXY(ByVal str$, ByVal font As GpFont, ByVal x!, ByVal y!, ByVal brush As GpBrush) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawStringXYF","kind":"function","vis":"public","signature":"Function DrawStringXYF(ByVal str$, ByVal font As GpFont, ByVal x!, ByVal y!, ByVal format As GpStringFormat, ByVal brush As GpBrush) As GpStatus","returnType":"GpStatus"}, + {"name":"EndContainer","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function EndContainer Lib \"gdiplus\" Alias \"GdipEndContainer\" (ByVal Me As GpGraphics, ByVal state&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"EnumerateMetafileDestPoint","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function EnumerateMetafileDestPoint Lib \"gdiplus\" Alias \"GdipEnumerateMetafileDestPoint\" (ByVal Me As GpGraphics, ByVal metafile As GpMetafile, destPoint As GpPointF, ByVal callback As EnumerateMetafileProc, callbackData As Any, ByVal imageAttributes As GpImageAttributes) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"EnumerateMetafileDestPointI","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function EnumerateMetafileDestPointI Lib \"gdiplus\" Alias \"GdipEnumerateMetafileDestPointI\" (ByVal Me As GpGraphics, ByVal metafile As GpMetafile, destPoint As GpPoint, ByVal callback As EnumerateMetafileProc, callbackData As Any, ByVal imageAttributes As GpImageAttributes) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"EnumerateMetafileDestPoints","kind":"function","vis":"public","signature":"Function EnumerateMetafileDestPoints(ByVal metafile As GpMetafile, destPoints() As GpPointF, ByVal callback As EnumerateMetafileProc, ByVal callbackData As LongPtr, ByVal imageAttributes As GpImageAttributes) As GpStatus","returnType":"GpStatus"}, + {"name":"EnumerateMetafileDestPointsI","kind":"function","vis":"public","signature":"Function EnumerateMetafileDestPointsI(ByVal metafile As GpMetafile, destPoints() As GpPoint, ByVal callback As EnumerateMetafileProc, ByVal callbackData As LongPtr, ByVal imageAttributes As GpImageAttributes) As GpStatus","returnType":"GpStatus"}, + {"name":"EnumerateMetafileDestPointsX","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function EnumerateMetafileDestPointsX Lib \"gdiplus\" Alias \"GdipEnumerateMetafileDestPoints\" (ByVal Me As GpGraphics, ByVal metafile As GpMetafile, destPoints As GpPointF, ByVal count&, ByVal callback As EnumerateMetafileProc, callbackData As Any, ByVal imageAttributes As GpImageAttributes) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"EnumerateMetafileDestPointsXI","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function EnumerateMetafileDestPointsXI Lib \"gdiplus\" Alias \"GdipEnumerateMetafileDestPointsI\" (ByVal Me As GpGraphics, ByVal metafile As GpMetafile, destPoints As GpPoint, ByVal count&, ByVal callback As EnumerateMetafileProc, callbackData As Any, ByVal imageAttributes As GpImageAttributes) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"EnumerateMetafileDestRect","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function EnumerateMetafileDestRect Lib \"gdiplus\" Alias \"GdipEnumerateMetafileDestRect\" (ByVal Me As GpGraphics, ByVal metafile As GpMetafile, destRect As GpRectF, ByVal callback As EnumerateMetafileProc, callbackData As Any, ByVal imageAttributes As GpImageAttributes) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"EnumerateMetafileDestRectI","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function EnumerateMetafileDestRectI Lib \"gdiplus\" Alias \"GdipEnumerateMetafileDestRectI\" (ByVal Me As GpGraphics, ByVal metafile As GpMetafile, destRect As GpRect, ByVal callback As EnumerateMetafileProc, callbackData As Any, ByVal imageAttributes As GpImageAttributes) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"EnumerateMetafileSrcRectDestPoint","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function EnumerateMetafileSrcRectDestPoint Lib \"gdiplus\" Alias \"GdipEnumerateMetafileSrcRectDestPoint\" (ByVal Me As GpGraphics, ByVal metafile As GpMetafile, destPoint As GpPointF, srcRECT As GpRectF, ByVal srcUnit As GpUnit, ByVal callback As EnumerateMetafileProc, callbackData As Any, ByVal imageAttributes As GpImageAttributes) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"EnumerateMetafileSrcRectDestPointI","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function EnumerateMetafileSrcRectDestPointI Lib \"gdiplus\" Alias \"GdipEnumerateMetafileSrcRectDestPointI\" (ByVal Me As GpGraphics, ByVal metafile As GpMetafile, destPoint As GpPoint, srcRECT As GpRect, ByVal srcUnit As GpUnit, ByVal callback As EnumerateMetafileProc, callbackData As Any, ByVal imageAttributes As GpImageAttributes) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"EnumerateMetafileSrcRectDestPoints","kind":"function","vis":"public","signature":"Function EnumerateMetafileSrcRectDestPoints(ByVal metafile As GpMetafile, destPoints() As GpPointF, srcRect As GpRectF, ByVal srcUnit As GpUnit, ByVal callback As EnumerateMetafileProc, ByVal callbackData As LongPtr, ByVal imageAttributes As GpImageAttributes) As GpStatus","returnType":"GpStatus"}, + {"name":"EnumerateMetafileSrcRectDestPointsI","kind":"function","vis":"public","signature":"Function EnumerateMetafileSrcRectDestPointsI(ByVal metafile As GpMetafile, destPoints() As GpPoint, srcRect As GpRect, ByVal srcUnit As GpUnit, ByVal callback As EnumerateMetafileProc, ByVal callbackData As LongPtr, ByVal imageAttributes As GpImageAttributes) As GpStatus","returnType":"GpStatus"}, + {"name":"EnumerateMetafileSrcRectDestPointsX","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function EnumerateMetafileSrcRectDestPointsX Lib \"gdiplus\" Alias \"GdipEnumerateMetafileSrcRectDestPoints\" (ByVal Me As GpGraphics, ByVal metafile As GpMetafile, destPoints As GpPointF, ByVal count&, srcRECT As GpRectF, ByVal srcUnit As GpUnit, ByVal callback As EnumerateMetafileProc, callbackData As Any, ByVal imageAttributes As GpImageAttributes) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"EnumerateMetafileSrcRectDestPointsXI","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function EnumerateMetafileSrcRectDestPointsXI Lib \"gdiplus\" Alias \"GdipEnumerateMetafileSrcRectDestPointsI\" (ByVal Me As GpGraphics, ByVal metafile As GpMetafile, destPoints As GpPoint, ByVal count&, srcRECT As GpRect, ByVal srcUnit As GpUnit, ByVal callback As EnumerateMetafileProc, callbackData As Any, ByVal imageAttributes As GpImageAttributes) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"EnumerateMetafileSrcRectDestRect","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function EnumerateMetafileSrcRectDestRect Lib \"gdiplus\" Alias \"GdipEnumerateMetafileSrcRectDestRect\" (ByVal Me As GpGraphics, ByVal metafile As GpMetafile, destRect As GpRectF, srcRECT As GpRectF, ByVal srcUnit As GpUnit, ByVal callback As EnumerateMetafileProc, callbackData As Any, ByVal imageAttributes As GpImageAttributes) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"EnumerateMetafileSrcRectDestRectI","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function EnumerateMetafileSrcRectDestRectI Lib \"gdiplus\" Alias \"GdipEnumerateMetafileSrcRectDestRectI\" (ByVal Me As GpGraphics, ByVal metafile As GpMetafile, destRect As GpRect, srcRECT As GpRect, ByVal srcUnit As GpUnit, ByVal callback As EnumerateMetafileProc, callbackData As Any, ByVal imageAttributes As GpImageAttributes) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"ExcludeClipR","kind":"function","vis":"public","signature":"Function ExcludeClipR(rect As GpRectF) As GpStatus","returnType":"GpStatus"}, + {"name":"ExcludeClipRI","kind":"function","vis":"public","signature":"Function ExcludeClipRI(rect As GpRect) As GpStatus","returnType":"GpStatus"}, + {"name":"ExcludeClipRegion","kind":"function","vis":"public","signature":"Function ExcludeClipRegion(ByVal region As GpRegion) As GpStatus","returnType":"GpStatus"}, + {"name":"FillClosedCurve","kind":"function","vis":"public","signature":"Function FillClosedCurve(ByVal brush As GpBrush, points() As GpPointF) As GpStatus","returnType":"GpStatus"}, + {"name":"FillClosedCurve2","kind":"function","vis":"public","signature":"Function FillClosedCurve2(ByVal brush As GpBrush, points() As GpPointF, ByVal fillMode As GpFillmode, ByVal tension! = 0.5) As GpStatus","returnType":"GpStatus"}, + {"name":"FillClosedCurve2I","kind":"function","vis":"public","signature":"Function FillClosedCurve2I(ByVal brush As GpBrush, points() As GpPoint, ByVal fillMode As GpFillmode, ByVal tension! = 0.5) As GpStatus","returnType":"GpStatus"}, + {"name":"FillClosedCurve2X","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function FillClosedCurve2X Lib \"gdiplus\" Alias \"GdipFillClosedCurve2\" (ByVal Me As GpGraphics, ByVal brush As GpBrush, Points As GpPointF, ByVal count&, ByVal tension!, ByVal fillMode As GpFillmode) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"FillClosedCurve2XI","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function FillClosedCurve2XI Lib \"gdiplus\" Alias \"GdipFillClosedCurve2I\" (ByVal Me As GpGraphics, ByVal brush As GpBrush, Points As GpPoint, ByVal count&, ByVal tension!, ByVal fillMode As GpFillmode) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"FillClosedCurveI","kind":"function","vis":"public","signature":"Function FillClosedCurveI(ByVal brush As GpBrush, points() As GpPoint) As GpStatus","returnType":"GpStatus"}, + {"name":"FillClosedCurveX","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function FillClosedCurveX Lib \"gdiplus\" Alias \"GdipFillClosedCurve\" (ByVal Me As GpGraphics, ByVal brush As GpBrush, Points As GpPointF, ByVal count&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"FillClosedCurveXI","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function FillClosedCurveXI Lib \"gdiplus\" Alias \"GdipFillClosedCurveI\" (ByVal Me As GpGraphics, ByVal brush As GpBrush, Points As GpPoint, ByVal count&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"FillEllipse","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function FillEllipse Lib \"gdiplus\" Alias \"GdipFillEllipse\" (ByVal Me As GpGraphics, ByVal Brush As GpBrush, ByVal X!, ByVal Y!, ByVal Width!, ByVal Height!) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"FillEllipseI","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function FillEllipseI Lib \"gdiplus\" Alias \"GdipFillEllipseI\" (ByVal Me As GpGraphics, ByVal Brush As GpBrush, ByVal X&, ByVal Y&, ByVal Width&, ByVal Height&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"FillEllipsePS","kind":"function","vis":"public","signature":"Function FillEllipsePS(ByVal brush As GpBrush, ByVal pt As GpPointF, ByVal size As GpSizeF) As GpStatus","returnType":"GpStatus"}, + {"name":"FillEllipsePSI","kind":"function","vis":"public","signature":"Function FillEllipsePSI(ByVal brush As GpBrush, ByVal pt As GpPoint, ByVal size As GpSize) As GpStatus","returnType":"GpStatus"}, + {"name":"FillEllipseR","kind":"function","vis":"public","signature":"Function FillEllipseR(ByVal brush As GpBrush, rect As GpRectF) As GpStatus","returnType":"GpStatus"}, + {"name":"FillEllipseRI","kind":"function","vis":"public","signature":"Function FillEllipseRI(ByVal brush As GpBrush, rect As GpRect) As GpStatus","returnType":"GpStatus"}, + {"name":"FillPath","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function FillPath Lib \"gdiplus\" Alias \"GdipFillPath\" (ByVal Me As GpGraphics, ByVal Brush As GpBrush, ByVal Path As GpPath) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"FillPie","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function FillPie Lib \"gdiplus\" Alias \"GdipFillPie\" (ByVal Me As GpGraphics, ByVal Brush As GpBrush, ByVal X!, ByVal Y!, ByVal Width!, ByVal Height!, ByVal startAngle!, ByVal sweepAngle!) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"FillPieI","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function FillPieI Lib \"gdiplus\" Alias \"GdipFillPieI\" (ByVal Me As GpGraphics, ByVal Brush As GpBrush, ByVal X&, ByVal Y&, ByVal Width&, ByVal Height&, ByVal startAngle!, ByVal sweepAngle!) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"FillPiePS","kind":"function","vis":"public","signature":"Function FillPiePS(ByVal brush As GpBrush, ByVal pt As GpPointF, ByVal size As GpSizeF, ByVal startAngle!, ByVal sweepAngle!) As GpStatus","returnType":"GpStatus"}, + {"name":"FillPiePSI","kind":"function","vis":"public","signature":"Function FillPiePSI(ByVal brush As GpBrush, ByVal pt As GpPoint, ByVal size As GpSize, ByVal startAngle!, ByVal sweepAngle!) As GpStatus","returnType":"GpStatus"}, + {"name":"FillPieR","kind":"function","vis":"public","signature":"Function FillPieR(ByVal brush As GpBrush, rect As GpRectF, ByVal startAngle!, ByVal sweepAngle!) As GpStatus","returnType":"GpStatus"}, + {"name":"FillPieRI","kind":"function","vis":"public","signature":"Function FillPieRI(ByVal brush As GpBrush, rect As GpRect, ByVal startAngle!, ByVal sweepAngle!) As GpStatus","returnType":"GpStatus"}, + {"name":"FillPolygon","kind":"function","vis":"public","signature":"Function FillPolygon(ByVal brush As GpBrush, points() As GpPointF, ByVal fillMode As GpFillmode = FillModeAlternate) As GpStatus","returnType":"GpStatus"}, + {"name":"FillPolygon2","kind":"function","vis":"public","signature":"Function FillPolygon2(ByVal brush As GpBrush, points() As GpPointF) As GpStatus","returnType":"GpStatus"}, + {"name":"FillPolygon2I","kind":"function","vis":"public","signature":"Function FillPolygon2I(ByVal brush As GpBrush, points() As GpPoint) As GpStatus","returnType":"GpStatus"}, + {"name":"FillPolygon2X","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function FillPolygon2X Lib \"gdiplus\" Alias \"GdipFillPolygon2\" (ByVal Me As GpGraphics, ByVal Brush As GpBrush, Points As GpPointF, ByVal count&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"FillPolygon2XI","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function FillPolygon2XI Lib \"gdiplus\" Alias \"GdipFillPolygon2I\" (ByVal Me As GpGraphics, ByVal Brush As GpBrush, Points As GpPoint, ByVal count&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"FillPolygonI","kind":"function","vis":"public","signature":"Function FillPolygonI(ByVal brush As GpBrush, points() As GpPoint, ByVal fillMode As GpFillmode = FillModeAlternate) As GpStatus","returnType":"GpStatus"}, + {"name":"FillPolygonX","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function FillPolygonX Lib \"gdiplus\" Alias \"GdipFillPolygon\" (ByVal Me As GpGraphics, ByVal Brush As GpBrush, Points As GpPointF, ByVal count&, ByVal fillMode As GpFillmode) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"FillPolygonXI","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function FillPolygonXI Lib \"gdiplus\" Alias \"GdipFillPolygonI\" (ByVal Me As GpGraphics, ByVal Brush As GpBrush, Points As GpPoint, ByVal count&, ByVal fillMode As GpFillmode) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"FillRectangle","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function FillRectangle Lib \"gdiplus\" Alias \"GdipFillRectangle\" (ByVal Me As GpGraphics, ByVal Brush As GpBrush, ByVal X!, ByVal Y!, ByVal Width!, ByVal Height!) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"FillRectangleI","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function FillRectangleI Lib \"gdiplus\" Alias \"GdipFillRectangleI\" (ByVal Me As GpGraphics, ByVal Brush As GpBrush, ByVal X&, ByVal Y&, ByVal Width&, ByVal Height&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"FillRectanglePS","kind":"function","vis":"public","signature":"Function FillRectanglePS(ByVal brush As GpBrush, ByVal pt As GpPointF, ByVal size As GpSizeF) As GpStatus","returnType":"GpStatus"}, + {"name":"FillRectanglePSI","kind":"function","vis":"public","signature":"Function FillRectanglePSI(ByVal brush As GpBrush, ByVal pt As GpPoint, ByVal size As GpSize) As GpStatus","returnType":"GpStatus"}, + {"name":"FillRectangleR","kind":"function","vis":"public","signature":"Function FillRectangleR(ByVal brush As GpBrush, rect As GpRectF) As GpStatus","returnType":"GpStatus"}, + {"name":"FillRectangleRI","kind":"function","vis":"public","signature":"Function FillRectangleRI(ByVal brush As GpBrush, rect As GpRect) As GpStatus","returnType":"GpStatus"}, + {"name":"FillRectangles","kind":"function","vis":"public","signature":"Function FillRectangles(ByVal brush As GpBrush, rect() As GpRectF) As GpStatus","returnType":"GpStatus"}, + {"name":"FillRectanglesI","kind":"function","vis":"public","signature":"Function FillRectanglesI(ByVal brush As GpBrush, rect() As GpRect) As GpStatus","returnType":"GpStatus"}, + {"name":"FillRectanglesX","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function FillRectanglesX Lib \"gdiplus\" Alias \"GdipFillRectangles\" (ByVal Me As GpGraphics, ByVal Brush As GpBrush, rects As GpRectF, ByVal count&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"FillRectanglesXI","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function FillRectanglesXI Lib \"gdiplus\" Alias \"GdipFillRectanglesI\" (ByVal Me As GpGraphics, ByVal Brush As GpBrush, rects As GpRect, ByVal count&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"FillRegion","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function FillRegion Lib \"gdiplus\" Alias \"GdipFillRegion\" (ByVal Me As GpGraphics, ByVal Brush As GpBrush, ByVal Region As GpRegion) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"Flush","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function Flush Lib \"gdiplus\" Alias \"GdipFlush\" (ByVal Me As GpGraphics, ByVal intention As GpFlushIntention) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetClip","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetClip Lib \"gdiplus\" Alias \"GdipGetClip\" (ByVal Me As GpGraphics, ByVal Region As GpRegion) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetClipBounds","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetClipBounds Lib \"gdiplus\" Alias \"GdipGetClipBounds\" (ByVal Me As GpGraphics, rect As GpRectF) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetClipBoundsI","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetClipBoundsI Lib \"gdiplus\" Alias \"GdipGetClipBoundsI\" (ByVal Me As GpGraphics, rect As GpRect) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetCompositingMode","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetCompositingMode Lib \"gdiplus\" Alias \"GdipGetCompositingMode\" (ByVal Me As GpGraphics, compositingMode As GpCompositingMode) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetCompositingQuality","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetCompositingQuality Lib \"gdiplus\" Alias \"GdipGetCompositingQuality\" (ByVal Me As GpGraphics, compositingQuality As GpCompositingQuality) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetDC","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetDC Lib \"gdiplus\" Alias \"GdipGetDC\" (ByVal Me As GpGraphics, hDC As LongPtr) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetDpiX","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetDpiX Lib \"gdiplus\" Alias \"GdipGetDpiX\" (ByVal Me As GpGraphics, dpi!) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetDpiY","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetDpiY Lib \"gdiplus\" Alias \"GdipGetDpiY\" (ByVal Me As GpGraphics, dpi!) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetImageGraphicsContext","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetImageGraphicsContext Lib \"gdiplus\" Alias \"GdipGetImageGraphicsContext\" (ByVal Image As GpImage, Graphics As GpGraphics) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetInterpolationMode","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetInterpolationMode Lib \"gdiplus\" Alias \"GdipGetInterpolationMode\" (ByVal Me As GpGraphics, interpolation As GpInterpolationMode) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetNearestColor","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetNearestColor Lib \"gdiplus\" Alias \"GdipGetNearestColor\" (ByVal Me As GpGraphics, argb As Color) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetPageScale","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetPageScale Lib \"gdiplus\" Alias \"GdipGetPageScale\" (ByVal Me As GpGraphics, scale!) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetPageUnit","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetPageUnit Lib \"gdiplus\" Alias \"GdipGetPageUnit\" (ByVal Me As GpGraphics, unit As GpUnit) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetPixelOffsetMode","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetPixelOffsetMode Lib \"gdiplus\" Alias \"GdipGetPixelOffsetMode\" (ByVal Me As GpGraphics, pixelOffsetMode As GpPixelOffsetMode) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetRenderingOrigin","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetRenderingOrigin Lib \"gdiplus\" Alias \"GdipGetRenderingOrigin\" (ByVal Me As GpGraphics, x&, y&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetRenderingOriginP","kind":"function","vis":"public","signature":"Function GetRenderingOriginP(pt As GpPoint) As GpStatus","returnType":"GpStatus"}, + {"name":"GetSmoothingMode","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetSmoothingMode Lib \"gdiplus\" Alias \"GdipGetSmoothingMode\" (ByVal Me As GpGraphics, smoothingMode As GpSmoothingMode) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetTextContrast","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetTextContrast Lib \"gdiplus\" Alias \"GdipGetTextContrast\" (ByVal Me As GpGraphics, contrast&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetTextRenderingHint","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetTextRenderingHint Lib \"gdiplus\" Alias \"GdipGetTextRenderingHint\" (ByVal Me As GpGraphics, mode As GpTextRenderingHint) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetTransform","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetTransform Lib \"gdiplus\" Alias \"GdipGetWorldTransform\" (ByVal Me As GpGraphics, ByVal matrix As GpMatrix) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetVisibleClipBounds","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetVisibleClipBounds Lib \"gdiplus\" Alias \"GdipGetVisibleClipBounds\" (ByVal Me As GpGraphics, rect As GpRectF) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetVisibleClipBoundsI","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetVisibleClipBoundsI Lib \"gdiplus\" Alias \"GdipGetVisibleClipBoundsI\" (ByVal Me As GpGraphics, rect As GpRect) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetWorldTransform","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetWorldTransform Lib \"gdiplus\" Alias \"GdipGetWorldTransform\" (ByVal Me As GpGraphics, ByVal matrix As GpMatrix) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"IntersectClipR","kind":"function","vis":"public","signature":"Function IntersectClipR(rect As GpRectF) As GpStatus","returnType":"GpStatus"}, + {"name":"IntersectClipRI","kind":"function","vis":"public","signature":"Function IntersectClipRI(rect As GpRect) As GpStatus","returnType":"GpStatus"}, + {"name":"IntersectClipRegion","kind":"function","vis":"public","signature":"Function IntersectClipRegion(ByVal region As GpRegion) As GpStatus","returnType":"GpStatus"}, + {"name":"IsClipEmpty","kind":"function","vis":"public","signature":"Function IsClipEmpty(result As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"IsClipEmpty2","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function IsClipEmpty2 Lib \"gdiplus\" Alias \"GdipIsClipEmpty\" (ByVal Me As GpGraphics, result As GDIP_BOOL) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"IsVisibleClipEmpty","kind":"function","vis":"public","signature":"Function IsVisibleClipEmpty(result As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"IsVisibleClipEmpty2","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function IsVisibleClipEmpty2 Lib \"gdiplus\" Alias \"GdipIsVisibleClipEmpty\" (ByVal Me As GpGraphics, result As GDIP_BOOL) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"IsVisiblePathPoint","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function IsVisiblePathPoint Lib \"gdiplus\" Alias \"GdipIsVisiblePathPoint\" (ByVal Region As GpRegion, ByVal X!, ByVal Y!, ByVal Graphics As GpGraphics, result As GDIP_BOOL) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"IsVisiblePoint","kind":"function","vis":"public","signature":"Function IsVisiblePoint(ByVal x!, ByVal y!, result As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"IsVisiblePointI","kind":"function","vis":"public","signature":"Function IsVisiblePointI(ByVal x&, ByVal y&, result As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"IsVisiblePointP","kind":"function","vis":"public","signature":"Function IsVisiblePointP(ByVal pt As GpPointF, result As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"IsVisiblePointPI","kind":"function","vis":"public","signature":"Function IsVisiblePointPI(ByVal pt As GpPoint, result As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"IsVisiblePointX","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function IsVisiblePointX Lib \"gdiplus\" Alias \"GdipIsVisiblePoint\" (ByVal Me As GpGraphics, ByVal X!, ByVal Y!, result As GDIP_BOOL) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"IsVisiblePointXI","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function IsVisiblePointXI Lib \"gdiplus\" Alias \"GdipIsVisiblePointI\" (ByVal Me As GpGraphics, ByVal X&, ByVal Y&, result As GDIP_BOOL) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"IsVisibleRect","kind":"function","vis":"public","signature":"Function IsVisibleRect(ByVal x!, ByVal y!, ByVal width!, ByVal height!, result As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"IsVisibleRectI","kind":"function","vis":"public","signature":"Function IsVisibleRectI(ByVal x&, ByVal y&, ByVal width&, ByVal height&, result As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"IsVisibleRectR","kind":"function","vis":"public","signature":"Function IsVisibleRectR(rect As GpRectF, result As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"IsVisibleRectRI","kind":"function","vis":"public","signature":"Function IsVisibleRectRI(rect As GpRect, result As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"IsVisibleRectX","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function IsVisibleRectX Lib \"gdiplus\" Alias \"GdipIsVisibleRect\" (ByVal Me As GpGraphics, ByVal X!, ByVal Y!, ByVal width!, ByVal height!, result As GDIP_BOOL) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"IsVisibleRectXI","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function IsVisibleRectXI Lib \"gdiplus\" Alias \"GdipIsVisibleRectI\" (ByVal Me As GpGraphics, ByVal X&, ByVal Y&, ByVal width&, ByVal height&, result As GDIP_BOOL) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"IsVisibleRegionPoint","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function IsVisibleRegionPoint Lib \"gdiplus\" Alias \"GdipIsVisibleRegionPoint\" (ByVal Region As GpRegion, ByVal X!, ByVal Y!, ByVal Graphics As GpGraphics, result As GDIP_BOOL) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"IsVisibleRegionPointI","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function IsVisibleRegionPointI Lib \"gdiplus\" Alias \"GdipIsVisibleRegionPointI\" (ByVal Region As GpRegion, ByVal X&, ByVal Y&, ByVal Graphics As GpGraphics, result As GDIP_BOOL) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"IsVisibleRegionRect","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function IsVisibleRegionRect Lib \"gdiplus\" Alias \"GdipIsVisibleRegionRect\" (ByVal Region As GpRegion, ByVal X!, ByVal Y!, ByVal width As Single, ByVal height As Single, ByVal Graphics As GpGraphics, result As GDIP_BOOL) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"IsVisibleRegionRectI","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function IsVisibleRegionRectI Lib \"gdiplus\" Alias \"GdipIsVisibleRegionRectI\" (ByVal Region As GpRegion, ByVal X&, ByVal Y&, ByVal width As Long, ByVal height As Long, ByVal Graphics As GpGraphics, result As GDIP_BOOL) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"MeasureCharacterRanges","kind":"function","vis":"public","signature":"Function MeasureCharacterRanges(ByVal str$, ByVal font As GpFont, layoutRect As GpRectF, ByVal stringFormat As GpStringFormat, regions() As GpRegion) As GpStatus","returnType":"GpStatus"}, + {"name":"MeasureCharacterRangesX","kind":"function","vis":"public","declare":true,"signature":"DeclareWide PtrSafe Function MeasureCharacterRangesX Lib \"gdiplus\" Alias \"GdipMeasureCharacterRanges\" (ByVal Me As GpGraphics, ByVal str$, ByVal length&, ByVal font As GpFont, layoutRect As GpRectF, ByVal StringFormat As GpStringFormat, ByVal regionCount&, regions As GpRegion) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"MeasureDriverGlyphPositions","kind":"function","vis":"public","signature":"Function MeasureDriverGlyphPositions(glyphs() As Integer, ByVal font As GpFont, positions() As GpPointF, ByVal flags As GpDriverStringOptions, ByVal matrix As GpMatrix, boundingBox As GpRectF) As GpStatus","returnType":"GpStatus"}, + {"name":"MeasureDriverGlyphs","kind":"function","vis":"public","signature":"Function MeasureDriverGlyphs(glyphs() As Integer, ByVal font As GpFont, ByVal position As GpPointF, ByVal flags As GpDriverStringOptions, ByVal matrix As GpMatrix, boundingBox As GpRectF) As GpStatus","returnType":"GpStatus"}, + {"name":"MeasureDriverString","kind":"function","vis":"public","signature":"Function MeasureDriverString(ByVal str$, ByVal font As GpFont, ByVal position As GpPointF, ByVal flags As GpDriverStringOptions, ByVal matrix As GpMatrix, boundingBox As GpRectF) As GpStatus","returnType":"GpStatus"}, + {"name":"MeasureDriverStringPositions","kind":"function","vis":"public","signature":"Function MeasureDriverStringPositions(ByVal str$, ByVal font As GpFont, positions() As GpPointF, ByVal flags As GpDriverStringOptions, ByVal matrix As GpMatrix, boundingBox As GpRectF) As GpStatus","returnType":"GpStatus"}, + {"name":"MeasureDriverStringX","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function MeasureDriverStringX Lib \"gdiplus\" Alias \"GdipMeasureDriverString\" (ByVal Me As GpGraphics, ByVal str As LongPtr, ByVal length&, ByVal font As GpFont, positions As GpPointF, ByVal flags&, ByVal matrix As GpMatrix, boundingBox As GpRectF) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"MeasureString","kind":"function","vis":"public","signature":"Function MeasureString(ByVal str$, ByVal font As GpFont, layoutRect As GpRectF, ByVal format As GpStringFormat, boundingBox As GpRectF, codepointsFitted&, linesFilled&) As GpStatus","returnType":"GpStatus"}, + {"name":"MeasureString2","kind":"function","vis":"public","signature":"Function MeasureString2(ByVal str$, ByVal font As GpFont, layoutRect As GpRectF, boundingBox As GpRectF) As GpStatus","returnType":"GpStatus"}, + {"name":"MeasureStringP","kind":"function","vis":"public","signature":"Function MeasureStringP(ByVal str$, ByVal font As GpFont, ByVal origin As GpPointF, ByVal format As GpStringFormat, boundingBox As GpRectF) As GpStatus","returnType":"GpStatus"}, + {"name":"MeasureStringP2","kind":"function","vis":"public","signature":"Function MeasureStringP2(ByVal str$, ByVal font As GpFont, ByVal origin As GpPointF, boundingBox As GpRectF) As GpStatus","returnType":"GpStatus"}, + {"name":"MeasureStringS","kind":"function","vis":"public","signature":"Function MeasureStringS(ByVal str$, ByVal font As GpFont, ByVal layoutSize As GpSizeF, ByVal format As GpStringFormat, size As GpSizeF, Optional codepointsFitted&, Optional linesFilled&) As GpStatus","returnType":"GpStatus"}, + {"name":"MeasureStringX","kind":"function","vis":"public","declare":true,"signature":"DeclareWide PtrSafe Function MeasureStringX Lib \"gdiplus\" Alias \"GdipMeasureString\" (ByVal Me As GpGraphics, ByVal str$, ByVal length&, ByVal font As GpFont, layoutRect As GpRectF, ByVal StringFormat As GpStringFormat, boundingBox As GpRectF, Optional codepointsFitted&, Optional linesFilled&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"MultiplyWorldTransform","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function MultiplyWorldTransform Lib \"gdiplus\" Alias \"GdipMultiplyWorldTransform\" (ByVal Me As GpGraphics, ByVal matrix As GpMatrix, ByVal order As GpMatrixOrder = MatrixOrderPrepend) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"PlayMetafileRecord","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function PlayMetafileRecord Lib \"gdiplus\" Alias \"GdipPlayMetafileRecord\" (ByVal metafile As GpMetafile, ByVal recordType As GpEmfPlusRecordType, ByVal flags&, ByVal dataSize&, data As Byte) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"ReleaseDC","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function ReleaseDC Lib \"gdiplus\" Alias \"GdipReleaseDC\" (ByVal Me As GpGraphics, ByVal hDC As LongPtr) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"ResetClip","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function ResetClip Lib \"gdiplus\" Alias \"GdipResetClip\" (ByVal Me As GpGraphics) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"ResetPageTransform","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function ResetPageTransform Lib \"gdiplus\" Alias \"GdipResetPageTransform\" (ByVal Me As GpGraphics) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"ResetWorldTransform","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function ResetWorldTransform Lib \"gdiplus\" Alias \"GdipResetWorldTransform\" (ByVal Me As GpGraphics) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"Restore","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function Restore Lib \"gdiplus\" Alias \"GdipRestoreGraphics\" (ByVal Me As GpGraphics, ByVal state&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"RotateTransform","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function RotateTransform Lib \"gdiplus\" Alias \"GdipRotateWorldTransform\" (ByVal Me As GpGraphics, ByVal angle!, ByVal order As GpMatrixOrder = MatrixOrderPrepend) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"RotateTransformAt","kind":"function","vis":"public","signature":"Function RotateTransformAt(ByVal angle!, ByVal center As GpPointF, ByVal order As GpMatrixOrder = MatrixOrderPrepend) As GpStatus","returnType":"GpStatus"}, + {"name":"RotateWorldTransform","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function RotateWorldTransform Lib \"gdiplus\" Alias \"GdipRotateWorldTransform\" (ByVal Me As GpGraphics, ByVal angle!, ByVal order As GpMatrixOrder = MatrixOrderPrepend) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"Save","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function Save Lib \"gdiplus\" Alias \"GdipSaveGraphics\" (ByVal Me As GpGraphics, state&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"ScaleWorldTransform","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function ScaleWorldTransform Lib \"gdiplus\" Alias \"GdipScaleWorldTransform\" (ByVal Me As GpGraphics, ByVal sx!, ByVal sy!, ByVal order As GpMatrixOrder = MatrixOrderPrepend) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetAbort","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetAbort Lib \"gdiplus\" Alias \"GdipGraphicsSetAbort\" (ByVal Me As GpGraphics, pIAbort As Any ) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}],"description":"⛔NOTE: This is not implemented in GdiPlus 1.0 and 1.1. This API is also a placeholder until tB supports no-vtable interfaces"}, + {"name":"SetClip","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetClip Lib \"gdiplus\" Alias \"GdipSetClipGraphics\" (ByVal Me As GpGraphics, ByVal srcgraphics As GpGraphics, ByVal combineMode As GpCombineMode) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetClipHrgn","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetClipHrgn Lib \"gdiplus\" Alias \"GdipSetClipHrgn\" (ByVal Me As GpGraphics, ByVal hRgn As LongPtr, ByVal combineMode As GpCombineMode) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetClipPath","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetClipPath Lib \"gdiplus\" Alias \"GdipSetClipPath\" (ByVal Me As GpGraphics, ByVal path As GpPath, ByVal combineMode As GpCombineMode) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetClipRect","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetClipRect Lib \"gdiplus\" Alias \"GdipSetClipRect\" (ByVal Me As GpGraphics, ByVal x!, ByVal y!, ByVal width!, ByVal height!, ByVal combineMode As GpCombineMode) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetClipRectI","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetClipRectI Lib \"gdiplus\" Alias \"GdipSetClipRectI\" (ByVal Me As GpGraphics, ByVal x&, ByVal y&, ByVal width&, ByVal height&, ByVal combineMode As GpCombineMode) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetClipRectR","kind":"function","vis":"public","signature":"Function SetClipRectR(rect As GpRectF, ByVal combineMode As GpCombineMode) As GpStatus","returnType":"GpStatus"}, + {"name":"SetClipRectRI","kind":"function","vis":"public","signature":"Function SetClipRectRI(rect As GpRect, ByVal combineMode As GpCombineMode) As GpStatus","returnType":"GpStatus"}, + {"name":"SetClipRegion","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetClipRegion Lib \"gdiplus\" Alias \"GdipSetClipRegion\" (ByVal Me As GpGraphics, ByVal Region As GpRegion, ByVal combineMode As GpCombineMode) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetCompositingMode","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetCompositingMode Lib \"gdiplus\" Alias \"GdipSetCompositingMode\" (ByVal Me As GpGraphics, ByVal compositingMode As GpCompositingMode) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetCompositingQuality","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetCompositingQuality Lib \"gdiplus\" Alias \"GdipSetCompositingQuality\" (ByVal Me As GpGraphics, ByVal compositingQuality As GpCompositingQuality) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetInterpolationMode","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetInterpolationMode Lib \"gdiplus\" Alias \"GdipSetInterpolationMode\" (ByVal Me As GpGraphics, ByVal interpolation As GpInterpolationMode) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetPageScale","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetPageScale Lib \"gdiplus\" Alias \"GdipSetPageScale\" (ByVal Me As GpGraphics, ByVal scale!) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetPageUnit","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetPageUnit Lib \"gdiplus\" Alias \"GdipSetPageUnit\" (ByVal Me As GpGraphics, ByVal unit As GpUnit) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetPixelOffsetMode","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetPixelOffsetMode Lib \"gdiplus\" Alias \"GdipSetPixelOffsetMode\" (ByVal Me As GpGraphics, ByVal pixelOffsetMode As GpPixelOffsetMode) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetRenderingOrigin","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetRenderingOrigin Lib \"gdiplus\" Alias \"GdipSetRenderingOrigin\" (ByVal Me As GpGraphics, ByVal x&, ByVal y&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetRenderingOriginP","kind":"function","vis":"public","signature":"Function SetRenderingOriginP(ByVal pt As GpPoint) As GpStatus","returnType":"GpStatus"}, + {"name":"SetSmoothingMode","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetSmoothingMode Lib \"gdiplus\" Alias \"GdipSetSmoothingMode\" (ByVal Me As GpGraphics, ByVal smoothingMode As GpSmoothingMode) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetTextContrast","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetTextContrast Lib \"gdiplus\" Alias \"GdipSetTextContrast\" (ByVal Me As GpGraphics, ByVal contrast&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetTextRenderingHint","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetTextRenderingHint Lib \"gdiplus\" Alias \"GdipSetTextRenderingHint\" (ByVal Me As GpGraphics, ByVal mode As GpTextRenderingHint) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetTransform","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetTransform Lib \"gdiplus\" Alias \"GdipSetWorldTransform\" (ByVal Me As GpGraphics, ByVal matrix As GpMatrix) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetWorldTransform","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetWorldTransform Lib \"gdiplus\" Alias \"GdipSetWorldTransform\" (ByVal Me As GpGraphics, ByVal matrix As GpMatrix) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"ShearTransform","kind":"function","vis":"public","signature":"Function ShearTransform(ByVal shearX!, ByVal shearY!, ByVal order As GpMatrixOrder = MatrixOrderPrepend) As GpStatus","returnType":"GpStatus"}, + {"name":"TransformPoints","kind":"function","vis":"public","signature":"Function TransformPoints(ByVal destSpace As GpCoordinateSpace, ByVal srcSpace As GpCoordinateSpace, pts As GpPointF()) As GpStatus","returnType":"GpStatus"}, + {"name":"TransformPointsI","kind":"function","vis":"public","signature":"Function TransformPointsI(ByVal destSpace As GpCoordinateSpace, ByVal srcSpace As GpCoordinateSpace, pts As GpPoint()) As GpStatus","returnType":"GpStatus"}, + {"name":"TransformPointsX","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function TransformPointsX Lib \"gdiplus\" Alias \"GdipTransformPoints\" (ByVal Me As GpGraphics, ByVal destSpace As GpCoordinateSpace, ByVal srcSpace As GpCoordinateSpace, points As GpPointF, ByVal count&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"TransformPointsXI","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function TransformPointsXI Lib \"gdiplus\" Alias \"GdipTransformPointsI\" (ByVal Me As GpGraphics, ByVal destSpace As GpCoordinateSpace, ByVal srcSpace As GpCoordinateSpace, points As GpPoint, ByVal count&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"TranslateClip","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function TranslateClip Lib \"gdiplus\" Alias \"GdipTranslateClip\" (ByVal Me As GpGraphics, ByVal dx!, ByVal dy!) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"TranslateClipI","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function TranslateClipI Lib \"gdiplus\" Alias \"GdipTranslateClipI\" (ByVal Me As GpGraphics, ByVal dx&, ByVal dy&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"TranslateClipP","kind":"function","vis":"public","signature":"Function TranslateClipP(ByVal delta As GpPointF) As GpStatus","returnType":"GpStatus"}, + {"name":"TranslateClipPI","kind":"function","vis":"public","signature":"Function TranslateClipPI(ByVal delta As GpPoint) As GpStatus","returnType":"GpStatus"}, + {"name":"TranslateTransform","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function TranslateTransform Lib \"gdiplus\" Alias \"GdipTranslateWorldTransform\" (ByVal Me As GpGraphics, ByVal Dx!, ByVal Dy!, ByVal order As GpMatrixOrder = MatrixOrderPrepend) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"TranslateWorldTransform","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function TranslateWorldTransform Lib \"gdiplus\" Alias \"GdipTranslateWorldTransform\" (ByVal Me As GpGraphics, ByVal Dx!, ByVal Dy!, ByVal order As GpMatrixOrder = MatrixOrderPrepend) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"TranslateWorldTransformP","kind":"function","vis":"public","signature":"Function TranslateWorldTransformP(ByVal pt As GpPointF, ByVal order As GpMatrixOrder = MatrixOrderPrepend) As GpStatus","returnType":"GpStatus"} + ] + }, + { + "name": "GraphicsCreationOptions", + "kind": "enum", + "in": "GdipGraphics", + "vis": "public", + "file": "GdiPlus/Graphics.twin", + "signature": "Enum GraphicsCreationOptions", + "attrs": [{"name":"Flags"}], + "values": [ + {"name":"Buffered"}, + {"name":"FromHWND"}, + {"name":"FromHDC"}, + {"name":"WithHDevice"}, + {"name":"WithICM"}, + {"name":"Unbuffered","value":"0"} + ] + }, + { + "name": "GraphicsFlags", + "kind": "enum", + "in": "GdipGraphics", + "vis": "public", + "file": "GdiPlus/Graphics.twin", + "signature": "Enum GraphicsFlags", + "attrs": [{"name":"Flags"}], + "values": [ + {"name":"LegacyTransparentDrawing"}, + {"name":"None","value":"0"} + ] + }, + { + "name": "GdipGraphicsPath", + "kind": "module", + "vis": "public", + "file": "GdiPlus/GraphicsPath.twin", + "signature": "Module GdipGraphicsPath", + "members": [ + {"name":"GraphicsPath","kind":"function","vis":"public","signature":"Function GraphicsPath(pathData As PathData, ByVal fillMode As GpFillmode = FillModeAlternate) As GraphicsPath","returnType":"GraphicsPath"}, + {"name":"GraphicsPath","kind":"function","vis":"public","signature":"Function GraphicsPath(typedPoints() As TypedPoint, ByVal fillMode As GpFillmode = FillModeAlternate) As GraphicsPath","returnType":"GraphicsPath"}, + {"name":"GraphicsPath","kind":"function","vis":"public","signature":"Function GraphicsPath(ByVal fillMode As GpFillmode = FillModeAlternate) As GraphicsPath","returnType":"GraphicsPath"}, + {"name":"GraphicsPath","kind":"function","vis":"public","signature":"Function GraphicsPath(points() As GpPointF, types() As PathPointType, ByVal fillMode As GpFillmode = FillModeAlternate) As GraphicsPath","returnType":"GraphicsPath"}, + {"name":"GraphicsPath","kind":"function","vis":"public","signature":"Function GraphicsPath(points() As GpPoint, types() As PathPointType, ByVal fillMode As GpFillmode = FillModeAlternate) As GraphicsPath","returnType":"GraphicsPath"} + ] + }, + { + "name": "GpPath", + "kind": "type", + "in": "GdipGraphicsPath", + "vis": "public", + "file": "GdiPlus/GraphicsPath.twin", + "signature": "Type GpPath", + "fields": [ + {"name":"Native","vis":"public","signature":"Native As LongPtr"} + ], + "members": [ + {"name":"AddArc","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function AddArc Lib \"gdiplus\" Alias \"GdipAddPathArc\" (ByVal Me As GpPath, ByVal X!, ByVal Y!, ByVal Width!, ByVal Height!, ByVal startAngle!, ByVal sweepAngle!) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"AddArcI","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function AddArcI Lib \"gdiplus\" Alias \"GdipAddPathArcI\" (ByVal Me As GpPath, ByVal X&, ByVal Y&, ByVal Width&, ByVal Height&, ByVal startAngle!, ByVal sweepAngle!) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"AddArcR","kind":"function","vis":"public","signature":"Function AddArcR(rect As GpRectF, ByVal startAngle!, ByVal sweepAngle!) As GpStatus","returnType":"GpStatus"}, + {"name":"AddArcRI","kind":"function","vis":"public","signature":"Function AddArcRI(rect As GpRect, ByVal startAngle!, ByVal sweepAngle!) As GpStatus","returnType":"GpStatus"}, + {"name":"AddBezier","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function AddBezier Lib \"gdiplus\" Alias \"GdipAddPathBezier\" (ByVal Me As GpPath, ByVal x1!, ByVal y1!, ByVal x2!, ByVal y2!, ByVal x3!, ByVal y3!, ByVal x4!, ByVal y4!) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"AddBezierI","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function AddBezierI Lib \"gdiplus\" Alias \"GdipAddPathBezierI\" (ByVal Me As GpPath, ByVal x1&, ByVal y1&, ByVal x2&, ByVal y2&, ByVal x3&, ByVal y3&, ByVal x4&, ByVal y4&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"AddBezierP","kind":"function","vis":"public","signature":"Function AddBezierP(ByVal pt1 As GpPointF, ByVal pt2 As GpPointF, ByVal pt3 As GpPointF, ByVal pt4 As GpPointF) As GpStatus","returnType":"GpStatus"}, + {"name":"AddBezierPI","kind":"function","vis":"public","signature":"Function AddBezierPI(ByVal pt1 As GpPoint, ByVal pt2 As GpPoint, ByVal pt3 As GpPoint, ByVal pt4 As GpPoint) As GpStatus","returnType":"GpStatus"}, + {"name":"AddBeziers","kind":"function","vis":"public","signature":"Function AddBeziers(points() As GpPointF) As GpStatus","returnType":"GpStatus"}, + {"name":"AddBeziers2","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function AddBeziers2 Lib \"gdiplus\" Alias \"GdipAddPathBeziers\" (ByVal Me As GpPath, Points As GpPointF, ByVal count&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"AddBeziers2I","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function AddBeziers2I Lib \"gdiplus\" Alias \"GdipAddPathBeziersI\" (ByVal Me As GpPath, Points As GpPoint, ByVal count&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"AddBeziersI","kind":"function","vis":"public","signature":"Function AddBeziersI(points() As GpPoint) As GpStatus","returnType":"GpStatus"}, + {"name":"AddClosedCurve","kind":"function","vis":"public","signature":"Function AddClosedCurve(points() As GpPointF) As GpStatus","returnType":"GpStatus"}, + {"name":"AddClosedCurve2","kind":"function","vis":"public","signature":"Function AddClosedCurve2(points() As GpPointF, ByVal tension!) As GpStatus","returnType":"GpStatus"}, + {"name":"AddClosedCurve2I","kind":"function","vis":"public","signature":"Function AddClosedCurve2I(points() As GpPoint, ByVal tension!) As GpStatus","returnType":"GpStatus"}, + {"name":"AddClosedCurveI","kind":"function","vis":"public","signature":"Function AddClosedCurveI(points() As GpPoint) As GpStatus","returnType":"GpStatus"}, + {"name":"AddClosedCurveX1","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function AddClosedCurveX1 Lib \"gdiplus\" Alias \"GdipAddPathClosedCurve\" (ByVal Me As GpPath, Points As GpPointF, ByVal count&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"AddClosedCurveX1I","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function AddClosedCurveX1I Lib \"gdiplus\" Alias \"GdipAddPathClosedCurveI\" (ByVal Me As GpPath, Points As GpPoint, ByVal count&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"AddClosedCurveX2","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function AddClosedCurveX2 Lib \"gdiplus\" Alias \"GdipAddPathClosedCurve2\" (ByVal Me As GpPath, Points As GpPointF, ByVal count&, ByVal tension!) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"AddClosedCurveX2I","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function AddClosedCurveX2I Lib \"gdiplus\" Alias \"GdipAddPathClosedCurve2I\" (ByVal Me As GpPath, Points As GpPoint, ByVal count&, ByVal tension!) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"AddCurve","kind":"function","vis":"public","signature":"Function AddCurve(points() As GpPointF) As GpStatus","returnType":"GpStatus"}, + {"name":"AddCurve2","kind":"function","vis":"public","signature":"Function AddCurve2(points() As GpPointF, ByVal tension!) As GpStatus","returnType":"GpStatus"}, + {"name":"AddCurve2I","kind":"function","vis":"public","signature":"Function AddCurve2I(points() As GpPoint, ByVal tension!) As GpStatus","returnType":"GpStatus"}, + {"name":"AddCurve3","kind":"function","vis":"public","signature":"Function AddCurve3(points() As GpPointF, ByVal offset&, ByVal numberOfSegments&, ByVal tension!) As GpStatus","returnType":"GpStatus"}, + {"name":"AddCurve3I","kind":"function","vis":"public","signature":"Function AddCurve3I(points() As GpPoint, ByVal offset&, ByVal numberOfSegments&, ByVal tension!) As GpStatus","returnType":"GpStatus"}, + {"name":"AddCurveI","kind":"function","vis":"public","signature":"Function AddCurveI(points() As GpPoint) As GpStatus","returnType":"GpStatus"}, + {"name":"AddCurveX1","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function AddCurveX1 Lib \"gdiplus\" Alias \"GdipAddPathCurve\" (ByVal Me As GpPath, Points As GpPointF, ByVal count&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"AddCurveX1I","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function AddCurveX1I Lib \"gdiplus\" Alias \"GdipAddPathCurveI\" (ByVal Me As GpPath, Points As GpPoint, ByVal count&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"AddCurveX2","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function AddCurveX2 Lib \"gdiplus\" Alias \"GdipAddPathCurve2\" (ByVal Me As GpPath, Points As GpPointF, ByVal count&, ByVal tension!) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"AddCurveX2I","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function AddCurveX2I Lib \"gdiplus\" Alias \"GdipAddPathCurve2I\" (ByVal Me As GpPath, Points As GpPoint, ByVal count&, ByVal tension!) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"AddCurveX3","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function AddCurveX3 Lib \"gdiplus\" Alias \"GdipAddPathCurve3\" (ByVal Me As GpPath, Points As GpPointF, ByVal count&, ByVal offset&, ByVal numberOfSegments&, ByVal tension!) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"AddCurveX3I","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function AddCurveX3I Lib \"gdiplus\" Alias \"GdipAddPathCurve3I\" (ByVal Me As GpPath, Points As GpPoint, ByVal count&, ByVal offset&, ByVal numberOfSegments&, ByVal tension!) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"AddEllipse","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function AddEllipse Lib \"gdiplus\" Alias \"GdipAddPathEllipse\" (ByVal Me As GpPath, ByVal X!, ByVal Y!, ByVal Width!, ByVal Height!) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"AddEllipseI","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function AddEllipseI Lib \"gdiplus\" Alias \"GdipAddPathEllipseI\" (ByVal Me As GpPath, ByVal X&, ByVal Y&, ByVal Width&, ByVal Height&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"AddEllipseR","kind":"function","vis":"public","signature":"Function AddEllipseR(rect As GpRectF) As GpStatus","returnType":"GpStatus"}, + {"name":"AddEllipseRI","kind":"function","vis":"public","signature":"Function AddEllipseRI(rect As GpRect) As GpStatus","returnType":"GpStatus"}, + {"name":"AddLine","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function AddLine Lib \"gdiplus\" Alias \"GdipAddPathLine\" (ByVal Me As GpPath, ByVal X1!, ByVal Y1!, ByVal X2!, ByVal Y2!) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"AddLineI","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function AddLineI Lib \"gdiplus\" Alias \"GdipAddPathLineI\" (ByVal Me As GpPath, ByVal X1&, ByVal Y1&, ByVal X2&, ByVal Y2&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"AddLineP","kind":"function","vis":"public","signature":"Function AddLineP(ByVal pt1 As GpPointF, ByVal pt2 As GpPointF) As GpStatus","returnType":"GpStatus"}, + {"name":"AddLinePI","kind":"function","vis":"public","signature":"Function AddLinePI(ByVal pt1 As GpPoint, ByVal pt2 As GpPoint) As GpStatus","returnType":"GpStatus"}, + {"name":"AddLines","kind":"function","vis":"public","signature":"Function AddLines(points() As GpPointF) As GpStatus","returnType":"GpStatus"}, + {"name":"AddLines2","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function AddLines2 Lib \"gdiplus\" Alias \"GdipAddPathLine2\" (ByVal Me As GpPath, Points As GpPointF, ByVal count&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"AddLines2I","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function AddLines2I Lib \"gdiplus\" Alias \"GdipAddPathLine2I\" (ByVal Me As GpPath, Points As GpPoint, ByVal count&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"AddLinesI","kind":"function","vis":"public","signature":"Function AddLinesI(points() As GpPoint) As GpStatus","returnType":"GpStatus"}, + {"name":"AddPath","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function AddPath Lib \"gdiplus\" Alias \"GdipAddPathPath\" (ByVal Me As GpPath, ByVal addingPath As GpPath, ByVal bConnect&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"AddPie","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function AddPie Lib \"gdiplus\" Alias \"GdipAddPathPie\" (ByVal Me As GpPath, ByVal X!, ByVal Y!, ByVal Width!, ByVal Height!, ByVal startAngle!, ByVal sweepAngle!) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"AddPieI","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function AddPieI Lib \"gdiplus\" Alias \"GdipAddPathPieI\" (ByVal Me As GpPath, ByVal X&, ByVal Y&, ByVal Width&, ByVal Height&, ByVal startAngle!, ByVal sweepAngle!) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"AddPieR","kind":"function","vis":"public","signature":"Function AddPieR(rect As GpRectF, ByVal startAngle!, ByVal sweepAngle!) As GpStatus","returnType":"GpStatus"}, + {"name":"AddPieRI","kind":"function","vis":"public","signature":"Function AddPieRI(rect As GpRect, ByVal startAngle!, ByVal sweepAngle!) As GpStatus","returnType":"GpStatus"}, + {"name":"AddPolygon","kind":"function","vis":"public","signature":"Function AddPolygon(points() As GpPointF) As GpStatus","returnType":"GpStatus"}, + {"name":"AddPolygon2","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function AddPolygon2 Lib \"gdiplus\" Alias \"GdipAddPathPolygon\" (ByVal Me As GpPath, Points As GpPointF, ByVal count&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"AddPolygon2I","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function AddPolygon2I Lib \"gdiplus\" Alias \"GdipAddPathPolygonI\" (ByVal Me As GpPath, Points As GpPoint, ByVal count&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"AddPolygonI","kind":"function","vis":"public","signature":"Function AddPolygonI(points() As GpPoint) As GpStatus","returnType":"GpStatus"}, + {"name":"AddRectangle","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function AddRectangle Lib \"gdiplus\" Alias \"GdipAddPathRectangle\" (ByVal Me As GpPath, ByVal X!, ByVal Y!, ByVal Width!, ByVal Height!) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"AddRectangleI","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function AddRectangleI Lib \"gdiplus\" Alias \"GdipAddPathRectangleI\" (ByVal Me As GpPath, ByVal X&, ByVal Y&, ByVal Width&, ByVal Height&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"AddRectangleR","kind":"function","vis":"public","signature":"Function AddRectangleR(rect As GpRectF) As GpStatus","returnType":"GpStatus"}, + {"name":"AddRectangleRI","kind":"function","vis":"public","signature":"Function AddRectangleRI(rect As GpRect) As GpStatus","returnType":"GpStatus"}, + {"name":"AddRectangles","kind":"function","vis":"public","signature":"Function AddRectangles(rects() As GpRectF) As GpStatus","returnType":"GpStatus"}, + {"name":"AddRectangles2","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function AddRectangles2 Lib \"gdiplus\" Alias \"GdipAddPathRectangles\" (ByVal Me As GpPath, rects As GpRectF, ByVal count&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"AddRectangles2I","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function AddRectangles2I Lib \"gdiplus\" Alias \"GdipAddPathRectanglesI\" (ByVal Me As GpPath, rects As GpRect, ByVal count&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"AddRectanglesI","kind":"function","vis":"public","signature":"Function AddRectanglesI(rects() As GpRect) As GpStatus","returnType":"GpStatus"}, + {"name":"AddString","kind":"function","vis":"public","signature":"Function AddString(ByVal string$, family As GpFontFamily, ByVal style&, ByVal emSize!, ByVal origin As GpPointF, format As GpStringFormat) As GpStatus","returnType":"GpStatus"}, + {"name":"AddString2","kind":"function","vis":"public","signature":"Function AddString2(ByVal string$, family As GpFontFamily, ByVal style&, ByVal emSize!, layoutRect As GpRectF, format As GpStringFormat) As GpStatus","returnType":"GpStatus"}, + {"name":"AddString2I","kind":"function","vis":"public","signature":"Function AddString2I(ByVal string$, family As GpFontFamily, ByVal style&, ByVal emSize!, layoutRect As GpRect, format As GpStringFormat) As GpStatus","returnType":"GpStatus"}, + {"name":"AddStringI","kind":"function","vis":"public","signature":"Function AddStringI(ByVal string$, family As GpFontFamily, ByVal style&, ByVal emSize!, ByVal origin As GpPoint, format As GpStringFormat) As GpStatus","returnType":"GpStatus"}, + {"name":"AddStringX","kind":"function","vis":"public","declare":true,"signature":"DeclareWide PtrSafe Function AddStringX Lib \"gdiplus\" Alias \"GdipAddPathString\" (ByVal Me As GpPath, ByVal str$, ByVal length&, ByVal family As GpFontFamily, ByVal style&, ByVal emSize!, layoutRect As GpRectF, ByVal StringFormat As GpStringFormat) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"AddStringXI","kind":"function","vis":"public","declare":true,"signature":"DeclareWide PtrSafe Function AddStringXI Lib \"gdiplus\" Alias \"GdipAddPathStringI\" (ByVal Me As GpPath, ByVal str$, ByVal length&, ByVal family As GpFontFamily, ByVal style&, ByVal emSize!, layoutRect As GpRect, ByVal StringFormat As GpStringFormat) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"ClearMarkers","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function ClearMarkers Lib \"gdiplus\" Alias \"GdipClearPathMarkers\" (ByVal Me As GpPath) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"Clone","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function Clone Lib \"gdiplus\" Alias \"GdipClonePath\" (ByVal Me As GpPath, clonePath As GpPath) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"CloseFigure","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function CloseFigure Lib \"gdiplus\" Alias \"GdipClosePathFigure\" (ByVal Me As GpPath) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"CloseFigures","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function CloseFigures Lib \"gdiplus\" Alias \"GdipClosePathFigures\" (ByVal Me As GpPath) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"Create","kind":"function","vis":"public","signature":"Function Create(ByVal brushmode As GpFillmode) As GpStatus","returnType":"GpStatus"}, + {"name":"Create","kind":"function","vis":"public","signature":"Function Create(pathData As PathData, ByVal fillMode As GpFillmode = FillModeAlternate) As GpStatus","returnType":"GpStatus"}, + {"name":"Create","kind":"function","vis":"public","signature":"Function Create(typedPoints() As TypedPoint, ByVal fillMode As GpFillmode = FillModeAlternate) As GpStatus","returnType":"GpStatus"}, + {"name":"Create","kind":"function","vis":"public","signature":"Function Create(points() As GpPointF, types() As PathPointType, ByVal fillMode As GpFillmode = FillModeAlternate) As GpStatus","returnType":"GpStatus"}, + {"name":"Create","kind":"function","vis":"public","signature":"Function Create(points As GpPointF, types As PathPointType, ByVal count&, ByVal fillMode As GpFillmode = FillModeAlternate) As GpStatus","returnType":"GpStatus"}, + {"name":"Create","kind":"function","vis":"public","signature":"Function Create(points() As GpPoint, types() As PathPointType, ByVal fillMode As GpFillmode = FillModeAlternate) As GpStatus","returnType":"GpStatus"}, + {"name":"Create","kind":"function","vis":"public","signature":"Function Create(points As GpPoint, types As PathPointType, ByVal count&, ByVal fillMode As GpFillmode = FillModeAlternate) As GpStatus","returnType":"GpStatus"}, + {"name":"CreateInto","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function CreateInto Lib \"gdiplus\" Alias \"GdipCreatePath\" (ByVal brushmode As GpFillmode, Path As GpPath) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"CreateInto","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function CreateInto Lib \"gdiplus\" Alias \"GdipCreatePath2\" (pt As GpPointF, bt As Any, int As Long, ByVal fillmode As GpFillmode, Path As GpPath) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"CreateIntoI","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function CreateIntoI Lib \"gdiplus\" Alias \"GdipCreatePath2I\" (pt As GpPoint, bt As Any, int As Long, ByVal fillmode As GpFillmode, Path As GpPath) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"Delete","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function Delete Lib \"gdiplus\" Alias \"GdipDeletePath\" (ByVal Me As GpPath) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"Flatten","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function Flatten Lib \"gdiplus\" Alias \"GdipFlattenPath\" (ByVal Me As GpPath, ByVal matrix As GpMatrix, Optional ByVal flatness! = 0.25) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetData","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetData Lib \"gdiplus\" Alias \"GdipGetPathData\" (ByVal Me As GpPath, pathData As GpPathData) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetFillMode","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetFillMode Lib \"gdiplus\" Alias \"GdipGetPathFillMode\" (ByVal Me As GpPath, fillmode As GpFillmode) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetPathLastPoint","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetPathLastPoint Lib \"gdiplus\" Alias \"GdipGetPathLastPoint\" (ByVal Me As GpPath, lastPoint As GpPointF) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetPointCount","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetPointCount Lib \"gdiplus\" Alias \"GdipGetPointCount\" (ByVal Me As GpPath, count&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetPoints","kind":"function","vis":"public","signature":"Function GetPoints(points() As GpPointF) As GpStatus","returnType":"GpStatus"}, + {"name":"GetPoints2","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetPoints2 Lib \"gdiplus\" Alias \"GdipGetPathPoints\" (ByVal Me As GpPath, Points As GpPointF, ByVal count&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetPoints2I","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetPoints2I Lib \"gdiplus\" Alias \"GdipGetPathPointsI\" (ByVal Me As GpPath, Points As GpPoint, ByVal count&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetPointsI","kind":"function","vis":"public","signature":"Function GetPointsI(points() As GpPoint) As GpStatus","returnType":"GpStatus"}, + {"name":"GetTypes","kind":"function","vis":"public","signature":"Function GetTypes(types() As PathPointType) As GpStatus","returnType":"GpStatus"}, + {"name":"GetTypes2","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetTypes2 Lib \"gdiplus\" Alias \"GdipGetPathTypes\" (ByVal Me As GpPath, types As Any, ByVal count&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetWorldBounds","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetWorldBounds Lib \"gdiplus\" Alias \"GdipGetPathWorldBounds\" (ByVal Me As GpPath, bounds As GpRectF, ByVal matrix As GpMatrix, ByVal pen As GpPen) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetWorldBoundsI","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetWorldBoundsI Lib \"gdiplus\" Alias \"GdipGetPathWorldBoundsI\" (ByVal Me As GpPath, bounds As GpRect, ByVal matrix As GpMatrix, ByVal pen As GpPen) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"IsOutlineVisible","kind":"function","vis":"public","signature":"Function IsOutlineVisible(ByVal x!, ByVal y!, pen As GpPen, gr As GpGraphics, result As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"IsOutlineVisibleI","kind":"function","vis":"public","signature":"Function IsOutlineVisibleI(ByVal x&, ByVal y&, pen As GpPen, gr As GpGraphics, result As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"IsOutlineVisibleP","kind":"function","vis":"public","signature":"Function IsOutlineVisibleP(ByVal pt As GpPointF, pen As GpPen, gr As GpGraphics, result As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"IsOutlineVisiblePI","kind":"function","vis":"public","signature":"Function IsOutlineVisiblePI(ByVal pt As GpPoint, pen As GpPen, gr As GpGraphics, result As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"IsOutlineVisiblePoint","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function IsOutlineVisiblePoint Lib \"gdiplus\" Alias \"GdipIsOutlineVisiblePathPoint\" (ByVal Me As GpPath, ByVal X!, ByVal Y!, ByVal pen As GpPen, ByVal Graphics As GpGraphics, result As GDIP_BOOL) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"IsOutlineVisiblePointI","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function IsOutlineVisiblePointI Lib \"gdiplus\" Alias \"GdipIsOutlineVisiblePathPointI\" (ByVal Me As GpPath, ByVal X&, ByVal Y&, ByVal pen As GpPen, ByVal Graphics As GpGraphics, result As GDIP_BOOL) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"IsVisible","kind":"function","vis":"public","signature":"Function IsVisible(ByVal x!, ByVal y!, ByVal g As GpGraphics, result As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"IsVisibleI","kind":"function","vis":"public","signature":"Function IsVisibleI(ByVal x&, ByVal y&, ByVal g As GpGraphics, result As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"IsVisibleP","kind":"function","vis":"public","signature":"Function IsVisibleP(ByVal point As GpPointF, ByVal g As GpGraphics, result As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"IsVisiblePI","kind":"function","vis":"public","signature":"Function IsVisiblePI(ByVal point As GpPoint, ByVal g As GpGraphics, result As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"IsVisiblePoint","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function IsVisiblePoint Lib \"gdiplus\" Alias \"GdipIsVisiblePathPoint\" (ByVal Me As GpPath, ByVal X!, ByVal Y!, ByVal Graphics As GpGraphics, result As GDIP_BOOL) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"IsVisiblePointI","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function IsVisiblePointI Lib \"gdiplus\" Alias \"GdipIsVisiblePathPointI\" (ByVal Me As GpPath, ByVal X&, ByVal Y&, ByVal Graphics As GpGraphics, result As GDIP_BOOL) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"Outline","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function Outline Lib \"gdiplus\" Alias \"GdipWindingModeOutline\" (ByVal Me As GpPath, ByVal matrix As GpMatrix, Optional ByVal flatness! = 0.25) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"Reset","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function Reset Lib \"gdiplus\" Alias \"GdipResetPath\" (ByVal Me As GpPath) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"Reverse","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function Reverse Lib \"gdiplus\" Alias \"GdipReversePath\" (ByVal Me As GpPath) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetFillMode","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetFillMode Lib \"gdiplus\" Alias \"GdipSetPathFillMode\" (ByVal Me As GpPath, ByVal fillmode As GpFillmode) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetMarker","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetMarker Lib \"gdiplus\" Alias \"GdipSetPathMarker\" (ByVal Me As GpPath) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"StartFigure","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function StartFigure Lib \"gdiplus\" Alias \"GdipStartPathFigure\" (ByVal Me As GpPath) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"Transform","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function Transform Lib \"gdiplus\" Alias \"GdipTransformPath\" (ByVal Me As GpPath, ByVal matrix As GpMatrix) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"Warp","kind":"function","vis":"public","signature":"Function Warp(destPoints() As GpPointF, ByVal srcx!, ByVal srcy!, ByVal srcwidth!, ByVal srcheight!, matrix As GpMatrix, Optional warpMode As GpWarpMode = WarpModePerspective, Optional flatness! = FlatnessDefault) As GpStatus","returnType":"GpStatus"}, + {"name":"Warp2","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function Warp2 Lib \"gdiplus\" Alias \"GdipWarpPath\" (ByVal Me As GpPath, ByVal matrix As GpMatrix, points As GpPointF, ByVal count&, ByVal srcx!, ByVal srcy!, ByVal srcwidth!, ByVal srcheight!, ByVal warpMode As GpWarpMode, ByVal flatness!) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"WarpR","kind":"function","vis":"public","signature":"Function WarpR(destPoints() As GpPointF, srcRect As GpRectF, matrix As GpMatrix, Optional warpMode As GpWarpMode = WarpModePerspective, Optional flatness! = FlatnessDefault) As GpStatus","returnType":"GpStatus"}, + {"name":"Widen","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function Widen Lib \"gdiplus\" Alias \"GdipWidenPath\" (ByVal Me As GpPath, ByVal pen As GpPen, ByVal matrix As GpMatrix, Optional ByVal flatness! = 0.25) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]} + ] + }, + { + "name": "GdipHatch", + "kind": "module", + "vis": "public", + "file": "GdiPlus/HatchBrush.twin", + "signature": "Module GdipHatch", + "members": [ + {"name":"GpHatch","kind":"function","vis":"public","signature":"Function GpHatch() As GpHatch","returnType":"GpHatch"}, + {"name":"GpHatch","kind":"function","vis":"public","signature":"Function GpHatch(nativeBrush As GpBrush) As GpHatch","returnType":"GpHatch"}, + {"name":"HatchBrush","kind":"function","vis":"public","signature":"Function HatchBrush(ByVal hatchStyle As GpHatchStyle, ByVal foreRgb&, ByVal backRgb&) As HatchBrush","returnType":"HatchBrush"}, + {"name":"HatchBrush","kind":"function","vis":"public","signature":"Function HatchBrush(ByVal hatchStyle As GpHatchStyle, ByVal foreColor As Color, ByVal backColor As Color) As HatchBrush","returnType":"HatchBrush"} + ] + }, + { + "name": "GpHatch", + "kind": "type", + "in": "GdipHatch", + "vis": "public", + "file": "GdiPlus/HatchBrush.twin", + "signature": "Type GpHatch", + "fields": [ + {"name":"Native","vis":"public","signature":"Native As LongPtr"} + ], + "members": [ + {"name":"Clone","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function Clone Lib \"gdiplus\" Alias \"GdipCloneBrush\" (ByVal Me As GpHatch, cloneBrush As GpHatch) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"Create","kind":"function","vis":"public","signature":"Function Create(ByVal style As GpHatchStyle, ByVal forecolr As Color, ByVal backcolr As Color) As GpStatus","returnType":"GpStatus"}, + {"name":"CreateInto","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function CreateInto Lib \"gdiplus\" Alias \"GdipCreateHatchBrush\" (ByVal style As GpHatchStyle, ByVal forecolr As Color, ByVal backcolr As Color, Brush As GpHatch) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"Delete","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function Delete Lib \"gdiplus\" Alias \"GdipDeleteBrush\" (ByVal Me As GpHatch) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetBackgroundColor","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetBackgroundColor Lib \"gdiplus\" Alias \"GdipGetHatchBackgroundColor\" (ByVal Me As GpHatch, backcol As Color) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetForegroundColor","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetForegroundColor Lib \"gdiplus\" Alias \"GdipGetHatchForegroundColor\" (ByVal Me As GpHatch, forecol As Color) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetStyle","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetStyle Lib \"gdiplus\" Alias \"GdipGetHatchStyle\" (ByVal Me As GpHatch, style As GpHatchStyle) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetType","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetType Lib \"gdiplus\" Alias \"GdipGetBrushType\" (ByVal Me As GpHatch, type As GpBrushType) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"Release","kind":"function","vis":"public","signature":"Function Release() As GpHatch","returnType":"GpHatch"} + ] + }, + { + "name": "GdipImage", + "kind": "module", + "vis": "public", + "file": "GdiPlus/Image.twin", + "signature": "Module GdipImage", + "members": [ + {"name":"FindFirstItemImpl","kind":"function","vis":"public","signature":"Function FindFirstItemImpl(ByVal Me As LongPtr, item() As GpImageItemData) As GpStatus","returnType":"GpStatus"}, + {"name":"FindNextItemImpl","kind":"function","vis":"public","signature":"Function FindNextItemImpl(ByVal Me As LongPtr, item() As GpImageItemData) As GpStatus","returnType":"GpStatus"}, + {"name":"FromFile","kind":"function","vis":"public","signature":"Function FromFile(ByVal filename$, useEmbeddedColorManagement As Boolean = False) As Image","returnType":"Image"}, + {"name":"FromFile","kind":"function","vis":"public","signature":"Function FromFile(ByVal stream As GDIP_IStream, useEmbeddedColorManagement As Boolean = False) As Image","returnType":"Image"}, + {"name":"GdipFindFirstImageItem","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GdipFindFirstImageItem Lib \"gdiplus\" (ByVal Me As LongPtr, item As GpImageItemData) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GdipFindNextImageItem","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GdipFindNextImageItem Lib \"gdiplus\" (ByVal Me As LongPtr, item As GpImageItemData) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GdipGetAllPropertyItems","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GdipGetAllPropertyItems Lib \"gdiplus\" (ByVal Me As LongPtr, ByVal totalBufferSize&, ByVal numProperties&, allItems As Any) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GdipGetEncoderParameterList","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GdipGetEncoderParameterList Lib \"gdiplus\" (ByVal Me As LongPtr, clsidEncoder As GDIP_UUID, ByVal size&, buffer As Any) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GdipGetEncoderParameterListSize","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GdipGetEncoderParameterListSize Lib \"gdiplus\" (ByVal Me As LongPtr, clsidEncoder As GDIP_UUID, size&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GdipGetImageItemData","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GdipGetImageItemData Lib \"gdiplus\" (ByVal Me As LongPtr, item As GpImageItemData) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GdipGetPropertyCount","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GdipGetPropertyCount Lib \"gdiplus\" (ByVal Me As LongPtr, numOfProperty&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GdipGetPropertyIdList","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GdipGetPropertyIdList Lib \"gdiplus\" (ByVal Me As LongPtr, ByVal numOfProperty&, list&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GdipGetPropertyItem","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GdipGetPropertyItem Lib \"gdiplus\" (ByVal Me As LongPtr, ByVal propId&, ByVal propSize&, ByRef buffer As Any) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GdipGetPropertyItemSize","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GdipGetPropertyItemSize Lib \"gdiplus\" (ByVal Me As LongPtr, ByVal propId&, Size&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GdipGetPropertySize","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GdipGetPropertySize Lib \"gdiplus\" (ByVal Me As LongPtr, totalBufferSize&, numProperties&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GdipImageGetFrameDimensionsCount","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GdipImageGetFrameDimensionsCount Lib \"gdiplus\" (ByVal Me As LongPtr, count As Long) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GdipImageGetFrameDimensionsList","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GdipImageGetFrameDimensionsList Lib \"gdiplus\" (ByVal Me As LongPtr, dimensionIDs As GDIP_UUID, ByVal count As Long) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GdipSaveAdd","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GdipSaveAdd Lib \"gdiplus\" (ByVal Me As LongPtr, encoderParams As Any) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GdipSaveAddImage","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GdipSaveAddImage Lib \"gdiplus\" (ByVal Me As LongPtr, ByVal newImage As LongPtr, encoderParams As Any) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GdipSaveImageToFile","kind":"function","vis":"public","declare":true,"signature":"DeclareWide PtrSafe Function GdipSaveImageToFile Lib \"gdiplus\" (ByVal Me As LongPtr, ByVal FileName$, clsidEncoder As GDIP_UUID, encoderParams As Any) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GdipSaveImageToStream","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GdipSaveImageToStream Lib \"gdiplus\" (ByVal Me As LongPtr, ByVal stream As GDIP_IStream, clsidEncoder As GDIP_UUID, encoderParams As Any) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetAllPropertyItemsImpl","kind":"function","vis":"public","signature":"Function GetAllPropertyItemsImpl(ByVal Me As LongPtr, items() As GpPropertyItem) As GpStatus","returnType":"GpStatus"}, + {"name":"GetEncoderParameterListImpl","kind":"function","vis":"public","signature":"Function GetEncoderParameterListImpl(ByVal Me As LongPtr, ByVal clsidencoder As GDIP_UUID, params() As GpEncoderParameter) As GpStatus","returnType":"GpStatus","description":"Returns an array with parameters. The array starts at index 1 even though LBound(params)=0"}, + {"name":"GetFrameDimensionsListImpl","kind":"function","vis":"public","signature":"Function GetFrameDimensionsListImpl(ByVal Me As LongPtr, dims As GDIP_UUID()) As GpStatus","returnType":"GpStatus"}, + {"name":"GetItemDataImpl","kind":"function","vis":"public","signature":"Function GetItemDataImpl(ByVal Me As LongPtr, item() As GpImageItemData) As GpStatus","returnType":"GpStatus"}, + {"name":"GetPropertyIdListImpl","kind":"function","vis":"public","signature":"Function GetPropertyIdListImpl(ByVal Me As LongPtr, propIDs() As PROPID) As GpStatus","returnType":"GpStatus"}, + {"name":"GetPropertyItemImpl","kind":"function","vis":"public","signature":"Function GetPropertyItemImpl(ByVal Me As LongPtr, ByVal propID As PROPID, item() As GpPropertyItem) As GpStatus","returnType":"GpStatus"}, + {"name":"GetSizeImpl","kind":"function","vis":"public","signature":"Function GetSizeImpl(Of T)(Me As T, size As GpSize) As GpStatus","returnType":"GpStatus"}, + {"name":"GpImage","kind":"function","vis":"public","signature":"Function GpImage() As GpImage","returnType":"GpImage"}, + {"name":"Image","kind":"function","vis":"public","signature":"Function Image(ByVal filename$, useEmbeddedColorManagement As Boolean = False) As Image","returnType":"Image"}, + {"name":"Image","kind":"function","vis":"public","signature":"Function Image(stream As GDIP_IStream, useEmbeddedColorManagement As Boolean = False) As Image","returnType":"Image"}, + {"name":"SaveAddImageImpl","kind":"function","vis":"public","signature":"Function SaveAddImageImpl(ByVal Me As LongPtr, ByVal newImage As LongPtr, encoderParams() As GpEncoderParameter) As GpStatus","returnType":"GpStatus","description":"There should be a dummy encoderParams(0) that's not filled in. It's used internally."}, + {"name":"SaveAddImpl","kind":"function","vis":"public","signature":"Function SaveAddImpl(ByVal Me As LongPtr, encoderParams() As GpEncoderParameter) As GpStatus","returnType":"GpStatus","description":"There should be a dummy encoderParams(0) that's not filled in. It's used internally."}, + {"name":"SaveToFileImpl","kind":"function","vis":"public","signature":"Function SaveToFileImpl(ByVal Me As LongPtr, ByVal FileName$, ByVal clsidEncoder As GDIP_UUID, encoderParams() As GpEncoderParameter) As GpStatus","returnType":"GpStatus","description":"There should be a dummy encoderParams(0) that's not filled in. It's used internally."}, + {"name":"SaveToStreamImpl","kind":"function","vis":"public","signature":"Function SaveToStreamImpl(ByVal Me As LongPtr, ByVal stream As GDIP_IStream, ByVal clsidEncoder As GDIP_UUID, encoderParams() As GpEncoderParameter) As GpStatus","returnType":"GpStatus","description":"There should be a dummy encoderParams(0) that's not filled in. It's used internally."} + ] + }, + { + "name": "GpImage", + "kind": "type", + "in": "GdipImage", + "vis": "public", + "file": "GdiPlus/Image.twin", + "signature": "Type GpImage", + "fields": [ + {"name":"Native","vis":"public","signature":"Native As LongPtr"} + ], + "members": [ + {"name":"Clone","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function Clone Lib \"gdiplus\" Alias \"GdipCloneImage\" (ByVal Me As GpImage, cloneImage As GpImage) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"Delete","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function Delete Lib \"gdiplus\" Alias \"GdipDisposeImage\" (ByVal Me As GpImage) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"Dispose","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function Dispose Lib \"gdiplus\" Alias \"GdipDisposeImage\" (ByVal Me As GpImage) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"FindFirstItem","kind":"function","vis":"public","signature":"Function FindFirstItem(item() As GpImageItemData) As GpStatus","returnType":"GpStatus"}, + {"name":"FindNextItem","kind":"function","vis":"public","signature":"Function FindNextItem(item() As GpImageItemData) As GpStatus","returnType":"GpStatus"}, + {"name":"GetAllPropertyItems","kind":"function","vis":"public","signature":"Function GetAllPropertyItems(items() As GpPropertyItem) As GpStatus","returnType":"GpStatus"}, + {"name":"GetBounds","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetBounds Lib \"gdiplus\" Alias \"GdipGetImageBounds\" (ByVal Me As GpImage, srcRect As GpRectF, srcUnit As GpUnit) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetDimension","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetDimension Lib \"gdiplus\" Alias \"GdipGetImageDimension\" (ByVal Me As GpImage, ByRef Width!, ByRef Height!) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetEncoderParameterList","kind":"function","vis":"public","signature":"Function GetEncoderParameterList(ByVal clsidencoder As GDIP_UUID, params() As GpEncoderParameter) As GpStatus","returnType":"GpStatus","description":"Returns an array with parameters. The array starts at index 1 even though LBound(params)=0"}, + {"name":"GetEncoderParameterListSize","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetEncoderParameterListSize Lib \"gdiplus\" Alias \"GdipGetEncoderParameterListSize\" (ByVal Me As GpImage, clsidEncoder As GDIP_UUID, size&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetFlags","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetFlags Lib \"gdiplus\" Alias \"GdipGetImageFlags\" (ByVal Me As GpImage, flags&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetFrameCount","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetFrameCount Lib \"gdiplus\" Alias \"GdipImageGetFrameCount\" (ByVal Me As GpImage, dimensionID As GDIP_UUID, count&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetFrameDimensionsCount","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetFrameDimensionsCount Lib \"gdiplus\" Alias \"GdipImageGetFrameDimensionsCount\" (ByVal Me As GpImage, count&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetFrameDimensionsList","kind":"function","vis":"public","signature":"Function GetFrameDimensionsList(dims As GDIP_UUID()) As GpStatus","returnType":"GpStatus"}, + {"name":"GetGraphicsContext","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetGraphicsContext Lib \"gdiplus\" Alias \"GdipGetImageGraphicsContext\" (ByVal Me As GpImage, ByVal Graphics As GpGraphics) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetHeight","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetHeight Lib \"gdiplus\" Alias \"GdipGetImageHeight\" (ByVal Me As GpImage, Height As Long) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetHorizontalResolution","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetHorizontalResolution Lib \"gdiplus\" Alias \"GdipGetImageHorizontalResolution\" (ByVal Me As GpImage, resolution!) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetItemData","kind":"function","vis":"public","signature":"Function GetItemData(item() As GpImageItemData) As GpStatus","returnType":"GpStatus"}, + {"name":"GetPalette","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetPalette Lib \"gdiplus\" Alias \"GdipGetImagePalette\" (ByVal Me As GpImage, palette As ColorPalette, ByVal size&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetPaletteSize","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetPaletteSize Lib \"gdiplus\" Alias \"GdipGetImagePaletteSize\" (ByVal Me As GpImage, size As Long) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetPixelFormat","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetPixelFormat Lib \"gdiplus\" Alias \"GdipGetImagePixelFormat\" (ByVal Me As GpImage, format As PixelFormat) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetPropertyCount","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetPropertyCount Lib \"gdiplus\" Alias \"GdipGetPropertyCount\" (ByVal Me As GpImage, numOfProperty&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetPropertyIdList","kind":"function","vis":"public","signature":"Function GetPropertyIdList(propIDs() As PROPID) As GpStatus","returnType":"GpStatus"}, + {"name":"GetPropertyItem","kind":"function","vis":"public","signature":"Function GetPropertyItem(ByVal propID As PROPID, item() As GpPropertyItem) As GpStatus","returnType":"GpStatus"}, + {"name":"GetPropertyItemSize","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetPropertyItemSize Lib \"gdiplus\" Alias \"GdipGetPropertyItemSize\" (ByVal Me As GpImage, ByVal propId&, ByRef Size&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetPropertySize","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetPropertySize Lib \"gdiplus\" Alias \"GdipGetPropertySize\" (ByVal Me As GpImage, totalBufferSize&, numProperties&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetRawFormat","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetRawFormat Lib \"gdiplus\" Alias \"GdipGetImageRawFormat\" (ByVal Me As GpImage, Format As GDIP_UUID) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetSize","kind":"function","vis":"public","signature":"Function GetSize(size As GpSize) As GpStatus","returnType":"GpStatus"}, + {"name":"GetThumbnail","kind":"function","vis":"public","signature":"Function GetThumbnail(ByVal thumbSize As GpSize, thumbImage As GpImage, ByVal callback As LongPtr, callbackData As LongPtr) As GpStatus","returnType":"GpStatus"}, + {"name":"GetThumbnail2","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetThumbnail2 Lib \"gdiplus\" Alias \"GdipGetImageThumbnail\" (ByVal Me As GpImage, ByVal thumbWidth&, ByVal thumbHeight&, thumbImage As GpImage, ByVal callback As LongPtr, callbackData As Any) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetType","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetType Lib \"gdiplus\" Alias \"GdipGetImageType\" (ByVal Me As GpImage, type As GpImageType) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetVerticalResolution","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetVerticalResolution Lib \"gdiplus\" Alias \"GdipGetImageVerticalResolution\" (ByVal Me As GpImage, resolution!) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetWidth","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetWidth Lib \"gdiplus\" Alias \"GdipGetImageWidth\" (ByVal Me As GpImage, Width As Long) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"LoadFromFileICMInto","kind":"function","vis":"public","declare":true,"signature":"DeclareWide PtrSafe Function LoadFromFileICMInto Lib \"gdiplus\" Alias \"GdipLoadImageFromFileICM\" (ByVal FileName$, ByRef Image As GpImage) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"LoadFromFileInto","kind":"function","vis":"public","declare":true,"signature":"DeclareWide PtrSafe Function LoadFromFileInto Lib \"gdiplus\" Alias \"GdipLoadImageFromFile\" (ByVal FileName$, ByRef Image As GpImage) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"LoadFromStreamICMInto","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function LoadFromStreamICMInto Lib \"gdiplus\" Alias \"GdipLoadImageFromStreamICM\" (ByVal stream As GDIP_IStream, ByRef Image As GpImage) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"LoadFromStreamInto","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function LoadFromStreamInto Lib \"gdiplus\" Alias \"GdipLoadImageFromStream\" (ByVal stream As GDIP_IStream, ByRef Image As GpImage) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"RemovePropertyItem","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function RemovePropertyItem Lib \"gdiplus\" Alias \"GdipRemovePropertyItem\" (ByVal Me As GpImage, ByVal propId As PROPID) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"RotateFlip","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function RotateFlip Lib \"gdiplus\" Alias \"GdipImageRotateFlip\" (ByVal Me As GpImage, ByVal rfType As RotateFlipType) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SaveAdd","kind":"function","vis":"public","signature":"Function SaveAdd(encoderParams() As GpEncoderParameter) As GpStatus","returnType":"GpStatus","description":"There should be a dummy encoderParams(0) that's not filled in. It's used internally."}, + {"name":"SaveAddImage","kind":"function","vis":"public","signature":"Function SaveAddImage(ByVal newImage As GpImage, encoderParams() As GpEncoderParameter) As GpStatus","returnType":"GpStatus","description":"There should be a dummy encoderParams(0) that's not filled in. It's used internally."}, + {"name":"SaveToFile","kind":"function","vis":"public","signature":"Function SaveToFile(ByVal FileName$, ByVal clsidEncoder As GDIP_UUID, encoderParams() As GpEncoderParameter) As GpStatus","returnType":"GpStatus","description":"There should be a dummy encoderParams(0) that's not filled in. It's used internally."}, + {"name":"SaveToStream","kind":"function","vis":"public","signature":"Function SaveToStream(ByVal stream As GDIP_IStream, ByVal clsidEncoder As GDIP_UUID, encoderParams() As GpEncoderParameter) As GpStatus","returnType":"GpStatus","description":"There should be a dummy encoderParams(0) that's not filled in. It's used internally."}, + {"name":"SelectActiveFrame","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SelectActiveFrame Lib \"gdiplus\" Alias \"GdipImageSelectActiveFrame\" (ByVal Me As GpImage, ByRef dimensionID As GDIP_UUID, ByVal frameIndex&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetAbort","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetAbort Lib \"gdiplus\" Alias \"GdipImageSetAbort\" (ByVal Me As GpImage, pIAbort As Any ) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}],"description":"⛔This API is not implemented in GdiPlus 1.0 nor 1.1.\n⛔NOTE: This API is a placeholder until tB supports no-vtable interfaces"}, + {"name":"SetPalette","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetPalette Lib \"gdiplus\" Alias \"GdipSetImagePalette\" (ByVal Me As GpImage, palette As ColorPalette) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetPropertyItem","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetPropertyItem Lib \"gdiplus\" Alias \"GdipSetPropertyItem\" (ByVal Me As GpImage, item As GpPropertyItem) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]} + ] + }, + { + "name": "GdipImageAttributes", + "kind": "module", + "vis": "public", + "file": "GdiPlus/ImageAttributes.twin", + "signature": "Module GdipImageAttributes", + "members": [ + {"name":"GpImageAttributes","kind":"function","vis":"public","signature":"Function GpImageAttributes() As GpImageAttributes","returnType":"GpImageAttributes"}, + {"name":"ImageAttributes","kind":"function","vis":"public","signature":"Function ImageAttributes() As ImageAttributes","returnType":"ImageAttributes"} + ] + }, + { + "name": "GpImageAttributes", + "kind": "type", + "in": "GdipImageAttributes", + "vis": "public", + "file": "GdiPlus/ImageAttributes.twin", + "signature": "Type GpImageAttributes", + "fields": [ + {"name":"Native","vis":"public","signature":"Native As LongPtr"} + ], + "members": [ + {"name":"ClearBrushRemapTable","kind":"function","vis":"public","signature":"Function ClearBrushRemapTable() As GpStatus","returnType":"GpStatus"}, + {"name":"ClearColorKey","kind":"function","vis":"public","signature":"Function ClearColorKey(ByVal type As ColorAdjustType = ColorAdjustTypeDefault) As GpStatus","returnType":"GpStatus"}, + {"name":"ClearColorMatrices","kind":"function","vis":"public","signature":"Function ClearColorMatrices(ByVal type As ColorAdjustType = ColorAdjustTypeDefault) As GpStatus","returnType":"GpStatus"}, + {"name":"ClearColorMatrix","kind":"function","vis":"public","signature":"Function ClearColorMatrix(ByVal type As ColorAdjustType = ColorAdjustTypeDefault) As GpStatus","returnType":"GpStatus"}, + {"name":"ClearGamma","kind":"function","vis":"public","signature":"Function ClearGamma(ByVal type As ColorAdjustType = ColorAdjustTypeDefault) As GpStatus","returnType":"GpStatus"}, + {"name":"ClearNoOp","kind":"function","vis":"public","signature":"Function ClearNoOp(ByVal type As ColorAdjustType = ColorAdjustTypeDefault) As GpStatus","returnType":"GpStatus"}, + {"name":"ClearOutputChannel","kind":"function","vis":"public","signature":"Function ClearOutputChannel(ByVal type As ColorAdjustType = ColorAdjustTypeDefault) As GpStatus","returnType":"GpStatus"}, + {"name":"ClearOutputChannelColorProfile","kind":"function","vis":"public","signature":"Function ClearOutputChannelColorProfile(ByVal type As ColorAdjustType = ColorAdjustTypeDefault) As GpStatus","returnType":"GpStatus"}, + {"name":"ClearRemapTable","kind":"function","vis":"public","signature":"Function ClearRemapTable(ByVal type As ColorAdjustType = ColorAdjustTypeDefault) As GpStatus","returnType":"GpStatus"}, + {"name":"ClearThreshold","kind":"function","vis":"public","signature":"Function ClearThreshold(ByVal type As ColorAdjustType = ColorAdjustTypeDefault) As GpStatus","returnType":"GpStatus"}, + {"name":"Clone","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function Clone Lib \"gdiplus\" Alias \"GdipCloneImageAttributes\" (ByVal Me As GpImageAttributes, cloneImageattr As GpImageAttributes) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"CreateInto","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function CreateInto Lib \"gdiplus\" Alias \"GdipCreateImageAttributes\" (imageattr As GpImageAttributes) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"Delete","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function Delete Lib \"gdiplus\" Alias \"GdipDisposeImageAttributes\" (ByVal Me As GpImageAttributes) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"Dispose","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function Dispose Lib \"gdiplus\" Alias \"GdipDisposeImageAttributes\" (ByVal Me As GpImageAttributes) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetAdjustedPalette","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetAdjustedPalette Lib \"gdiplus\" Alias \"GdipGetImageAttributesAdjustedPalette\" (ByVal Me As GpImageAttributes, colorPalette As ColorPalette, ByVal colorAdjustType As ColorAdjustType) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"Reset","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function Reset Lib \"gdiplus\" Alias \"GdipResetImageAttributes\" (ByVal Me As GpImageAttributes, ByVal type As ColorAdjustType) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetBrushRemapTable","kind":"function","vis":"public","signature":"Function SetBrushRemapTable(map() As ColorMap) As GpStatus","returnType":"GpStatus"}, + {"name":"SetCachedBackground","kind":"function","vis":"public","signature":"Function SetCachedBackground(ByVal enabled As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"SetCachedBackgroundX","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function SetCachedBackgroundX Lib \"gdiplus\" Alias \"GdipSetImageAttributesCachedBackground\" (ByVal Me As GpImageAttributes, ByVal enableFlag As GDIP_BOOL) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetColorKey","kind":"function","vis":"public","signature":"Function SetColorKey(ByVal colorLow As Color, ByVal colorHigh As Color, ByVal type As ColorAdjustType = ColorAdjustTypeDefault) As GpStatus","returnType":"GpStatus"}, + {"name":"SetColorKeyRGB","kind":"function","vis":"public","signature":"Function SetColorKeyRGB(ByVal rgbLow&, ByVal rgbHigh&, ByVal type As ColorAdjustType = ColorAdjustTypeDefault) As GpStatus","returnType":"GpStatus"}, + {"name":"SetColorKeys","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetColorKeys Lib \"gdiplus\" Alias \"GdipSetImageAttributesColorKeys\" (ByVal Me As GpImageAttributes, ByVal type As ColorAdjustType, ByVal enableFlag As GDIP_BOOL, ByVal colorLow As Color, ByVal colorHigh As Color) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetColorMatrices","kind":"function","vis":"public","signature":"Function SetColorMatrices(colorMatrix As ColorMatrix, grayMatrix As ColorMatrix, ByVal mode As ColorMatrixFlags = ColorMatrixFlagsDefault, ByVal type As ColorAdjustType = ColorAdjustTypeDefault) As GpStatus","returnType":"GpStatus"}, + {"name":"SetColorMatrix","kind":"function","vis":"public","signature":"Function SetColorMatrix(colorMatrix As ColorMatrix, ByVal mode As ColorMatrixFlags = colormatrixflagsdefault, ByVal type As ColorAdjustType = ColorAdjustTypeDefault) As GpStatus","returnType":"GpStatus"}, + {"name":"SetColorMatrixX","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetColorMatrixX Lib \"gdiplus\" Alias \"GdipSetImageAttributesColorMatrix\" (ByVal Me As GpImageAttributes, ByVal type As ColorAdjustType, ByVal enableFlag As GDIP_BOOL, colourMatrix As ColorMatrix, grayMatrix As ColorMatrix, ByVal flags As ColorMatrixFlags) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetGamma","kind":"function","vis":"public","signature":"Function SetGamma(ByVal gamma!, ByVal type As ColorAdjustType = ColorAdjustTypeDefault) As GpStatus","returnType":"GpStatus"}, + {"name":"SetGammaX","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetGammaX Lib \"gdiplus\" Alias \"GdipSetImageAttributesGamma\" (ByVal Me As GpImageAttributes, ByVal type As ColorAdjustType, ByVal enableFlag As GDIP_BOOL, ByVal gamma As Single) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetICMMode","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetICMMode Lib \"gdiplus\" Alias \"GdipSetImageAttributesICMMode\" (ByVal Me As GpImageAttributes, ByVal on As GDIP_BOOL) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetNoOp","kind":"function","vis":"public","signature":"Function SetNoOp(ByVal type As ColorAdjustType = ColorAdjustTypeDefault) As GpStatus","returnType":"GpStatus"}, + {"name":"SetNoOpX","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetNoOpX Lib \"gdiplus\" Alias \"GdipSetImageAttributesNoOp\" (ByVal Me As GpImageAttributes, ByVal type As ColorAdjustType, ByVal enableFlag As GDIP_BOOL) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetOutputChannel","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetOutputChannel Lib \"gdiplus\" Alias \"GdipSetImageAttributesOutputChannel\" (ByVal Me As GpImageAttributes, ByVal type As ColorAdjustType, ByVal enableFlag As GDIP_BOOL, ByVal channelFlags As ColorChannelFlags) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetOutputChannelColorProfile","kind":"function","vis":"public","signature":"Function SetOutputChannelColorProfile(ByVal colorProfileFilename$, ByVal type As ColorAdjustType = ColorAdjustTypeDefault) As GpStatus","returnType":"GpStatus"}, + {"name":"SetOutputChannelColorProfileX","kind":"function","vis":"public","declare":true,"signature":"DeclareWide PtrSafe Function SetOutputChannelColorProfileX Lib \"gdiplus\" Alias \"GdipSetImageAttributesOutputChannelColorProfile\" (ByVal Me As GpImageAttributes, ByVal type As ColorAdjustType, ByVal enableFlag As GDIP_BOOL, ByVal colorProfileFilename$) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetRemapTable","kind":"function","vis":"public","signature":"Function SetRemapTable(map() As ColorMap, ByVal type As ColorAdjustType = ColorAdjustTypeDefault) As GpStatus","returnType":"GpStatus"}, + {"name":"SetRemapTableX","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetRemapTableX Lib \"gdiplus\" Alias \"GdipSetImageAttributesRemapTable\" (ByVal Me As GpImageAttributes, ByVal type As ColorAdjustType, ByVal enableFlag As GDIP_BOOL, ByVal mapSize As Long, map As ColorMap) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetThreshold","kind":"function","vis":"public","signature":"Function SetThreshold(ByVal threshold!, ByVal type As ColorAdjustType = ColorAdjustTypeDefault) As GpStatus","returnType":"GpStatus"}, + {"name":"SetThresholdX","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetThresholdX Lib \"gdiplus\" Alias \"GdipSetImageAttributesThreshold\" (ByVal Me As GpImageAttributes, ByVal type As ColorAdjustType, ByVal enableFlag As GDIP_BOOL, ByVal threshold As Single) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetToIdentity","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetToIdentity Lib \"gdiplus\" Alias \"GdipSetImageAttributesToIdentity\" (ByVal Me As GpImageAttributes, ByVal type As ColorAdjustType) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetWrapMode","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetWrapMode Lib \"gdiplus\" Alias \"GdipSetImageAttributesWrapMode\" (ByVal Me As GpImageAttributes, ByVal wrap As GpWrapMode, ByVal color As Color, ByVal clamp As GDIP_BOOL) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetWrapModeRGB","kind":"function","vis":"public","signature":"Function SetWrapModeRGB(ByVal wrap As GpWrapMode, ByVal rgb&, ByVal clamp As Boolean = False) As GpStatus","returnType":"GpStatus"} + ] + }, + { + "name": "GdipImageCodec", + "kind": "module", + "vis": "public", + "file": "GdiPlus/ImageCodec.twin", + "signature": "Module GdipImageCodec", + "members": [ + {"name":"GetImageDecoders","kind":"function","vis":"public","signature":"Function GetImageDecoders() As GpImageCodecInfo()","returnType":"GpImageCodecInfo()"}, + {"name":"GetImageDecoders","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function GetImageDecoders Lib \"gdiplus\" Alias \"GdipGetImageDecoders\" (ByVal numDecoders As UINT, ByVal size As UINT, decoders As Any) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetImageDecodersSize","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function GetImageDecodersSize Lib \"gdiplus\" Alias \"GdipGetImageDecodersSize\" (numDecoders As UINT, size As UINT) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetImageEncoders","kind":"function","vis":"public","signature":"Function GetImageEncoders() As GpImageCodecInfo()","returnType":"GpImageCodecInfo()"}, + {"name":"GetImageEncoders","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function GetImageEncoders Lib \"gdiplus\" Alias \"GdipGetImageEncoders\" (ByVal numEncoders As UINT, ByVal size As UINT, encoders As Any) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetImageEncodersSize","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function GetImageEncodersSize Lib \"gdiplus\" Alias \"GdipGetImageEncodersSize\" (numEncoders As UINT, size As UINT) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]} + ] + }, + { + "name": "GdipImaging", + "kind": "module", + "vis": "public", + "file": "GdiPlus/Imaging.twin", + "signature": "Module GdipImaging", + "members": [ + {"name":"CodecIImageBytes","kind":"function","vis":"public","signature":"Public Function CodecIImageBytes() As GDIP_UUID","returnType":"GDIP_UUID"}, + {"name":"EncoderChrominanceTable","kind":"function","vis":"public","signature":"Public Function EncoderChrominanceTable() As GDIP_UUID","returnType":"GDIP_UUID"}, + {"name":"EncoderColorDepth","kind":"function","vis":"public","signature":"Public Function EncoderColorDepth() As GDIP_UUID","returnType":"GDIP_UUID"}, + {"name":"EncoderColorSpace","kind":"function","vis":"public","signature":"Public Function EncoderColorSpace() As GDIP_UUID","returnType":"GDIP_UUID"}, + {"name":"EncoderCompression","kind":"function","vis":"public","signature":"Public Function EncoderCompression() As GDIP_UUID","returnType":"GDIP_UUID"}, + {"name":"EncoderImageItems","kind":"function","vis":"public","signature":"Public Function EncoderImageItems() As GDIP_UUID","returnType":"GDIP_UUID"}, + {"name":"EncoderLuminanceTable","kind":"function","vis":"public","signature":"Public Function EncoderLuminanceTable() As GDIP_UUID","returnType":"GDIP_UUID"}, + {"name":"EncoderQuality","kind":"function","vis":"public","signature":"Public Function EncoderQuality() As GDIP_UUID","returnType":"GDIP_UUID"}, + {"name":"EncoderRenderMethod","kind":"function","vis":"public","signature":"Public Function EncoderRenderMethod() As GDIP_UUID","returnType":"GDIP_UUID"}, + {"name":"EncoderSaveAsCMYK","kind":"function","vis":"public","signature":"Public Function EncoderSaveAsCMYK() As GDIP_UUID","returnType":"GDIP_UUID"}, + {"name":"EncoderSaveFlag","kind":"function","vis":"public","signature":"Public Function EncoderSaveFlag() As GDIP_UUID","returnType":"GDIP_UUID"}, + {"name":"EncoderScanMethod","kind":"function","vis":"public","signature":"Public Function EncoderScanMethod() As GDIP_UUID","returnType":"GDIP_UUID"}, + {"name":"EncoderTransformation","kind":"function","vis":"public","signature":"Public Function EncoderTransformation() As GDIP_UUID","returnType":"GDIP_UUID"}, + {"name":"EncoderVersion","kind":"function","vis":"public","signature":"Public Function EncoderVersion() As GDIP_UUID","returnType":"GDIP_UUID"}, + {"name":"FormatIDImageInformation","kind":"function","vis":"public","signature":"Public Function FormatIDImageInformation() As GDIP_UUID","returnType":"GDIP_UUID"}, + {"name":"FormatIDJpegAppHeaders","kind":"function","vis":"public","signature":"Public Function FormatIDJpegAppHeaders() As GDIP_UUID","returnType":"GDIP_UUID"}, + {"name":"FrameDimensionPage","kind":"function","vis":"public","signature":"Public Function FrameDimensionPage() As GDIP_UUID","returnType":"GDIP_UUID"}, + {"name":"FrameDimensionResolution","kind":"function","vis":"public","signature":"Public Function FrameDimensionResolution() As GDIP_UUID","returnType":"GDIP_UUID"}, + {"name":"FrameDimensionTime","kind":"function","vis":"public","signature":"Public Function FrameDimensionTime() As GDIP_UUID","returnType":"GDIP_UUID"}, + {"name":"GetLongRange_Impl","kind":"function","vis":"private","signature":"Private Function GetLongRange_Impl(Me As GpEncoderParameter, ByVal index&) As LongLong()","returnType":"LongLong()"}, + {"name":"GetRationalRange_Impl","kind":"function","vis":"private","signature":"Private Function GetRationalRange_Impl(Me As GpEncoderParameter, ByVal index&) As Double()","returnType":"Double()"}, + {"name":"ImageCodecBMP","kind":"function","vis":"public","signature":"Public Function ImageCodecBMP() As GDIP_UUID","returnType":"GDIP_UUID"}, + {"name":"ImageCodecGIF","kind":"function","vis":"public","signature":"Public Function ImageCodecGIF() As GDIP_UUID","returnType":"GDIP_UUID"}, + {"name":"ImageCodecICO","kind":"function","vis":"public","signature":"Public Function ImageCodecICO() As GDIP_UUID","returnType":"GDIP_UUID"}, + {"name":"ImageCodecJPG","kind":"function","vis":"public","signature":"Public Function ImageCodecJPG() As GDIP_UUID","returnType":"GDIP_UUID"}, + {"name":"ImageCodecPNG","kind":"function","vis":"public","signature":"Public Function ImageCodecPNG() As GDIP_UUID","returnType":"GDIP_UUID"}, + {"name":"ImageCodecTIF","kind":"function","vis":"public","signature":"Public Function ImageCodecTIF() As GDIP_UUID","returnType":"GDIP_UUID"}, + {"name":"ImageFormatBMP","kind":"function","vis":"public","signature":"Public Function ImageFormatBMP() As GDIP_UUID","returnType":"GDIP_UUID"}, + {"name":"ImageFormatEMF","kind":"function","vis":"public","signature":"Public Function ImageFormatEMF() As GDIP_UUID","returnType":"GDIP_UUID"}, + {"name":"ImageFormatEXIF","kind":"function","vis":"public","signature":"Public Function ImageFormatEXIF() As GDIP_UUID","returnType":"GDIP_UUID"}, + {"name":"ImageFormatGIF","kind":"function","vis":"public","signature":"Public Function ImageFormatGIF() As GDIP_UUID","returnType":"GDIP_UUID"}, + {"name":"ImageFormatHEIF","kind":"function","vis":"public","signature":"Public Function ImageFormatHEIF() As GDIP_UUID","returnType":"GDIP_UUID"}, + {"name":"ImageFormatIcon","kind":"function","vis":"public","signature":"Public Function ImageFormatIcon() As GDIP_UUID","returnType":"GDIP_UUID"}, + {"name":"ImageFormatJPEG","kind":"function","vis":"public","signature":"Public Function ImageFormatJPEG() As GDIP_UUID","returnType":"GDIP_UUID"}, + {"name":"ImageFormatMemoryBMP","kind":"function","vis":"public","signature":"Public Function ImageFormatMemoryBMP() As GDIP_UUID","returnType":"GDIP_UUID"}, + {"name":"ImageFormatPNG","kind":"function","vis":"public","signature":"Public Function ImageFormatPNG() As GDIP_UUID","returnType":"GDIP_UUID"}, + {"name":"ImageFormatTIFF","kind":"function","vis":"public","signature":"Public Function ImageFormatTIFF() As GDIP_UUID","returnType":"GDIP_UUID"}, + {"name":"ImageFormatUndefined","kind":"function","vis":"public","signature":"Public Function ImageFormatUndefined() As GDIP_UUID","returnType":"GDIP_UUID"}, + {"name":"ImageFormatWEBP","kind":"function","vis":"public","signature":"Public Function ImageFormatWEBP() As GDIP_UUID","returnType":"GDIP_UUID"}, + {"name":"ImageFormatWMF","kind":"function","vis":"public","signature":"Public Function ImageFormatWMF() As GDIP_UUID","returnType":"GDIP_UUID"}, + {"name":"PropertyTagArtist","kind":"const","vis":"public","signature":"Public Const PropertyTagArtist = &H013B"}, + {"name":"PropertyTagBitsPerSample","kind":"const","vis":"public","signature":"Public Const PropertyTagBitsPerSample = &H0102"}, + {"name":"PropertyTagCellHeight","kind":"const","vis":"public","signature":"Public Const PropertyTagCellHeight = &H0109"}, + {"name":"PropertyTagCellWidth","kind":"const","vis":"public","signature":"Public Const PropertyTagCellWidth = &H0108"}, + {"name":"PropertyTagChrominanceTable","kind":"const","vis":"public","signature":"Public Const PropertyTagChrominanceTable = &H5091"}, + {"name":"PropertyTagColorMap","kind":"const","vis":"public","signature":"Public Const PropertyTagColorMap = &H0140"}, + {"name":"PropertyTagColorTransferFunction","kind":"const","vis":"public","signature":"Public Const PropertyTagColorTransferFunction = &H501A"}, + {"name":"PropertyTagCompression","kind":"const","vis":"public","signature":"Public Const PropertyTagCompression = &H0103"}, + {"name":"PropertyTagCopyright","kind":"const","vis":"public","signature":"Public Const PropertyTagCopyright = &H8298"}, + {"name":"PropertyTagDateTime","kind":"const","vis":"public","signature":"Public Const PropertyTagDateTime = &H0132"}, + {"name":"PropertyTagDocumentName","kind":"const","vis":"public","signature":"Public Const PropertyTagDocumentName = &H010D"}, + {"name":"PropertyTagDotRange","kind":"const","vis":"public","signature":"Public Const PropertyTagDotRange = &H0150"}, + {"name":"PropertyTagEquipMake","kind":"const","vis":"public","signature":"Public Const PropertyTagEquipMake = &H010F"}, + {"name":"PropertyTagEquipModel","kind":"const","vis":"public","signature":"Public Const PropertyTagEquipModel = &H0110"}, + {"name":"PropertyTagExifAperture","kind":"const","vis":"public","signature":"Public Const PropertyTagExifAperture = &H9202"}, + {"name":"PropertyTagExifBrightness","kind":"const","vis":"public","signature":"Public Const PropertyTagExifBrightness = &H9203"}, + {"name":"PropertyTagExifCfaPattern","kind":"const","vis":"public","signature":"Public Const PropertyTagExifCfaPattern = &HA302"}, + {"name":"PropertyTagExifColorSpace","kind":"const","vis":"public","signature":"Public Const PropertyTagExifColorSpace = &HA001"}, + {"name":"PropertyTagExifCompBPP","kind":"const","vis":"public","signature":"Public Const PropertyTagExifCompBPP = &H9102"}, + {"name":"PropertyTagExifCompConfig","kind":"const","vis":"public","signature":"Public Const PropertyTagExifCompConfig = &H9101"}, + {"name":"PropertyTagExifContrast","kind":"const","vis":"public","signature":"Public Const PropertyTagExifContrast = &HA408"}, + {"name":"PropertyTagExifCustomRendered","kind":"const","vis":"public","signature":"Public Const PropertyTagExifCustomRendered = &HA401"}, + {"name":"PropertyTagExifDTDigSS","kind":"const","vis":"public","signature":"Public Const PropertyTagExifDTDigSS = &H9292"}, + {"name":"PropertyTagExifDTDigitized","kind":"const","vis":"public","signature":"Public Const PropertyTagExifDTDigitized = &H9004"}, + {"name":"PropertyTagExifDTOrig","kind":"const","vis":"public","signature":"Public Const PropertyTagExifDTOrig = &H9003"}, + {"name":"PropertyTagExifDTOrigSS","kind":"const","vis":"public","signature":"Public Const PropertyTagExifDTOrigSS = &H9291"}, + {"name":"PropertyTagExifDTSubsec","kind":"const","vis":"public","signature":"Public Const PropertyTagExifDTSubsec = &H9290"}, + {"name":"PropertyTagExifDeviceSettingDesc","kind":"const","vis":"public","signature":"Public Const PropertyTagExifDeviceSettingDesc = &HA40B"}, + {"name":"PropertyTagExifDigitalZoomRatio","kind":"const","vis":"public","signature":"Public Const PropertyTagExifDigitalZoomRatio = &HA404"}, + {"name":"PropertyTagExifExposureBias","kind":"const","vis":"public","signature":"Public Const PropertyTagExifExposureBias = &H9204"}, + {"name":"PropertyTagExifExposureIndex","kind":"const","vis":"public","signature":"Public Const PropertyTagExifExposureIndex = &HA215"}, + {"name":"PropertyTagExifExposureMode","kind":"const","vis":"public","signature":"Public Const PropertyTagExifExposureMode = &HA402"}, + {"name":"PropertyTagExifExposureProg","kind":"const","vis":"public","signature":"Public Const PropertyTagExifExposureProg = &H8822"}, + {"name":"PropertyTagExifExposureTime","kind":"const","vis":"public","signature":"Public Const PropertyTagExifExposureTime = &H829A"}, + {"name":"PropertyTagExifFNumber","kind":"const","vis":"public","signature":"Public Const PropertyTagExifFNumber = &H829D"}, + {"name":"PropertyTagExifFPXVer","kind":"const","vis":"public","signature":"Public Const PropertyTagExifFPXVer = &HA000"}, + {"name":"PropertyTagExifFileSource","kind":"const","vis":"public","signature":"Public Const PropertyTagExifFileSource = &HA300"}, + {"name":"PropertyTagExifFlash","kind":"const","vis":"public","signature":"Public Const PropertyTagExifFlash = &H9209"}, + {"name":"PropertyTagExifFlashEnergy","kind":"const","vis":"public","signature":"Public Const PropertyTagExifFlashEnergy = &HA20B"}, + {"name":"PropertyTagExifFocalLength","kind":"const","vis":"public","signature":"Public Const PropertyTagExifFocalLength = &H920A"}, + {"name":"PropertyTagExifFocalLengthIn35mmFilm","kind":"const","vis":"public","signature":"Public Const PropertyTagExifFocalLengthIn35mmFilm = &HA405"}, + {"name":"PropertyTagExifFocalResUnit","kind":"const","vis":"public","signature":"Public Const PropertyTagExifFocalResUnit = &HA210"}, + {"name":"PropertyTagExifFocalXRes","kind":"const","vis":"public","signature":"Public Const PropertyTagExifFocalXRes = &HA20E"}, + {"name":"PropertyTagExifFocalYRes","kind":"const","vis":"public","signature":"Public Const PropertyTagExifFocalYRes = &HA20F"}, + {"name":"PropertyTagExifGainControl","kind":"const","vis":"public","signature":"Public Const PropertyTagExifGainControl = &HA407"}, + {"name":"PropertyTagExifIFD","kind":"const","vis":"public","signature":"Public Const PropertyTagExifIFD = &H8769"}, + {"name":"PropertyTagExifISOSpeed","kind":"const","vis":"public","signature":"Public Const PropertyTagExifISOSpeed = &H8827"}, + {"name":"PropertyTagExifInterop","kind":"const","vis":"public","signature":"Public Const PropertyTagExifInterop = &HA005"}, + {"name":"PropertyTagExifLightSource","kind":"const","vis":"public","signature":"Public Const PropertyTagExifLightSource = &H9208"}, + {"name":"PropertyTagExifMakerNote","kind":"const","vis":"public","signature":"Public Const PropertyTagExifMakerNote = &H927C"}, + {"name":"PropertyTagExifMaxAperture","kind":"const","vis":"public","signature":"Public Const PropertyTagExifMaxAperture = &H9205"}, + {"name":"PropertyTagExifMeteringMode","kind":"const","vis":"public","signature":"Public Const PropertyTagExifMeteringMode = &H9207"}, + {"name":"PropertyTagExifOECF","kind":"const","vis":"public","signature":"Public Const PropertyTagExifOECF = &H8828"}, + {"name":"PropertyTagExifPixXDim","kind":"const","vis":"public","signature":"Public Const PropertyTagExifPixXDim = &HA002"}, + {"name":"PropertyTagExifPixYDim","kind":"const","vis":"public","signature":"Public Const PropertyTagExifPixYDim = &HA003"}, + {"name":"PropertyTagExifRelatedWav","kind":"const","vis":"public","signature":"Public Const PropertyTagExifRelatedWav = &HA004"}, + {"name":"PropertyTagExifSaturation","kind":"const","vis":"public","signature":"Public Const PropertyTagExifSaturation = &HA409"}, + {"name":"PropertyTagExifSceneCaptureType","kind":"const","vis":"public","signature":"Public Const PropertyTagExifSceneCaptureType = &HA406"}, + {"name":"PropertyTagExifSceneType","kind":"const","vis":"public","signature":"Public Const PropertyTagExifSceneType = &HA301"}, + {"name":"PropertyTagExifSensingMethod","kind":"const","vis":"public","signature":"Public Const PropertyTagExifSensingMethod = &HA217"}, + {"name":"PropertyTagExifSharpness","kind":"const","vis":"public","signature":"Public Const PropertyTagExifSharpness = &HA40A"}, + {"name":"PropertyTagExifShutterSpeed","kind":"const","vis":"public","signature":"Public Const PropertyTagExifShutterSpeed = &H9201"}, + {"name":"PropertyTagExifSpatialFR","kind":"const","vis":"public","signature":"Public Const PropertyTagExifSpatialFR = &HA20C"}, + {"name":"PropertyTagExifSpectralSense","kind":"const","vis":"public","signature":"Public Const PropertyTagExifSpectralSense = &H8824"}, + {"name":"PropertyTagExifSubjectArea","kind":"const","vis":"public","signature":"Public Const PropertyTagExifSubjectArea = &H9214"}, + {"name":"PropertyTagExifSubjectDist","kind":"const","vis":"public","signature":"Public Const PropertyTagExifSubjectDist = &H9206"}, + {"name":"PropertyTagExifSubjectDistanceRange","kind":"const","vis":"public","signature":"Public Const PropertyTagExifSubjectDistanceRange = &HA40C"}, + {"name":"PropertyTagExifSubjectLoc","kind":"const","vis":"public","signature":"Public Const PropertyTagExifSubjectLoc = &HA214"}, + {"name":"PropertyTagExifUniqueImageID","kind":"const","vis":"public","signature":"Public Const PropertyTagExifUniqueImageID = &HA420"}, + {"name":"PropertyTagExifUserComment","kind":"const","vis":"public","signature":"Public Const PropertyTagExifUserComment = &H9286"}, + {"name":"PropertyTagExifVer","kind":"const","vis":"public","signature":"Public Const PropertyTagExifVer = &H9000"}, + {"name":"PropertyTagExifWhiteBalance","kind":"const","vis":"public","signature":"Public Const PropertyTagExifWhiteBalance = &HA403"}, + {"name":"PropertyTagExtraSamples","kind":"const","vis":"public","signature":"Public Const PropertyTagExtraSamples = &H0152"}, + {"name":"PropertyTagFillOrder","kind":"const","vis":"public","signature":"Public Const PropertyTagFillOrder = &H010A"}, + {"name":"PropertyTagFrameDelay","kind":"const","vis":"public","signature":"Public Const PropertyTagFrameDelay = &H5100"}, + {"name":"PropertyTagFreeByteCounts","kind":"const","vis":"public","signature":"Public Const PropertyTagFreeByteCounts = &H0121"}, + {"name":"PropertyTagFreeOffset","kind":"const","vis":"public","signature":"Public Const PropertyTagFreeOffset = &H0120"}, + {"name":"PropertyTagGamma","kind":"const","vis":"public","signature":"Public Const PropertyTagGamma = &H0301"}, + {"name":"PropertyTagGlobalPalette","kind":"const","vis":"public","signature":"Public Const PropertyTagGlobalPalette = &H5102"}, + {"name":"PropertyTagGpsAltitude","kind":"const","vis":"public","signature":"Public Const PropertyTagGpsAltitude = &H0006"}, + {"name":"PropertyTagGpsAltitudeRef","kind":"const","vis":"public","signature":"Public Const PropertyTagGpsAltitudeRef = &H0005"}, + {"name":"PropertyTagGpsAreaInformation","kind":"const","vis":"public","signature":"Public Const PropertyTagGpsAreaInformation = &H001C"}, + {"name":"PropertyTagGpsDate","kind":"const","vis":"public","signature":"Public Const PropertyTagGpsDate = &H001D"}, + {"name":"PropertyTagGpsDestBear","kind":"const","vis":"public","signature":"Public Const PropertyTagGpsDestBear = &H0018"}, + {"name":"PropertyTagGpsDestBearRef","kind":"const","vis":"public","signature":"Public Const PropertyTagGpsDestBearRef = &H0017"}, + {"name":"PropertyTagGpsDestDist","kind":"const","vis":"public","signature":"Public Const PropertyTagGpsDestDist = &H001A"}, + {"name":"PropertyTagGpsDestDistRef","kind":"const","vis":"public","signature":"Public Const PropertyTagGpsDestDistRef = &H0019"}, + {"name":"PropertyTagGpsDestLat","kind":"const","vis":"public","signature":"Public Const PropertyTagGpsDestLat = &H0014"}, + {"name":"PropertyTagGpsDestLatRef","kind":"const","vis":"public","signature":"Public Const PropertyTagGpsDestLatRef = &H0013"}, + {"name":"PropertyTagGpsDestLong","kind":"const","vis":"public","signature":"Public Const PropertyTagGpsDestLong = &H0016"}, + {"name":"PropertyTagGpsDestLongRef","kind":"const","vis":"public","signature":"Public Const PropertyTagGpsDestLongRef = &H0015"}, + {"name":"PropertyTagGpsDifferential","kind":"const","vis":"public","signature":"Public Const PropertyTagGpsDifferential = &H001E"}, + {"name":"PropertyTagGpsGpsDop","kind":"const","vis":"public","signature":"Public Const PropertyTagGpsGpsDop = &H000B"}, + {"name":"PropertyTagGpsGpsMeasureMode","kind":"const","vis":"public","signature":"Public Const PropertyTagGpsGpsMeasureMode = &H00A"}, + {"name":"PropertyTagGpsGpsSatellites","kind":"const","vis":"public","signature":"Public Const PropertyTagGpsGpsSatellites = &H0008"}, + {"name":"PropertyTagGpsGpsStatus","kind":"const","vis":"public","signature":"Public Const PropertyTagGpsGpsStatus = &H0009"}, + {"name":"PropertyTagGpsGpsTime","kind":"const","vis":"public","signature":"Public Const PropertyTagGpsGpsTime = &H0007"}, + {"name":"PropertyTagGpsIFD","kind":"const","vis":"public","signature":"Public Const PropertyTagGpsIFD = &H8825"}, + {"name":"PropertyTagGpsImgDir","kind":"const","vis":"public","signature":"Public Const PropertyTagGpsImgDir = &H0011"}, + {"name":"PropertyTagGpsImgDirRef","kind":"const","vis":"public","signature":"Public Const PropertyTagGpsImgDirRef = &H0010"}, + {"name":"PropertyTagGpsLatitude","kind":"const","vis":"public","signature":"Public Const PropertyTagGpsLatitude = &H0002"}, + {"name":"PropertyTagGpsLatitudeRef","kind":"const","vis":"public","signature":"Public Const PropertyTagGpsLatitudeRef = &H0001"}, + {"name":"PropertyTagGpsLongitude","kind":"const","vis":"public","signature":"Public Const PropertyTagGpsLongitude = &H0004"}, + {"name":"PropertyTagGpsLongitudeRef","kind":"const","vis":"public","signature":"Public Const PropertyTagGpsLongitudeRef = &H0003"}, + {"name":"PropertyTagGpsMapDatum","kind":"const","vis":"public","signature":"Public Const PropertyTagGpsMapDatum = &H0012"}, + {"name":"PropertyTagGpsProcessingMethod","kind":"const","vis":"public","signature":"Public Const PropertyTagGpsProcessingMethod = &H001B"}, + {"name":"PropertyTagGpsSpeed","kind":"const","vis":"public","signature":"Public Const PropertyTagGpsSpeed = &H000D"}, + {"name":"PropertyTagGpsSpeedRef","kind":"const","vis":"public","signature":"Public Const PropertyTagGpsSpeedRef = &H000C"}, + {"name":"PropertyTagGpsTrack","kind":"const","vis":"public","signature":"Public Const PropertyTagGpsTrack = &H000F"}, + {"name":"PropertyTagGpsTrackRef","kind":"const","vis":"public","signature":"Public Const PropertyTagGpsTrackRef = &H000E"}, + {"name":"PropertyTagGpsVer","kind":"const","vis":"public","signature":"Public Const PropertyTagGpsVer = &H0000"}, + {"name":"PropertyTagGrayResponseCurve","kind":"const","vis":"public","signature":"Public Const PropertyTagGrayResponseCurve = &H0123"}, + {"name":"PropertyTagGrayResponseUnit","kind":"const","vis":"public","signature":"Public Const PropertyTagGrayResponseUnit = &H0122"}, + {"name":"PropertyTagGridSize","kind":"const","vis":"public","signature":"Public Const PropertyTagGridSize = &H5011"}, + {"name":"PropertyTagHalftoneDegree","kind":"const","vis":"public","signature":"Public Const PropertyTagHalftoneDegree = &H500C"}, + {"name":"PropertyTagHalftoneHints","kind":"const","vis":"public","signature":"Public Const PropertyTagHalftoneHints = &H0141"}, + {"name":"PropertyTagHalftoneLPI","kind":"const","vis":"public","signature":"Public Const PropertyTagHalftoneLPI = &H500A"}, + {"name":"PropertyTagHalftoneLPIUnit","kind":"const","vis":"public","signature":"Public Const PropertyTagHalftoneLPIUnit = &H500B"}, + {"name":"PropertyTagHalftoneMisc","kind":"const","vis":"public","signature":"Public Const PropertyTagHalftoneMisc = &H500E"}, + {"name":"PropertyTagHalftoneScreen","kind":"const","vis":"public","signature":"Public Const PropertyTagHalftoneScreen = &H500F"}, + {"name":"PropertyTagHalftoneShape","kind":"const","vis":"public","signature":"Public Const PropertyTagHalftoneShape = &H500D"}, + {"name":"PropertyTagHostComputer","kind":"const","vis":"public","signature":"Public Const PropertyTagHostComputer = &H013C"}, + {"name":"PropertyTagICCProfile","kind":"const","vis":"public","signature":"Public Const PropertyTagICCProfile = &H8773"}, + {"name":"PropertyTagICCProfileDescriptor","kind":"const","vis":"public","signature":"Public Const PropertyTagICCProfileDescriptor = &H0302"}, + {"name":"PropertyTagImageDescription","kind":"const","vis":"public","signature":"Public Const PropertyTagImageDescription = &H010E"}, + {"name":"PropertyTagImageHeight","kind":"const","vis":"public","signature":"Public Const PropertyTagImageHeight = &H0101"}, + {"name":"PropertyTagImageTitle","kind":"const","vis":"public","signature":"Public Const PropertyTagImageTitle = &H0320"}, + {"name":"PropertyTagImageWidth","kind":"const","vis":"public","signature":"Public Const PropertyTagImageWidth = &H0100"}, + {"name":"PropertyTagIndexBackground","kind":"const","vis":"public","signature":"Public Const PropertyTagIndexBackground = &H5103"}, + {"name":"PropertyTagIndexTransparent","kind":"const","vis":"public","signature":"Public Const PropertyTagIndexTransparent = &H5104"}, + {"name":"PropertyTagInkNames","kind":"const","vis":"public","signature":"Public Const PropertyTagInkNames = &H014D"}, + {"name":"PropertyTagInkSet","kind":"const","vis":"public","signature":"Public Const PropertyTagInkSet = &H014C"}, + {"name":"PropertyTagJPEGACTables","kind":"const","vis":"public","signature":"Public Const PropertyTagJPEGACTables = &H0209"}, + {"name":"PropertyTagJPEGDCTables","kind":"const","vis":"public","signature":"Public Const PropertyTagJPEGDCTables = &H0208"}, + {"name":"PropertyTagJPEGInterFormat","kind":"const","vis":"public","signature":"Public Const PropertyTagJPEGInterFormat = &H0201"}, + {"name":"PropertyTagJPEGInterLength","kind":"const","vis":"public","signature":"Public Const PropertyTagJPEGInterLength = &H0202"}, + {"name":"PropertyTagJPEGLosslessPredictors","kind":"const","vis":"public","signature":"Public Const PropertyTagJPEGLosslessPredictors = &H0205"}, + {"name":"PropertyTagJPEGPointTransforms","kind":"const","vis":"public","signature":"Public Const PropertyTagJPEGPointTransforms = &H0206"}, + {"name":"PropertyTagJPEGProc","kind":"const","vis":"public","signature":"Public Const PropertyTagJPEGProc = &H0200"}, + {"name":"PropertyTagJPEGQTables","kind":"const","vis":"public","signature":"Public Const PropertyTagJPEGQTables = &H0207"}, + {"name":"PropertyTagJPEGQuality","kind":"const","vis":"public","signature":"Public Const PropertyTagJPEGQuality = &H5010"}, + {"name":"PropertyTagJPEGRestartInterval","kind":"const","vis":"public","signature":"Public Const PropertyTagJPEGRestartInterval = &H0203"}, + {"name":"PropertyTagLoopCount","kind":"const","vis":"public","signature":"Public Const PropertyTagLoopCount = &H5101"}, + {"name":"PropertyTagLuminanceTable","kind":"const","vis":"public","signature":"Public Const PropertyTagLuminanceTable = &H5090"}, + {"name":"PropertyTagMaxSampleValue","kind":"const","vis":"public","signature":"Public Const PropertyTagMaxSampleValue = &H0119"}, + {"name":"PropertyTagMinSampleValue","kind":"const","vis":"public","signature":"Public Const PropertyTagMinSampleValue = &H0118"}, + {"name":"PropertyTagNewSubfileType","kind":"const","vis":"public","signature":"Public Const PropertyTagNewSubfileType = &H00FE"}, + {"name":"PropertyTagNumberOfInks","kind":"const","vis":"public","signature":"Public Const PropertyTagNumberOfInks = &H014E"}, + {"name":"PropertyTagOrientation","kind":"const","vis":"public","signature":"Public Const PropertyTagOrientation = &H0112"}, + {"name":"PropertyTagPageName","kind":"const","vis":"public","signature":"Public Const PropertyTagPageName = &H011D"}, + {"name":"PropertyTagPageNumber","kind":"const","vis":"public","signature":"Public Const PropertyTagPageNumber = &H0129"}, + {"name":"PropertyTagPaletteHistogram","kind":"const","vis":"public","signature":"Public Const PropertyTagPaletteHistogram = &H5113"}, + {"name":"PropertyTagPhotometricInterp","kind":"const","vis":"public","signature":"Public Const PropertyTagPhotometricInterp = &H0106"}, + {"name":"PropertyTagPixelPerUnitX","kind":"const","vis":"public","signature":"Public Const PropertyTagPixelPerUnitX = &H5111"}, + {"name":"PropertyTagPixelPerUnitY","kind":"const","vis":"public","signature":"Public Const PropertyTagPixelPerUnitY = &H5112"}, + {"name":"PropertyTagPixelUnit","kind":"const","vis":"public","signature":"Public Const PropertyTagPixelUnit = &H5110"}, + {"name":"PropertyTagPlanarConfig","kind":"const","vis":"public","signature":"Public Const PropertyTagPlanarConfig = &H011C"}, + {"name":"PropertyTagPredictor","kind":"const","vis":"public","signature":"Public Const PropertyTagPredictor = &H013D"}, + {"name":"PropertyTagPrimaryChromaticities","kind":"const","vis":"public","signature":"Public Const PropertyTagPrimaryChromaticities = &H013F"}, + {"name":"PropertyTagPrintFlags","kind":"const","vis":"public","signature":"Public Const PropertyTagPrintFlags = &H5005"}, + {"name":"PropertyTagPrintFlagsBleedWidth","kind":"const","vis":"public","signature":"Public Const PropertyTagPrintFlagsBleedWidth = &H5008"}, + {"name":"PropertyTagPrintFlagsBleedWidthScale","kind":"const","vis":"public","signature":"Public Const PropertyTagPrintFlagsBleedWidthScale = &H5009"}, + {"name":"PropertyTagPrintFlagsCrop","kind":"const","vis":"public","signature":"Public Const PropertyTagPrintFlagsCrop = &H5007"}, + {"name":"PropertyTagPrintFlagsVersion","kind":"const","vis":"public","signature":"Public Const PropertyTagPrintFlagsVersion = &H5006"}, + {"name":"PropertyTagREFBlackWhite","kind":"const","vis":"public","signature":"Public Const PropertyTagREFBlackWhite = &H0214"}, + {"name":"PropertyTagResolutionUnit","kind":"const","vis":"public","signature":"Public Const PropertyTagResolutionUnit = &H0128"}, + {"name":"PropertyTagResolutionXLengthUnit","kind":"const","vis":"public","signature":"Public Const PropertyTagResolutionXLengthUnit = &H5003"}, + {"name":"PropertyTagResolutionXUnit","kind":"const","vis":"public","signature":"Public Const PropertyTagResolutionXUnit = &H5001"}, + {"name":"PropertyTagResolutionYLengthUnit","kind":"const","vis":"public","signature":"Public Const PropertyTagResolutionYLengthUnit = &H5004"}, + {"name":"PropertyTagResolutionYUnit","kind":"const","vis":"public","signature":"Public Const PropertyTagResolutionYUnit = &H5002"}, + {"name":"PropertyTagRowsPerStrip","kind":"const","vis":"public","signature":"Public Const PropertyTagRowsPerStrip = &H0116"}, + {"name":"PropertyTagSMaxSampleValue","kind":"const","vis":"public","signature":"Public Const PropertyTagSMaxSampleValue = &H0155"}, + {"name":"PropertyTagSMinSampleValue","kind":"const","vis":"public","signature":"Public Const PropertyTagSMinSampleValue = &H0154"}, + {"name":"PropertyTagSRGBRenderingIntent","kind":"const","vis":"public","signature":"Public Const PropertyTagSRGBRenderingIntent = &H0303"}, + {"name":"PropertyTagSampleFormat","kind":"const","vis":"public","signature":"Public Const PropertyTagSampleFormat = &H0153"}, + {"name":"PropertyTagSamplesPerPixel","kind":"const","vis":"public","signature":"Public Const PropertyTagSamplesPerPixel = &H0115"}, + {"name":"PropertyTagSoftwareUsed","kind":"const","vis":"public","signature":"Public Const PropertyTagSoftwareUsed = &H0131"}, + {"name":"PropertyTagStripBytesCount","kind":"const","vis":"public","signature":"Public Const PropertyTagStripBytesCount = &H0117"}, + {"name":"PropertyTagStripOffsets","kind":"const","vis":"public","signature":"Public Const PropertyTagStripOffsets = &H0111"}, + {"name":"PropertyTagSubfileType","kind":"const","vis":"public","signature":"Public Const PropertyTagSubfileType = &H00FF"}, + {"name":"PropertyTagT4Option","kind":"const","vis":"public","signature":"Public Const PropertyTagT4Option = &H0124"}, + {"name":"PropertyTagT6Option","kind":"const","vis":"public","signature":"Public Const PropertyTagT6Option = &H0125"}, + {"name":"PropertyTagTargetPrinter","kind":"const","vis":"public","signature":"Public Const PropertyTagTargetPrinter = &H0151"}, + {"name":"PropertyTagThreshHolding","kind":"const","vis":"public","signature":"Public Const PropertyTagThreshHolding = &H0107"}, + {"name":"PropertyTagThumbnailArtist","kind":"const","vis":"public","signature":"Public Const PropertyTagThumbnailArtist = &H5034"}, + {"name":"PropertyTagThumbnailBitsPerSample","kind":"const","vis":"public","signature":"Public Const PropertyTagThumbnailBitsPerSample = &H5022"}, + {"name":"PropertyTagThumbnailColorDepth","kind":"const","vis":"public","signature":"Public Const PropertyTagThumbnailColorDepth = &H5015"}, + {"name":"PropertyTagThumbnailCompressedSize","kind":"const","vis":"public","signature":"Public Const PropertyTagThumbnailCompressedSize = &H5019"}, + {"name":"PropertyTagThumbnailCompression","kind":"const","vis":"public","signature":"Public Const PropertyTagThumbnailCompression = &H5023"}, + {"name":"PropertyTagThumbnailCopyRight","kind":"const","vis":"public","signature":"Public Const PropertyTagThumbnailCopyRight = &H503B"}, + {"name":"PropertyTagThumbnailData","kind":"const","vis":"public","signature":"Public Const PropertyTagThumbnailData = &H501B"}, + {"name":"PropertyTagThumbnailDateTime","kind":"const","vis":"public","signature":"Public Const PropertyTagThumbnailDateTime = &H5033"}, + {"name":"PropertyTagThumbnailEquipMake","kind":"const","vis":"public","signature":"Public Const PropertyTagThumbnailEquipMake = &H5026"}, + {"name":"PropertyTagThumbnailEquipModel","kind":"const","vis":"public","signature":"Public Const PropertyTagThumbnailEquipModel = &H5027"}, + {"name":"PropertyTagThumbnailFormat","kind":"const","vis":"public","signature":"Public Const PropertyTagThumbnailFormat = &H5012"}, + {"name":"PropertyTagThumbnailHeight","kind":"const","vis":"public","signature":"Public Const PropertyTagThumbnailHeight = &H5014"}, + {"name":"PropertyTagThumbnailImageDescription","kind":"const","vis":"public","signature":"Public Const PropertyTagThumbnailImageDescription = &H5025"}, + {"name":"PropertyTagThumbnailImageHeight","kind":"const","vis":"public","signature":"Public Const PropertyTagThumbnailImageHeight = &H5021"}, + {"name":"PropertyTagThumbnailImageWidth","kind":"const","vis":"public","signature":"Public Const PropertyTagThumbnailImageWidth = &H5020"}, + {"name":"PropertyTagThumbnailOrientation","kind":"const","vis":"public","signature":"Public Const PropertyTagThumbnailOrientation = &H5029"}, + {"name":"PropertyTagThumbnailPhotometricInterp","kind":"const","vis":"public","signature":"Public Const PropertyTagThumbnailPhotometricInterp = &H5024"}, + {"name":"PropertyTagThumbnailPlanarConfig","kind":"const","vis":"public","signature":"Public Const PropertyTagThumbnailPlanarConfig = &H502F"}, + {"name":"PropertyTagThumbnailPlanes","kind":"const","vis":"public","signature":"Public Const PropertyTagThumbnailPlanes = &H5016"}, + {"name":"PropertyTagThumbnailPrimaryChromaticities","kind":"const","vis":"public","signature":"Public Const PropertyTagThumbnailPrimaryChromaticities = &H5036"}, + {"name":"PropertyTagThumbnailRawBytes","kind":"const","vis":"public","signature":"Public Const PropertyTagThumbnailRawBytes = &H5017"}, + {"name":"PropertyTagThumbnailRefBlackWhite","kind":"const","vis":"public","signature":"Public Const PropertyTagThumbnailRefBlackWhite = &H503A"}, + {"name":"PropertyTagThumbnailResolutionUnit","kind":"const","vis":"public","signature":"Public Const PropertyTagThumbnailResolutionUnit = &H5030"}, + {"name":"PropertyTagThumbnailResolutionX","kind":"const","vis":"public","signature":"Public Const PropertyTagThumbnailResolutionX = &H502D"}, + {"name":"PropertyTagThumbnailResolutionY","kind":"const","vis":"public","signature":"Public Const PropertyTagThumbnailResolutionY = &H502E"}, + {"name":"PropertyTagThumbnailRowsPerStrip","kind":"const","vis":"public","signature":"Public Const PropertyTagThumbnailRowsPerStrip = &H502B"}, + {"name":"PropertyTagThumbnailSamplesPerPixel","kind":"const","vis":"public","signature":"Public Const PropertyTagThumbnailSamplesPerPixel = &H502A"}, + {"name":"PropertyTagThumbnailSize","kind":"const","vis":"public","signature":"Public Const PropertyTagThumbnailSize = &H5018"}, + {"name":"PropertyTagThumbnailSoftwareUsed","kind":"const","vis":"public","signature":"Public Const PropertyTagThumbnailSoftwareUsed = &H5032"}, + {"name":"PropertyTagThumbnailStripBytesCount","kind":"const","vis":"public","signature":"Public Const PropertyTagThumbnailStripBytesCount = &H502C"}, + {"name":"PropertyTagThumbnailStripOffsets","kind":"const","vis":"public","signature":"Public Const PropertyTagThumbnailStripOffsets = &H5028"}, + {"name":"PropertyTagThumbnailTransferFunction","kind":"const","vis":"public","signature":"Public Const PropertyTagThumbnailTransferFunction = &H5031"}, + {"name":"PropertyTagThumbnailWhitePoint","kind":"const","vis":"public","signature":"Public Const PropertyTagThumbnailWhitePoint = &H5035"}, + {"name":"PropertyTagThumbnailWidth","kind":"const","vis":"public","signature":"Public Const PropertyTagThumbnailWidth = &H5013"}, + {"name":"PropertyTagThumbnailYCbCrCoefficients","kind":"const","vis":"public","signature":"Public Const PropertyTagThumbnailYCbCrCoefficients = &H5037"}, + {"name":"PropertyTagThumbnailYCbCrPositioning","kind":"const","vis":"public","signature":"Public Const PropertyTagThumbnailYCbCrPositioning = &H5039"}, + {"name":"PropertyTagThumbnailYCbCrSubsampling","kind":"const","vis":"public","signature":"Public Const PropertyTagThumbnailYCbCrSubsampling = &H5038"}, + {"name":"PropertyTagTileByteCounts","kind":"const","vis":"public","signature":"Public Const PropertyTagTileByteCounts = &H0145"}, + {"name":"PropertyTagTileLength","kind":"const","vis":"public","signature":"Public Const PropertyTagTileLength = &H0143"}, + {"name":"PropertyTagTileOffset","kind":"const","vis":"public","signature":"Public Const PropertyTagTileOffset = &H0144"}, + {"name":"PropertyTagTileWidth","kind":"const","vis":"public","signature":"Public Const PropertyTagTileWidth = &H0142"}, + {"name":"PropertyTagTransferFuncition","kind":"const","vis":"public","signature":"Public Const PropertyTagTransferFuncition = &H012D"}, + {"name":"PropertyTagTransferRange","kind":"const","vis":"public","signature":"Public Const PropertyTagTransferRange = &H0156"}, + {"name":"PropertyTagWhitePoint","kind":"const","vis":"public","signature":"Public Const PropertyTagWhitePoint = &H013E"}, + {"name":"PropertyTagXPosition","kind":"const","vis":"public","signature":"Public Const PropertyTagXPosition = &H011E"}, + {"name":"PropertyTagXResolution","kind":"const","vis":"public","signature":"Public Const PropertyTagXResolution = &H011A"}, + {"name":"PropertyTagYCbCrCoefficients","kind":"const","vis":"public","signature":"Public Const PropertyTagYCbCrCoefficients = &H0211"}, + {"name":"PropertyTagYCbCrPositioning","kind":"const","vis":"public","signature":"Public Const PropertyTagYCbCrPositioning = &H0213"}, + {"name":"PropertyTagYCbCrSubsampling","kind":"const","vis":"public","signature":"Public Const PropertyTagYCbCrSubsampling = &H0212"}, + {"name":"PropertyTagYPosition","kind":"const","vis":"public","signature":"Public Const PropertyTagYPosition = &H011F"}, + {"name":"PropertyTagYResolution","kind":"const","vis":"public","signature":"Public Const PropertyTagYResolution = &H011B"} + ] + }, + { + "name": "BitmapData", + "kind": "type", + "in": "GdipImaging", + "vis": "public", + "file": "GdiPlus/Imaging.twin", + "signature": "Public Type BitmapData", + "fields": [ + {"name":"Width","vis":"public","signature":"Width As Long"}, + {"name":"Height","vis":"public","signature":"Height As Long"}, + {"name":"Stride","vis":"public","signature":"Stride As Long"}, + {"name":"PixelFormat","vis":"public","signature":"PixelFormat As PixelFormat"}, + {"name":"Scan0","vis":"public","signature":"Scan0 As LongPtr"}, + {"name":"Reserved","vis":"public","signature":"Reserved As LongPtr"} + ], + "members": [] + }, + { + "name": "GpEncoderParameter", + "kind": "type", + "in": "GdipImaging", + "vis": "public", + "file": "GdiPlus/Imaging.twin", + "signature": "Public Type GpEncoderParameter", + "fields": [ + {"name":"Guid","vis":"public","signature":"Guid As GDIP_UUID"}, + {"name":"_count","vis":"public","signature":"_count As Long"}, + {"name":"_type","vis":"public","signature":"_type As GpEncoderParameterValueType"}, + {"name":"_address","vis":"public","signature":"_address As LongPtr"} + ], + "members": [ + {"name":"ASCII","kind":"property","vis":"public","signature":"Property Get ASCII(ByVal index&) As String","returnType":"String","accessor":"Get"}, + {"name":"AsDouble","kind":"property","vis":"public","signature":"Property Get AsDouble(ByVal index&) As Double","returnType":"Double","accessor":"Get"}, + {"name":"Binary","kind":"property","vis":"public","signature":"Property Get Binary(ByVal index&) As LongPtr","returnType":"LongPtr","accessor":"Get"}, + {"name":"Byte","kind":"property","vis":"public","signature":"Property Get Byte(ByVal index&) As Integer","returnType":"Integer","accessor":"Get"}, + {"name":"Count","kind":"property","vis":"public","signature":"Property Get Count() As Long","returnType":"Long","accessor":"Get"}, + {"name":"GetLongRange","kind":"sub","vis":"public","signature":"Sub GetLongRange(ByVal index&, from As LongLong, to As LongLong)"}, + {"name":"GetRational","kind":"sub","vis":"public","signature":"Sub GetRational(ByVal index&, num As LongLong, denom As LongLong)"}, + {"name":"GetRationalRange","kind":"sub","vis":"public","signature":"Sub GetRationalRange(ByVal index&, numdenoms() As LongLong)"}, + {"name":"IsASCII","kind":"property","vis":"public","signature":"Property Get IsASCII() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"IsBinary","kind":"property","vis":"public","signature":"Property Get IsBinary() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"IsByte","kind":"property","vis":"public","signature":"Property Get IsByte() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"IsLong","kind":"property","vis":"public","signature":"Property Get IsLong() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"IsLongRange","kind":"property","vis":"public","signature":"Property Get IsLongRange() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"IsRational","kind":"property","vis":"public","signature":"Property Get IsRational() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"IsRationalRange","kind":"property","vis":"public","signature":"Property Get IsRationalRange() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"IsShort","kind":"property","vis":"public","signature":"Property Get IsShort() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"IsUndefined","kind":"property","vis":"public","signature":"Property Get IsUndefined() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"Long","kind":"property","vis":"public","signature":"Property Get Long(ByVal index&) As LongLong","returnType":"LongLong","accessor":"Get"}, + {"name":"LongRange","kind":"property","vis":"public","signature":"Property Get LongRange(ByVal index&) As LongLong()","returnType":"LongLong()","accessor":"Get"}, + {"name":"Rational","kind":"property","vis":"public","signature":"Property Get Rational(ByVal index&) As Double","returnType":"Double","accessor":"Get"}, + {"name":"RationalRange","kind":"property","vis":"public","signature":"Property Get RationalRange(ByVal index&) As Double()","returnType":"Double()","accessor":"Get"}, + {"name":"Short","kind":"property","vis":"public","signature":"Property Get Short(ByVal index&) As Long","returnType":"Long","accessor":"Get"}, + {"name":"Type","kind":"property","vis":"public","signature":"Property Get Type() As GpEncoderParameterValueType","returnType":"GpEncoderParameterValueType","accessor":"Get"} + ] + }, + { + "name": "GpEncoderParametersHeader", + "kind": "type", + "in": "GdipImaging", + "vis": "public", + "file": "GdiPlus/Imaging.twin", + "signature": "Public Type GpEncoderParametersHeader", + "fields": [ + {"name":"Count","vis":"public","signature":"Count As Long"}, + {"name":"Parameter","vis":"public","signature":"Parameter(1) As GpEncoderParameter"} + ], + "members": [] + }, + { + "name": "GpImageCodecFlags", + "kind": "enum", + "in": "GdipImaging", + "vis": "public", + "file": "GdiPlus/Imaging.twin", + "signature": "Public Enum GpImageCodecFlags", + "attrs": [{"name":"Flags"}], + "values": [ + {"name":"ImageCodecFlagsEncoder","value":"&H00000001"}, + {"name":"ImageCodecFlagsDecoder","value":"&H00000002"}, + {"name":"ImageCodecFlagsSupportBitmap","value":"&H00000004"}, + {"name":"ImageCodecFlagsSupportVector","value":"&H00000008"}, + {"name":"ImageCodecFlagsSeekableEncode","value":"&H00000010"}, + {"name":"ImageCodecFlagsBlockingDecode","value":"&H00000020"}, + {"name":"ImageCodecFlagsBuiltin","value":"&H00010000"}, + {"name":"ImageCodecFlagsSystem","value":"&H00020000"}, + {"name":"ImageCodecFlagsUser","value":"&H00040000"} + ] + }, + { + "name": "GpImageCodecInfo", + "kind": "type", + "in": "GdipImaging", + "vis": "public", + "file": "GdiPlus/Imaging.twin", + "signature": "Public Type GpImageCodecInfo", + "fields": [ + {"name":"Clsid","vis":"public","signature":"Clsid As GDIP_UUID"}, + {"name":"FormatID","vis":"public","signature":"FormatID As GDIP_UUID"}, + {"name":"_codecName","vis":"public","signature":"_codecName As LongPtr"}, + {"name":"_dllName","vis":"public","signature":"_dllName As LongPtr"}, + {"name":"_formatDescription","vis":"public","signature":"_formatDescription As LongPtr"}, + {"name":"_filenameExtension","vis":"public","signature":"_filenameExtension As LongPtr"}, + {"name":"_mimeType","vis":"public","signature":"_mimeType As LongPtr"}, + {"name":"Flags","vis":"public","signature":"Flags As GpImageCodecFlags"}, + {"name":"Version","vis":"public","signature":"Version As Long"}, + {"name":"_sigCount","vis":"public","signature":"_sigCount As Long"}, + {"name":"_sigSize","vis":"public","signature":"_sigSize As Long"}, + {"name":"_sigPattern","vis":"public","signature":"_sigPattern As LongPtr"}, + {"name":"_sigMask","vis":"public","signature":"_sigMask As LongPtr"} + ], + "members": [ + {"name":"CodecName","kind":"property","vis":"public","signature":"Property Get CodecName() As String","returnType":"String","accessor":"Get"}, + {"name":"DllName","kind":"property","vis":"public","signature":"Property Get DllName() As String","returnType":"String","accessor":"Get"}, + {"name":"FilenameExtension","kind":"property","vis":"public","signature":"Property Get FilenameExtension() As String","returnType":"String","accessor":"Get"}, + {"name":"FormatDescription","kind":"property","vis":"public","signature":"Property Get FormatDescription() As String","returnType":"String","accessor":"Get"}, + {"name":"IsBlockingDecode","kind":"property","vis":"public","signature":"Property Get IsBlockingDecode() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"IsBuiltin","kind":"property","vis":"public","signature":"Property Get IsBuiltin() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"IsDecoder","kind":"property","vis":"public","signature":"Property Get IsDecoder() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"IsEncoder","kind":"property","vis":"public","signature":"Property Get IsEncoder() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"IsSeekableEncode","kind":"property","vis":"public","signature":"Property Get IsSeekableEncode() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"IsSupportBitmap","kind":"property","vis":"public","signature":"Property Get IsSupportBitmap() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"IsSupportVector","kind":"property","vis":"public","signature":"Property Get IsSupportVector() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"IsSystem","kind":"property","vis":"public","signature":"Property Get IsSystem() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"IsUser","kind":"property","vis":"public","signature":"Property Get IsUser() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"MimeType","kind":"property","vis":"public","signature":"Property Get MimeType() As String","returnType":"String","accessor":"Get"}, + {"name":"SigMask","kind":"property","vis":"public","signature":"Property Get SigMask(ByVal index&) As Byte()","returnType":"Byte()","accessor":"Get"}, + {"name":"SigPattern","kind":"property","vis":"public","signature":"Property Get SigPattern(ByVal index&) As Byte()","returnType":"Byte()","accessor":"Get"} + ] + }, + { + "name": "GpImageItemData", + "kind": "type", + "in": "GdipImaging", + "vis": "public", + "file": "GdiPlus/Imaging.twin", + "signature": "Public Type GpImageItemData", + "fields": [ + {"name":"Size","vis":"public","signature":"Size As Long"}, + {"name":"Position","vis":"public","signature":"Position As Long"}, + {"name":"Desc","vis":"public","signature":"Desc As LongPtr"}, + {"name":"DescSize","vis":"public","signature":"DescSize As Long"}, + {"name":"Data","vis":"public","signature":"Data As LongPtr"}, + {"name":"DataSize","vis":"public","signature":"DataSize As Long"}, + {"name":"Cookie","vis":"public","signature":"Cookie As Long"} + ], + "members": [] + }, + { + "name": "GpPropertyItem", + "kind": "type", + "in": "GdipImaging", + "vis": "public", + "file": "GdiPlus/Imaging.twin", + "signature": "Public Type GpPropertyItem", + "fields": [ + {"name":"Id","vis":"public","signature":"Id As PROPID"}, + {"name":"_length","vis":"public","signature":"_length As Long"}, + {"name":"_type","vis":"public","signature":"_type As Integer"}, + {"name":"_address","vis":"public","signature":"_address As LongPtr"} + ], + "members": [ + {"name":"AsDouble","kind":"property","vis":"public","signature":"Property Get AsDouble() As Double","returnType":"Double","accessor":"Get"}, + {"name":"GetRational","kind":"sub","vis":"public","signature":"Sub GetRational(num As LongLong, denom As LongLong)"}, + {"name":"GetSRational","kind":"sub","vis":"public","signature":"Sub GetSRational(num As Long, denom As Long)"}, + {"name":"IsASCII","kind":"property","vis":"public","signature":"Property Get IsASCII() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"IsByte","kind":"property","vis":"public","signature":"Property Get IsByte() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"IsDouble","kind":"property","vis":"public","signature":"Property Get IsDouble() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"IsLong","kind":"property","vis":"public","signature":"Property Get IsLong() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"IsRational","kind":"property","vis":"public","signature":"Property Get IsRational() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"IsSByte","kind":"property","vis":"public","signature":"Property Get IsSByte() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"IsSLong","kind":"property","vis":"public","signature":"Property Get IsSLong() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"IsSRational","kind":"property","vis":"public","signature":"Property Get IsSRational() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"IsSShort","kind":"property","vis":"public","signature":"Property Get IsSShort() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"IsShort","kind":"property","vis":"public","signature":"Property Get IsShort() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"IsSingle","kind":"property","vis":"public","signature":"Property Get IsSingle() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"IsUndefined","kind":"property","vis":"public","signature":"Property Get IsUndefined() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"TheASCII","kind":"property","vis":"public","signature":"Property Get TheASCII() As String","returnType":"String","accessor":"Get"}, + {"name":"TheByte","kind":"property","vis":"public","signature":"Property Get TheByte() As Integer","returnType":"Integer","accessor":"Get"}, + {"name":"TheDouble","kind":"property","vis":"public","signature":"Property Get TheDouble() As Double","returnType":"Double","accessor":"Get"}, + {"name":"TheLong","kind":"property","vis":"public","signature":"Property Get TheLong() As LongLong","returnType":"LongLong","accessor":"Get"}, + {"name":"TheRational","kind":"property","vis":"public","signature":"Property Get TheRational() As Double","returnType":"Double","accessor":"Get"}, + {"name":"TheSByte","kind":"property","vis":"public","signature":"Property Get TheSByte() As Byte","returnType":"Byte","accessor":"Get"}, + {"name":"TheSLong","kind":"property","vis":"public","signature":"Property Get TheSLong() As Long","returnType":"Long","accessor":"Get"}, + {"name":"TheSRational","kind":"property","vis":"public","signature":"Property Get TheSRational() As Double","returnType":"Double","accessor":"Get"}, + {"name":"TheSShort","kind":"property","vis":"public","signature":"Property Get TheSShort() As Integer","returnType":"Integer","accessor":"Get"}, + {"name":"TheShort","kind":"property","vis":"public","signature":"Property Get TheShort() As Long","returnType":"Long","accessor":"Get"}, + {"name":"TheSingle","kind":"property","vis":"public","signature":"Property Get TheSingle() As Single","returnType":"Single","accessor":"Get"}, + {"name":"Type","kind":"property","vis":"public","signature":"Property Get Type() As GpPropertyTagType","returnType":"GpPropertyTagType","accessor":"Get"} + ] + }, + { + "name": "GpPropertyTagType", + "kind": "enum", + "in": "GdipImaging", + "vis": "public", + "file": "GdiPlus/Imaging.twin", + "signature": "Enum GpPropertyTagType", + "values": [ + {"name":"MinPropertyTagType","value":"PropertyTagTypeByte"}, + {"name":"PropertyTagTypeByte","value":"1"}, + {"name":"PropertyTagTypeASCII","value":"2"}, + {"name":"PropertyTagTypeShort","value":"3"}, + {"name":"PropertyTagTypeLong","value":"4"}, + {"name":"PropertyTagTypeRational","value":"5"}, + {"name":"PropertyTagTypeSByte","value":"6"}, + {"name":"PropertyTagTypeUndefined","value":"7"}, + {"name":"PropertyTagTypeSShort","value":"8"}, + {"name":"PropertyTagTypeSLong","value":"9"}, + {"name":"PropertyTagTypeSRational","value":"10"}, + {"name":"PropertyTagTypeSingle","value":"11"}, + {"name":"PropertyTagTypeDouble","value":"12"}, + {"name":"MaxPropertyTagType","value":"PropertyTagTypeDouble"} + ] + }, + { + "name": "ImageFlags", + "kind": "enum", + "in": "GdipImaging", + "vis": "public", + "file": "GdiPlus/Imaging.twin", + "signature": "Public Enum ImageFlags", + "values": [ + {"name":"ImageFlagsNone","value":"0"}, + {"name":"ImageFlagsScalable","value":"&H0001"}, + {"name":"ImageFlagsHasAlpha","value":"&H0002"}, + {"name":"ImageFlagsHasTranslucent","value":"&H0004"}, + {"name":"ImageFlagsPartiallyScalable","value":"&H0008"}, + {"name":"ImageFlagsColorSpaceRGB","value":"&H0010"}, + {"name":"ImageFlagsColorSpaceCMYK","value":"&H0020"}, + {"name":"ImageFlagsColorSpaceGRAY","value":"&H0040"}, + {"name":"ImageFlagsColorSpaceYCBCR","value":"&H0080"}, + {"name":"ImageFlagsColorSpaceYCCK","value":"&H0100"}, + {"name":"ImageFlagsHasRealDPI","value":"&H1000"}, + {"name":"ImageFlagsHasRealPixelSize","value":"&H2000"}, + {"name":"ImageFlagsReadOnly","value":"&H00010000"}, + {"name":"ImageFlagsCaching","value":"&H00020000"} + ] + }, + { + "name": "ImageLockMode", + "kind": "enum", + "in": "GdipImaging", + "vis": "public", + "file": "GdiPlus/Imaging.twin", + "signature": "Public Enum ImageLockMode", + "attrs": [{"name":"Flags"}], + "values": [ + {"name":"ImageLockModeRead","value":"&H0001"}, + {"name":"ImageLockModeWrite","value":"&H0002"}, + {"name":"ImageLockModeUserInputBuf","value":"&H0004"} + ] + }, + { + "name": "ItemDataPosition", + "kind": "enum", + "in": "GdipImaging", + "vis": "public", + "file": "GdiPlus/Imaging.twin", + "signature": "Public Enum ItemDataPosition", + "values": [ + {"name":"ItemDataPositionAfterHeader","value":"&H0"}, + {"name":"ItemDataPositionAfterPalette","value":"&H1"}, + {"name":"ItemDataPositionAfterBits","value":"&H2"} + ] + }, + { + "name": "RotateFlipType", + "kind": "enum", + "in": "GdipImaging", + "vis": "public", + "file": "GdiPlus/Imaging.twin", + "signature": "Public Enum RotateFlipType", + "values": [ + {"name":"RotateNoneFlipNone","value":"0"}, + {"name":"Rotate90FlipNone","value":"1"}, + {"name":"Rotate180FlipNone","value":"2"}, + {"name":"Rotate270FlipNone","value":"3"}, + {"name":"RotateNoneFlipX","value":"4"}, + {"name":"Rotate90FlipX","value":"5"}, + {"name":"Rotate180FlipX","value":"6"}, + {"name":"Rotate270FlipX","value":"7"}, + {"name":"RotateNoneFlipY","value":"Rotate180FlipX"}, + {"name":"Rotate90FlipY","value":"Rotate270FlipX"}, + {"name":"Rotate180FlipY","value":"RotateNoneFlipX"}, + {"name":"Rotate270FlipY","value":"Rotate90FlipX"}, + {"name":"RotateNoneFlipXY","value":"Rotate180FlipNone"}, + {"name":"Rotate90FlipXY","value":"Rotate270FlipNone"}, + {"name":"Rotate180FlipXY","value":"RotateNoneFlipNone"}, + {"name":"Rotate270FlipXY","value":"Rotate90FlipNone"} + ] + }, + { + "name": "GdipImplementation", + "kind": "module", + "vis": "private", + "public": false, + "file": "GdiPlus/Implementation.twin", + "signature": "Private Module GdipImplementation", + "members": [ + {"name":"ASCIIToString","kind":"function","vis":"public","signature":"Function ASCIIToString(ByVal address As LongPtr, ByVal length As Long = -1) As String","returnType":"String"}, + {"name":"AlignTo","kind":"function","vis":"public","signature":"Function AlignTo(ByVal ptr As LongPtr, ByVal alignment&) As LongPtr","returnType":"LongPtr"}, + {"name":"AllocateStaticTrailingSA","kind":"function","vis":"public","signature":"Function AllocateStaticTrailingSA(ByVal newCount&, ByVal elementSize&, ByRef dataPtr As LongPtr, Optional ByRef count&) As GpStatus","returnType":"GpStatus","description":"Allocates an area for data, followed by a trailing static SAFEARRAY describing it.\nThe allocation is done using GdipAlloc. Any existing data is first freed using GdipFree."}, + {"name":"ArrayLen","kind":"function","vis":"public","signature":"Function ArrayLen(Of T)(array() As T) As Long","returnType":"Long","description":"Returns the first dimension of the array."}, + {"name":"ArrayPtr","kind":"function","vis":"public","signature":"Function ArrayPtr(Of T)(array() As T) As LongPtr","returnType":"LongPtr","description":"Returns pointer to the data block of the array"}, + {"name":"CStrLen","kind":"function","vis":"public","signature":"Function CStrLen(ByVal address As LongPtr) As Long","returnType":"Long"}, + {"name":"CheckModS","kind":"sub","vis":"public","signature":"Sub CheckModS()","attrs":[{"name":"DebugOnly"}]}, + {"name":"FADF_FIXEDSIZE","kind":"const","vis":"private","signature":"Private Const FADF_FIXEDSIZE = &H10%"}, + {"name":"FADF_STATIC","kind":"const","vis":"private","signature":"Private Const FADF_STATIC = &H2%"}, + {"name":"GTGetMem1","kind":"sub","vis":"private","declare":true,"signature":"Private DeclareWide PtrSafe Sub GTGetMem1 Lib \"\" Alias \"#3\" (ByVal Address As LongPtr, ByVal retAddress As LongPtr)","attrs":[{"name":"PreserveSig","args":"False"},{"name":"UseGetLastError","args":"False"},{"name":"DLLStackCheck","args":"False"}],"description":""}, + {"name":"GTGetMem2","kind":"sub","vis":"private","declare":true,"signature":"Private DeclareWide PtrSafe Sub GTGetMem2 Lib \"\" Alias \"#4\" (ByVal Address As LongPtr, ByVal retAddress As LongPtr)","attrs":[{"name":"PreserveSig","args":"False"},{"name":"UseGetLastError","args":"False"},{"name":"DLLStackCheck","args":"False"}],"description":""}, + {"name":"GTGetMem4","kind":"sub","vis":"private","declare":true,"signature":"Private DeclareWide PtrSafe Sub GTGetMem4 Lib \"\" Alias \"#5\" (ByVal Address As LongPtr, ByVal retAddress As LongPtr)","attrs":[{"name":"PreserveSig","args":"False"},{"name":"UseGetLastError","args":"False"},{"name":"DLLStackCheck","args":"False"}],"description":""}, + {"name":"GTGetMem8","kind":"sub","vis":"private","declare":true,"signature":"Private DeclareWide PtrSafe Sub GTGetMem8 Lib \"\" Alias \"#6\" (ByVal Address As LongPtr, ByVal retAddress As LongPtr)","attrs":[{"name":"PreserveSig","args":"False"},{"name":"UseGetLastError","args":"False"},{"name":"DLLStackCheck","args":"False"}],"description":""}, + {"name":"GTGetMemPtr","kind":"sub","vis":"private","declare":true,"signature":"Private DeclareWide PtrSafe Sub GTGetMemPtr Lib \"\" Alias \"#7\" (ByVal Address As LongPtr, ByVal retAddress As LongPtr)","attrs":[{"name":"PreserveSig","args":"False"},{"name":"UseGetLastError","args":"False"},{"name":"DLLStackCheck","args":"False"}],"description":""}, + {"name":"GdipLimitD","kind":"function","vis":"public","signature":"Function GdipLimitD(ByVal min#, ByVal val#, ByVal max#) As Double","returnType":"Double"}, + {"name":"GdipLimitL","kind":"function","vis":"public","signature":"Function GdipLimitL(ByVal min&, ByVal val&, ByVal max&) As Long","returnType":"Long"}, + {"name":"GdipLimitS","kind":"function","vis":"public","signature":"Function GdipLimitS(ByVal min!, ByVal val!, ByVal max!) As Single","returnType":"Single"}, + {"name":"GdipMax","kind":"function","vis":"public","signature":"Function GdipMax(ByVal a&, ByVal b&) As Long","returnType":"Long"}, + {"name":"GdipMax","kind":"function","vis":"public","signature":"Function GdipMax(ByVal a!, ByVal b!) As Single","returnType":"Single"}, + {"name":"GdipMax","kind":"function","vis":"public","signature":"Function GdipMax(ByVal a#, ByVal b#) As Double","returnType":"Double"}, + {"name":"GdipMax","kind":"function","vis":"public","signature":"Function GdipMax(ByVal a&, ByVal b&, ByVal c&) As Long","returnType":"Long"}, + {"name":"GdipMax","kind":"function","vis":"public","signature":"Function GdipMax(ByVal a!, ByVal b!, ByVal c!) As Single","returnType":"Single"}, + {"name":"GdipMax","kind":"function","vis":"public","signature":"Function GdipMax(ByVal a#, ByVal b#, ByVal c#) As Double","returnType":"Double"}, + {"name":"GdipMin","kind":"function","vis":"public","signature":"Function GdipMin(ByVal a&, ByVal b&) As Long","returnType":"Long"}, + {"name":"GdipMin","kind":"function","vis":"public","signature":"Function GdipMin(ByVal a!, ByVal b!) As Single","returnType":"Single"}, + {"name":"GdipMin","kind":"function","vis":"public","signature":"Function GdipMin(ByVal a#, ByVal b#) As Double","returnType":"Double"}, + {"name":"GdipMin","kind":"function","vis":"public","signature":"Function GdipMin(ByVal a&, ByVal b&, ByVal c&) As Long","returnType":"Long"}, + {"name":"GdipMin","kind":"function","vis":"public","signature":"Function GdipMin(ByVal a!, ByVal b!, ByVal c!) As Single","returnType":"Single"}, + {"name":"GdipMin","kind":"function","vis":"public","signature":"Function GdipMin(ByVal a#, ByVal b#, ByVal c#) As Double","returnType":"Double"}, + {"name":"GdipModD","kind":"function","vis":"public","signature":"Function GdipModD(ByVal a#, ByVal by#) As Single","returnType":"Single","description":"Modulo, but floating point"}, + {"name":"GdipModS","kind":"function","vis":"public","signature":"Function GdipModS(ByVal a!, ByVal by!) As Single","returnType":"Single","description":"Modulo, but floating point"}, + {"name":"GenericMonospaceFF","kind":"field","vis":"public","signature":"Public GenericMonospaceFF As FontFamily"}, + {"name":"GenericSansSerifFF","kind":"field","vis":"public","signature":"Public GenericSansSerifFF As FontFamily"}, + {"name":"GenericSerifFF","kind":"field","vis":"public","signature":"Public GenericSerifFF As FontFamily"}, + {"name":"GetStaticTrailingSA","kind":"function","vis":"public","signature":"Function GetStaticTrailingSA(Of T)(ByVal data As LongPtr, ByVal count As LongPtr) As T()","returnType":"T()","description":"Returs the static 1D view of data that was previously set up using InitStaticTrailingSA.\nDoes not allocate memory."}, + {"name":"GpArrayToObjArray","kind":"function","vis":"public","signature":"Function GpArrayToObjArray(Of T, U)(natives() As U) As T()","returnType":"T()"}, + {"name":"InitStaticTrailingSA","kind":"sub","vis":"public","signature":"Sub InitStaticTrailingSA(ByVal data As LongPtr, ByVal elementSize&, ByVal count As LongPtr)","description":"Sets up a static 1D view of data in the same allocation as the data.\nAssumes that there is enough extra space after the data to fit a STATICARRAY1D header.\nDoes not allocate memory."}, + {"name":"ObjArrayToGpArray","kind":"function","vis":"public","signature":"Function ObjArrayToGpArray(Of U, T)(objects() As T) As U()","returnType":"U()"}, + {"name":"ReDimOversized","kind":"sub","vis":"public","signature":"Sub ReDimOversized(Of T)(array() As T, ByVal lbound&, ByVal ubound&, ByVal requiredByteSize&, ByVal preserve As Boolean = False)","description":"Redims an array from lbound to ubound.\nEnsures that total allocated size is at least requiredByteSize."}, + {"name":"RotateAtImpl","kind":"function","vis":"public","signature":"Function RotateAtImpl(Of T)(ByVal obj As T, ByVal angle!, ByVal center As GpPointF, ByVal order As GpMatrixOrder = MatrixOrderPrepend) As GpStatus","returnType":"GpStatus"}, + {"name":"SafeArrayAllocDescriptor","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function SafeArrayAllocDescriptor Lib \"oleaut32\" (ByVal cDims As Long, ppsaOut As Any) As Long","returnType":"Long"}, + {"name":"SetCElements","kind":"sub","vis":"private","signature":"Private Sub SetCElements(ByRef sa As GDIP_SAFEARRAY1D, ByVal count&)"}, + {"name":"SetFlag","kind":"function","vis":"public","signature":"Function SetFlag(Of T)(ByVal flags As T, ByVal flag As T, ByVal value As Boolean) As T","returnType":"T"}, + {"name":"SetOversizedCount","kind":"sub","vis":"public","signature":"Sub SetOversizedCount(Of T)(array() As T, ByVal count&)"}, + {"name":"SetStaticSA","kind":"sub","vis":"public","signature":"Sub SetStaticSA(ByRef sa As GDIP_SAFEARRAY1D, ByVal elementSize&, ByVal data As LongPtr, ByVal count&)","description":"Sets sa to be a 1D static view into data. Existing value of sa, if any, is discarded.\nIf sa was previously pointing to dynamically allocated data, that memory will be leaked."}, + {"name":"ShearImpl","kind":"function","vis":"public","signature":"Function ShearImpl(Of T)(ByVal obj As T, ByVal shearX!, ByVal shearY!, ByVal order As GpMatrixOrder = MatrixOrderPrepend) As GpStatus","returnType":"GpStatus"}, + {"name":"StaticSA","kind":"function","vis":"public","signature":"Function StaticSA(Of T)(ByVal data As LongPtr, ByVal count&) As T()","returnType":"T()","description":"Returns a static 1D view of data."}, + {"name":"TGetMem1","kind":"sub","vis":"public","signature":"Sub TGetMem1(Of T)(ByVal from As LongPtr, ByRef to As T)"}, + {"name":"TGetMem2","kind":"sub","vis":"public","signature":"Sub TGetMem2(Of T)(ByVal from As LongPtr, ByRef to As T)"}, + {"name":"TGetMem4","kind":"sub","vis":"public","signature":"Sub TGetMem4(Of T)(ByVal from As LongPtr, ByRef to As T)"}, + {"name":"TGetMem8","kind":"sub","vis":"public","signature":"Sub TGetMem8(Of T)(ByVal from As LongPtr, ByRef to As T)"}, + {"name":"TGetMemPtr","kind":"sub","vis":"public","signature":"Sub TGetMemPtr(Of T)(ByVal from As LongPtr, ByRef to As T)"}, + {"name":"TPutMem1","kind":"sub","vis":"public","signature":"Sub TPutMem1(Of T)(ByVal to As LongPtr, ByVal from As T)"}, + {"name":"TPutMem2","kind":"sub","vis":"public","signature":"Sub TPutMem2(Of T)(ByVal to As LongPtr, ByVal from As T)"}, + {"name":"TPutMem4","kind":"sub","vis":"public","signature":"Sub TPutMem4(Of T)(ByVal to As LongPtr, ByVal from As T)"}, + {"name":"TPutMem8","kind":"sub","vis":"public","signature":"Sub TPutMem8(Of T)(ByVal to As LongPtr, ByVal from As T)"}, + {"name":"TPutMemPtr","kind":"sub","vis":"public","signature":"Sub TPutMemPtr(Of T)(ByVal to As LongPtr, ByVal from As T)"}, + {"name":"WCStrLen","kind":"function","vis":"public","signature":"Function WCStrLen(ByVal address As LongPtr) As Long","returnType":"Long"}, + {"name":"WCharToString","kind":"function","vis":"public","signature":"Function WCharToString(ByVal address As LongPtr, ByVal length As Long = -1) As String","returnType":"String"}, + {"name":"gdiPlusRefCount","kind":"field","vis":"public","signature":"Public gdiPlusRefCount& = 0"}, + {"name":"gdiPlusToken","kind":"field","vis":"public","signature":"Public gdiPlusToken As GpToken"}, + {"name":"vbaCopyBytesRef","kind":"function","vis":"public","declare":true,"signature":"Public DeclareWide PtrSafe Function vbaCopyBytesRef Lib \"\" Alias \"#16\" (ByVal length As Long, dest As Any, src As Any) As LongPtr","returnType":"LongPtr","attrs":[{"name":"PreserveSig","args":"False"},{"name":"UseGetLastError","args":"False"},{"name":"DLLStackCheck","args":"False"}],"description":""} + ] + }, + { + "name": "GDIP_SAFEARRAY1D", + "kind": "type", + "in": "GdipImplementation", + "vis": "private", + "public": false, + "file": "GdiPlus/Implementation.twin", + "signature": "Private Type GDIP_SAFEARRAY1D", + "fields": [ + {"name":"cDims","vis":"public","signature":"cDims As Integer"}, + {"name":"fFeatures","vis":"public","signature":"fFeatures As Integer"}, + {"name":"cbElements","vis":"public","signature":"cbElements As Long"}, + {"name":"cLocks","vis":"public","signature":"cLocks As Long"}, + {"name":"pvData","vis":"public","signature":"pvData As LongPtr"}, + {"name":"Bounds","vis":"public","signature":"Bounds As GDIP_SAFEARRAYBOUND"} + ], + "members": [] + }, + { + "name": "GDIP_SAFEARRAYBOUND", + "kind": "type", + "in": "GdipImplementation", + "vis": "private", + "public": false, + "file": "GdiPlus/Implementation.twin", + "signature": "Private Type GDIP_SAFEARRAYBOUND", + "fields": [ + {"name":"cElements","vis":"public","signature":"cElements As Long"}, + {"name":"lLbound","vis":"public","signature":"lLbound As Long"} + ], + "members": [] + }, + { + "name": "GdipInstalledFontCollection", + "kind": "module", + "vis": "public", + "file": "GdiPlus/InstalledFontCollection.twin", + "signature": "Module GdipInstalledFontCollection", + "members": [ + {"name":"GpInstalledFontCollection","kind":"function","vis":"public","signature":"Function GpInstalledFontCollection() As GpInstalledFontCollection","returnType":"GpInstalledFontCollection"}, + {"name":"InstalledFontCollection","kind":"function","vis":"public","signature":"Function InstalledFontCollection() As InstalledFontCollection","returnType":"InstalledFontCollection"} + ] + }, + { + "name": "GpInstalledFontCollection", + "kind": "type", + "in": "GdipInstalledFontCollection", + "vis": "public", + "file": "GdiPlus/InstalledFontCollection.twin", + "signature": "Type GpInstalledFontCollection", + "fields": [ + {"name":"Native","vis":"public","signature":"Native As LongPtr"} + ], + "members": [ + {"name":"Create","kind":"function","vis":"public","signature":"Function Create() As GpStatus","returnType":"GpStatus"}, + {"name":"CreateInto","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function CreateInto Lib \"gdiplus\" Alias \"GdipNewInstalledFontCollection\" (fc As GpInstalledFontCollection) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetFamilyCount","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function GetFamilyCount Lib \"gdiplus\" Alias \"GdipGetFontCollectionFamilyCount\" (ByVal Me As GpFontCollection, numFound&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetFamilyList","kind":"function","vis":"public","signature":"Function GetFamilyList(list() As GpFontFamily) As GpStatus","returnType":"GpStatus"} + ] + }, + { + "name": "GdipLineCap", + "kind": "module", + "vis": "public", + "file": "GdiPlus/LineCap.twin", + "signature": "Module GdipLineCap", + "members": [ + {"name":"CustomLineCap","kind":"function","vis":"public","signature":"Function CustomLineCap(fillPath As GraphicsPath, strokePath As GraphicsPath, ByVal baseCap As GpLineCap = linecapflat, ByVal baseInset& = 0) As CustomLineCap","returnType":"CustomLineCap"}, + {"name":"CustomLineCap","kind":"function","vis":"public","signature":"Function CustomLineCap(ByVal native As GpCustomLineCap) As CustomLineCap","returnType":"CustomLineCap"}, + {"name":"GetStrokeCapsImpl","kind":"function","vis":"public","signature":"Function GetStrokeCapsImpl(Of T)(ByVal Me As T, Optional startCap As GpLineCap, Optional endCap As GpLineCap) As GpStatus","returnType":"GpStatus"}, + {"name":"GpCustomLineCap","kind":"function","vis":"public","signature":"Function GpCustomLineCap() As GpCustomLineCap","returnType":"GpCustomLineCap"}, + {"name":"SetStrokeCapsImpl","kind":"function","vis":"public","signature":"Function SetStrokeCapsImpl(Of T)(ByVal Me As T, ByVal startCap As GpLineCap = -1, ByVal endCap As GpLineCap = -1) As GpStatus","returnType":"GpStatus"} + ] + }, + { + "name": "GpCustomLineCap", + "kind": "type", + "in": "GdipLineCap", + "vis": "public", + "file": "GdiPlus/LineCap.twin", + "signature": "Type GpCustomLineCap", + "fields": [ + {"name":"Native","vis":"public","signature":"Native As LongPtr"} + ], + "members": [ + {"name":"Clone","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function Clone Lib \"gdiplus\" Alias \"GdipCloneCustomLineCap\" (ByVal Me As GpCustomLineCap, clonedCap As GpCustomLineCap) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"CreateInto","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function CreateInto Lib \"gdiplus\" Alias \"GdipCreateCustomLineCap\" (ByVal fillPath As GpPath, ByVal strokePath As GpPath, ByVal baseCap As GpLineCap, ByVal baseInset As Single, customCap As GpCustomLineCap) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"Delete","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function Delete Lib \"gdiplus\" Alias \"GdipDeleteCustomLineCap\" (ByVal Me As GpCustomLineCap) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetBaseCap","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function GetBaseCap Lib \"gdiplus\" Alias \"GdipGetCustomLineCapBaseCap\" (ByVal Me As GpCustomLineCap, baseCap As GpLineCap) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetBaseInset","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function GetBaseInset Lib \"gdiplus\" Alias \"GdipGetCustomLineCapBaseInset\" (ByVal Me As GpCustomLineCap, inset As Single) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetStrokeCaps","kind":"function","vis":"public","signature":"Function GetStrokeCaps(Optional startCap As GpLineCap, Optional endCap As GpLineCap) As GpStatus","returnType":"GpStatus"}, + {"name":"GetStrokeCaps2","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function GetStrokeCaps2 Lib \"gdiplus\" Alias \"GdipGetCustomLineCapStrokeCaps\" (ByVal Me As GpCustomLineCap, startCap As GpLineCap, endCap As GpLineCap) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetStrokeJoin","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function GetStrokeJoin Lib \"gdiplus\" Alias \"GdipGetCustomLineCapStrokeJoin\" (ByVal Me As GpCustomLineCap, lineJoin As GpLineJoin) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetType","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function GetType Lib \"gdiplus\" Alias \"GdipGetCustomLineCapType\" (ByVal Me As GpCustomLineCap, capType As GpCustomLineCapType) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetWidthScale","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function GetWidthScale Lib \"gdiplus\" Alias \"GdipGetCustomLineCapWidthScale\" (ByVal Me As GpCustomLineCap, widthScale As Single) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetBaseCap","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function SetBaseCap Lib \"gdiplus\" Alias \"GdipSetCustomLineCapBaseCap\" (ByVal Me As GpCustomLineCap, ByVal baseCap As GpLineCap) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetBaseInset","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function SetBaseInset Lib \"gdiplus\" Alias \"GdipSetCustomLineCapBaseInset\" (ByVal Me As GpCustomLineCap, ByVal inset As Single) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetStrokeCap","kind":"function","vis":"public","signature":"Function SetStrokeCap(ByVal cap As GpLineCap) As GpStatus","returnType":"GpStatus"}, + {"name":"SetStrokeCaps","kind":"function","vis":"public","signature":"Function SetStrokeCaps(ByVal startCap As GpLineCap = -1, ByVal endCap As GpLineCap = -1) As GpStatus","returnType":"GpStatus"}, + {"name":"SetStrokeCaps2","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function SetStrokeCaps2 Lib \"gdiplus\" Alias \"GdipSetCustomLineCapStrokeCaps\" (ByVal Me As GpCustomLineCap, ByVal startCap As GpLineCap, ByVal endCap As GpLineCap) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetStrokeJoin","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function SetStrokeJoin Lib \"gdiplus\" Alias \"GdipSetCustomLineCapStrokeJoin\" (ByVal Me As GpCustomLineCap, ByVal lineJoin As GpLineJoin) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetWidthScale","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function SetWidthScale Lib \"gdiplus\" Alias \"GdipSetCustomLineCapWidthScale\" (ByVal Me As GpCustomLineCap, ByVal widthScale As Single) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]} + ] + }, + { + "name": "GdipLineGradient", + "kind": "module", + "vis": "public", + "file": "GdiPlus/LinearGradientBrush.twin", + "signature": "Module GdipLineGradient", + "members": [ + {"name":"GpLineGradient","kind":"function","vis":"public","signature":"Function GpLineGradient() As GpLineGradient","returnType":"GpLineGradient"}, + {"name":"GpLineGradient","kind":"function","vis":"public","signature":"Function GpLineGradient(nativeBrush As GpBrush) As GpLineGradient","returnType":"GpLineGradient"}, + {"name":"LinearGradientBrush","kind":"function","vis":"public","signature":"Function LinearGradientBrush(rect As GpRectF, ByVal rgb1&, ByVal rgb2&) As LinearGradientBrush","returnType":"LinearGradientBrush"}, + {"name":"LinearGradientBrush","kind":"function","vis":"public","signature":"Function LinearGradientBrush(rect As GpRectF, ByVal color1 As Color, ByVal color2 As Color) As LinearGradientBrush","returnType":"LinearGradientBrush"}, + {"name":"LinearGradientBrush","kind":"function","vis":"public","signature":"Function LinearGradientBrush(rect As GpRect, ByVal rgb1&, ByVal rgb2&) As LinearGradientBrush","returnType":"LinearGradientBrush"}, + {"name":"LinearGradientBrush","kind":"function","vis":"public","signature":"Function LinearGradientBrush(rect As GpRect, ByVal color1 As Color, ByVal color2 As Color) As LinearGradientBrush","returnType":"LinearGradientBrush"}, + {"name":"LinearGradientBrush","kind":"function","vis":"public","signature":"Function LinearGradientBrush(ByVal point1 As GpPointF, ByVal point2 As GpPointF, ByVal rgb1&, ByVal rgb2&) As LinearGradientBrush","returnType":"LinearGradientBrush"}, + {"name":"LinearGradientBrush","kind":"function","vis":"public","signature":"Function LinearGradientBrush(ByVal point1 As GpPointF, ByVal point2 As GpPointF, ByVal color1 As Color, ByVal color2 As Color) As LinearGradientBrush","returnType":"LinearGradientBrush"}, + {"name":"LinearGradientBrush","kind":"function","vis":"public","signature":"Function LinearGradientBrush(ByVal point1 As GpPoint, ByVal point2 As GpPoint, ByVal rgb1&, ByVal rgb2&) As LinearGradientBrush","returnType":"LinearGradientBrush"}, + {"name":"LinearGradientBrush","kind":"function","vis":"public","signature":"Function LinearGradientBrush(ByVal point1 As GpPoint, ByVal point2 As GpPoint, ByVal color1 As Color, ByVal color2 As Color) As LinearGradientBrush","returnType":"LinearGradientBrush"}, + {"name":"LinearGradientBrush","kind":"function","vis":"public","signature":"Function LinearGradientBrush(rect As GpRectF, ByVal rgb1&, ByVal rgb2&, ByVal mode As GpLinearGradientMode) As LinearGradientBrush","returnType":"LinearGradientBrush"}, + {"name":"LinearGradientBrush","kind":"function","vis":"public","signature":"Function LinearGradientBrush(rect As GpRectF, ByVal color1 As Color, ByVal color2 As Color, ByVal mode As GpLinearGradientMode) As LinearGradientBrush","returnType":"LinearGradientBrush"}, + {"name":"LinearGradientBrush","kind":"function","vis":"public","signature":"Function LinearGradientBrush(rect As GpRect, ByVal rgb1&, ByVal rgb2&, ByVal mode As GpLinearGradientMode) As LinearGradientBrush","returnType":"LinearGradientBrush"}, + {"name":"LinearGradientBrush","kind":"function","vis":"public","signature":"Function LinearGradientBrush(rect As GpRect, ByVal color1 As Color, ByVal color2 As Color, ByVal mode As GpLinearGradientMode) As LinearGradientBrush","returnType":"LinearGradientBrush"}, + {"name":"LinearGradientBrush","kind":"function","vis":"public","signature":"Function LinearGradientBrush(rect As GpRectF, ByVal rgb1&, ByVal rgb2&, ByVal angle!, ByVal isAngleScalable As Boolean = False) As LinearGradientBrush","returnType":"LinearGradientBrush"}, + {"name":"LinearGradientBrush","kind":"function","vis":"public","signature":"Function LinearGradientBrush(rect As GpRectF, ByVal color1 As Color, ByVal color2 As Color, ByVal angle!, ByVal isAngleScalable As Boolean = False) As LinearGradientBrush","returnType":"LinearGradientBrush"}, + {"name":"LinearGradientBrush","kind":"function","vis":"public","signature":"Function LinearGradientBrush(rect As GpRect, ByVal rgb1&, ByVal rgb2&, ByVal angle!, ByVal isAngleScalable As Boolean = False) As LinearGradientBrush","returnType":"LinearGradientBrush"}, + {"name":"LinearGradientBrush","kind":"function","vis":"public","signature":"Function LinearGradientBrush(rect As GpRect, ByVal color1 As Color, ByVal color2 As Color, ByVal angle!, ByVal isAngleScalable As Boolean = False) As LinearGradientBrush","returnType":"LinearGradientBrush"} + ] + }, + { + "name": "GpLineGradient", + "kind": "type", + "in": "GdipLineGradient", + "vis": "public", + "file": "GdiPlus/LinearGradientBrush.twin", + "signature": "Type GpLineGradient", + "fields": [ + {"name":"Native","vis":"public","signature":"Native As LongPtr"} + ], + "members": [ + {"name":"Clone","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function Clone Lib \"gdiplus\" Alias \"GdipCloneBrush\" (ByVal Me As GpLineGradient, cloneBrush As GpLineGradient) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"Create","kind":"function","vis":"public","signature":"Function Create(ByVal point1 As GpPointF, ByVal point2 As GpPointF, ByVal color1 As Color, ByVal color2 As Color, ByVal wrapMode As GpWrapMode) As GpStatus","returnType":"GpStatus"}, + {"name":"CreateFromRect","kind":"function","vis":"public","signature":"Function CreateFromRect(rect As GpRectF, ByVal color1 As Color, ByVal color2 As Color, ByVal mode As GpLinearGradientMode, ByVal wrapMode As GpWrapMode) As GpStatus","returnType":"GpStatus"}, + {"name":"CreateFromRectI","kind":"function","vis":"public","signature":"Function CreateFromRectI(rect As GpRect, ByVal color1 As Color, ByVal color2 As Color, ByVal mode As GpLinearGradientMode, ByVal wrapMode As GpWrapMode) As GpStatus","returnType":"GpStatus"}, + {"name":"CreateFromRectInto","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function CreateFromRectInto Lib \"gdiplus\" Alias \"GdipCreateLineBrushFromRect\" (Rect As GpRectF, ByVal color1 As Color, ByVal color2 As Color, ByVal mode As GpLinearGradientMode, ByVal wrapMode As GpWrapMode, lineGradient As GpLineGradient) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"CreateFromRectIntoI","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function CreateFromRectIntoI Lib \"gdiplus\" Alias \"GdipCreateLineBrushFromRectI\" (Rect As GpRect, ByVal color1 As Color, ByVal color2 As Color, ByVal mode As GpLinearGradientMode, ByVal wrapMode As GpWrapMode, lineGradient As GpLineGradient) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"CreateFromRectWithAngle","kind":"function","vis":"public","signature":"Function CreateFromRectWithAngle(rect As GpRectF, ByVal color1 As Color, ByVal color2 As Color, ByVal angle!, ByVal isAngleScalable As Boolean, ByVal wrapMode As GpWrapMode) As GpStatus","returnType":"GpStatus"}, + {"name":"CreateFromRectWithAngleI","kind":"function","vis":"public","signature":"Function CreateFromRectWithAngleI(rect As GpRect, ByVal color1 As Color, ByVal color2 As Color, ByVal angle!, ByVal isAngleScalable As Boolean, ByVal wrapMode As GpWrapMode) As GpStatus","returnType":"GpStatus"}, + {"name":"CreateFromRectWithAngleInto","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function CreateFromRectWithAngleInto Lib \"gdiplus\" Alias \"GdipCreateLineBrushFromRectWithAngle\" (Rect As GpRectF, ByVal color1 As Color, ByVal color2 As Color, ByVal angle!, ByVal isAngleScalable As GDIP_BOOL, ByVal wrapMode As GpWrapMode, lineGradient As GpLineGradient) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"CreateFromRectWithAngleIntoI","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function CreateFromRectWithAngleIntoI Lib \"gdiplus\" Alias \"GdipCreateLineBrushFromRectWithAngleI\" (Rect As GpRect, ByVal color1 As Color, ByVal color2 As Color, ByVal angle!, ByVal isAngleScalable As GDIP_BOOL, ByVal wrapMode As GpWrapMode, lineGradient As GpLineGradient) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"CreateI","kind":"function","vis":"public","signature":"Function CreateI(ByVal point1 As GpPoint, ByVal point2 As GpPoint, ByVal color1 As Color, ByVal color2 As Color, ByVal wrapMode As GpWrapMode) As GpStatus","returnType":"GpStatus"}, + {"name":"CreateInto","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function CreateInto Lib \"gdiplus\" Alias \"GdipCreateLineBrush\" (point1 As GpPointF, point2 As GpPointF, ByVal color1 As Color, ByVal color2 As Color, ByVal wrapMode As GpWrapMode, lineGradient As GpLineGradient) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"CreateIntoI","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function CreateIntoI Lib \"gdiplus\" Alias \"GdipCreateLineBrushI\" (point1 As GpPoint, point2 As GpPoint, ByVal color1 As Color, ByVal color2 As Color, ByVal wrapMode As GpWrapMode, lineGradient As GpLineGradient) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"Delete","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function Delete Lib \"gdiplus\" Alias \"GdipDeleteBrush\" (ByVal Me As GpLineGradient) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetBlend","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetBlend Lib \"gdiplus\" Alias \"GdipGetLineBlend\" (ByVal Me As GpLineGradient, blend!, positions!, ByVal count&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetBlendCount","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetBlendCount Lib \"gdiplus\" Alias \"GdipGetLineBlendCount\" (ByVal Me As GpLineGradient, count&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetGammaCorrection","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetGammaCorrection Lib \"gdiplus\" Alias \"GdipGetLineGammaCorrection\" (ByVal Me As GpLineGradient, useGammaCorrection As GDIP_BOOL) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetInterpolationColorCount","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetInterpolationColorCount Lib \"gdiplus\" Alias \"GdipGetLinePresetBlendCount\" (ByVal Me As GpLineGradient, count As Long) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetInterpolationColors","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetInterpolationColors Lib \"gdiplus\" Alias \"GdipGetLinePresetBlend\" (ByVal Me As GpLineGradient, blend As Color, positions As Single, ByVal count As Long) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetLinearColors","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetLinearColors Lib \"gdiplus\" Alias \"GdipGetLineColors\" (ByVal Me As GpLineGradient, colors As Color) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetLinearRGBs","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetLinearRGBs Lib \"gdiplus\" Alias \"GdipGetLineColors\" (ByVal Me As GpLineGradient, rgbs As Long) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetRectangle","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetRectangle Lib \"gdiplus\" Alias \"GdipGetLineRect\" (ByVal Me As GpLineGradient, rect As GpRectF) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetRectangleI","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetRectangleI Lib \"gdiplus\" Alias \"GdipGetLineRectI\" (ByVal Me As GpLineGradient, rect As GpRect) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetTransform","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetTransform Lib \"gdiplus\" Alias \"GdipGetLineTransform\" (ByVal Me As GpLineGradient, ByVal matrix As GpMatrix) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetType","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetType Lib \"gdiplus\" Alias \"GdipGetBrushType\" (ByVal Me As GpLineGradient, type As GpBrushType) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetWrapMode","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetWrapMode Lib \"gdiplus\" Alias \"GdipGetLineWrapMode\" (ByVal Me As GpLineGradient, wrapMode As GpWrapMode) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"MultiplyTransform","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function MultiplyTransform Lib \"gdiplus\" Alias \"GdipMultiplyLineTransform\" (ByVal Me As GpLineGradient, ByVal matrix As GpMatrix, ByVal order As GpMatrixOrder) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"Release","kind":"function","vis":"public","signature":"Function Release() As GpLineGradient","returnType":"GpLineGradient"}, + {"name":"ResetTransform","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function ResetTransform Lib \"gdiplus\" Alias \"GdipResetLineTransform\" (ByVal Me As GpLineGradient) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"RotateTransform","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function RotateTransform Lib \"gdiplus\" Alias \"GdipRotateLineTransform\" (ByVal Me As GpLineGradient, ByVal angle As Single, ByVal order As GpMatrixOrder) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"RotateTransformAt","kind":"function","vis":"public","signature":"Function RotateTransformAt(ByVal angle!, ByVal center As GpPointF, ByVal order As GpMatrixOrder = MatrixOrderPrepend) As GpStatus","returnType":"GpStatus"}, + {"name":"ScaleTransform","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function ScaleTransform Lib \"gdiplus\" Alias \"GdipScaleLineTransform\" (ByVal Me As GpLineGradient, ByVal sx As Single, ByVal sy As Single, ByVal order As GpMatrixOrder) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetBlend","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetBlend Lib \"gdiplus\" Alias \"GdipSetLineBlend\" (ByVal Me As GpLineGradient, blend!, positions!, ByVal count&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetBlendBellShape","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetBlendBellShape Lib \"gdiplus\" Alias \"GdipSetLineSigmaBlend\" (ByVal Me As GpLineGradient, ByVal focus As Single, ByVal scale As Single) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetBlendTriangularShape","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetBlendTriangularShape Lib \"gdiplus\" Alias \"GdipSetLineLinearBlend\" (ByVal Me As GpLineGradient, ByVal focus As Single, ByVal scale As Single) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetGammaCorrection","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetGammaCorrection Lib \"gdiplus\" Alias \"GdipSetLineGammaCorrection\" (ByVal Me As GpLineGradient, ByVal useGammaCorrection As GDIP_BOOL) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetInterpolationColors","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetInterpolationColors Lib \"gdiplus\" Alias \"GdipSetLinePresetBlend\" (ByVal Me As GpLineGradient, blend As Color, positions As Single, ByVal count As Long) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetLinearColors","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetLinearColors Lib \"gdiplus\" Alias \"GdipSetLineColors\" (ByVal Me As GpLineGradient, ByVal color1 As Color, ByVal color2 As Color) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetTransform","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetTransform Lib \"gdiplus\" Alias \"GdipSetLineTransform\" (ByVal Me As GpLineGradient, ByVal matrix As GpMatrix) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetWrapMode","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetWrapMode Lib \"gdiplus\" Alias \"GdipSetLineWrapMode\" (ByVal Me As GpLineGradient, ByVal wrapMode As GpWrapMode) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"ShearTransform","kind":"function","vis":"public","signature":"Function ShearTransform(ByVal shearX!, ByVal shearY!, ByVal order As GpMatrixOrder = MatrixOrderPrepend) As GpStatus","returnType":"GpStatus"}, + {"name":"TranslateTransform","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function TranslateTransform Lib \"gdiplus\" Alias \"GdipTranslateLineTransform\" (ByVal Me As GpLineGradient, ByVal dx As Single, ByVal dy As Single, ByVal order As GpMatrixOrder) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]} + ] + }, + { + "name": "GdipMatrix", + "kind": "module", + "vis": "public", + "file": "GdiPlus/Matrix.twin", + "signature": "Module GdipMatrix", + "members": [ + {"name":"GdipCreateMatrix","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function GdipCreateMatrix Lib \"gdiplus\" (matrix As GpMatrix) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetElementsImpl","kind":"function","vis":"private","signature":"Private Function GetElementsImpl(ByVal mx As GpMatrix, Optional m11!, Optional m12!, Optional m21!, Optional m22!, Optional dx!, Optional dy!) As GpStatus","returnType":"GpStatus"}, + {"name":"GetImpl","kind":"function","vis":"private","signature":"Private Function GetImpl(ByVal mx As GpMatrix, ByVal output As GpMatrix) As GpStatus","returnType":"GpStatus"}, + {"name":"GetOffsetImpl","kind":"function","vis":"private","signature":"Private Function GetOffsetImpl(ByVal mx As GpMatrix, Optional ofsX!, Optional ofsY!) As GpStatus","returnType":"GpStatus"}, + {"name":"GpMatrix","kind":"function","vis":"public","signature":"Function GpMatrix() As GpMatrix","returnType":"GpMatrix"}, + {"name":"Matrix","kind":"function","vis":"public","signature":"Function Matrix() As Matrix","returnType":"Matrix"}, + {"name":"Matrix","kind":"function","vis":"public","signature":"Function Matrix(ByVal m11!, ByVal m12!, ByVal m21!, ByVal m22!, ByVal dx!, ByVal dy!) As Matrix","returnType":"Matrix"}, + {"name":"Matrix","kind":"function","vis":"public","signature":"Function Matrix(rect As GpRectF, ByVal dstplg As GpPointF) As Matrix","returnType":"Matrix"}, + {"name":"Matrix","kind":"function","vis":"public","signature":"Function Matrix(rect As GpRect, ByVal dstplg As GpPoint) As Matrix","returnType":"Matrix"}, + {"name":"SetImpl","kind":"function","vis":"private","signature":"Private Function SetImpl(ByVal mx As GpMatrix, ByVal input As GpMatrix) As GpStatus","returnType":"GpStatus"}, + {"name":"SetOffsetImpl","kind":"function","vis":"private","signature":"Private Function SetOffsetImpl(ByVal mx As GpMatrix, Optional ByVal ofsX!, Optional ByVal ofsY!) As GpStatus","returnType":"GpStatus"} + ] + }, + { + "name": "GpMatrix", + "kind": "type", + "in": "GdipMatrix", + "vis": "public", + "file": "GdiPlus/Matrix.twin", + "signature": "Type GpMatrix", + "fields": [ + {"name":"Native","vis":"public","signature":"Native As LongPtr"} + ], + "members": [ + {"name":"Clone","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function Clone Lib \"gdiplus\" Alias \"GdipCloneMatrix\" (ByVal Me As GpMatrix, cloneMatrix As GpMatrix) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"Create","kind":"function","vis":"public","signature":"Function Create() As GpStatus","returnType":"GpStatus"}, + {"name":"CreateFromElementsInto","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function CreateFromElementsInto Lib \"gdiplus\" Alias \"GdipCreateMatrix2\" (ByVal m11 As Single, ByVal m12 As Single, ByVal m21 As Single, ByVal m22 As Single, ByVal Dx As Single, ByVal Dy As Single, matrix As GpMatrix) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"CreateFromRectPointInto","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function CreateFromRectPointInto Lib \"gdiplus\" Alias \"GdipCreateMatrix3\" (rect As GpRectF, dstplg As GpPointF, matrix As GpMatrix) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"CreateFromRectPointIntoI","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function CreateFromRectPointIntoI Lib \"gdiplus\" Alias \"GdipCreateMatrix3I\" (rect As GpRect, dstplg As GpPoint, matrix As GpMatrix) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"CreateInto","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function CreateInto Lib \"gdiplus\" Alias \"GdipCreateMatrix\" (matrix As GpMatrix) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"Delete","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function Delete Lib \"gdiplus\" Alias \"GdipDeleteMatrix\" (ByVal Me As GpMatrix) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetElements","kind":"function","vis":"public","signature":"Function GetElements(Optional m11!, Optional m12!, Optional m21!, Optional m22!, Optional dx!, Optional dy!) As GpStatus","returnType":"GpStatus"}, + {"name":"GetElements2","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function GetElements2 Lib \"gdiplus\" Alias \"GdipGetMatrixElements\" (ByVal Me As GpMatrix, matrixOut As Single) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetElementsArray","kind":"function","vis":"public","signature":"Function GetElementsArray(elts() As Single) As GpStatus","returnType":"GpStatus"}, + {"name":"GetOffset","kind":"function","vis":"public","signature":"Function GetOffset(ofs As GpPointF) As GpStatus","returnType":"GpStatus"}, + {"name":"GetOffsetX","kind":"function","vis":"public","signature":"Function GetOffsetX(ofsx!) As GpStatus","returnType":"GpStatus"}, + {"name":"GetOffsetY","kind":"function","vis":"public","signature":"Function GetOffsetY(ofsy!) As GpStatus","returnType":"GpStatus"}, + {"name":"GetTo","kind":"function","vis":"public","signature":"Function GetTo(ByVal other As GpMatrix) As GpStatus","returnType":"GpStatus"}, + {"name":"Invert","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function Invert Lib \"gdiplus\" Alias \"GdipInvertMatrix\" (ByVal Me As GpMatrix) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"IsEqualTo","kind":"function","vis":"public","signature":"Function IsEqualTo(ByVal matrix As GpMatrix, result As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"IsEqualTo2","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function IsEqualTo2 Lib \"gdiplus\" Alias \"GdipIsMatrixEqual\" (ByVal Me As GpMatrix, ByVal matrix2 As GpMatrix, result As GDIP_BOOL) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"IsIdentity","kind":"function","vis":"public","signature":"Function IsIdentity(result As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"IsIdentity2","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function IsIdentity2 Lib \"gdiplus\" Alias \"GdipIsMatrixIdentity\" (ByVal Me As GpMatrix, result As GDIP_BOOL) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"IsInvertible","kind":"function","vis":"public","signature":"Function IsInvertible(result As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"IsInvertible2","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function IsInvertible2 Lib \"gdiplus\" Alias \"GdipIsMatrixInvertible\" (ByVal Me As GpMatrix, result As GDIP_BOOL) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"Multiply","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function Multiply Lib \"gdiplus\" Alias \"GdipMultiplyMatrix\" (ByVal Me As GpMatrix, ByVal matrix2 As GpMatrix, ByVal order As GpMatrixOrder = MatrixOrderPrepend) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"Reset","kind":"function","vis":"public","signature":"Function Reset() As GpStatus","returnType":"GpStatus"}, + {"name":"Rotate","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function Rotate Lib \"gdiplus\" Alias \"GdipRotateMatrix\" (ByVal Me As GpMatrix, ByVal angle As Single, ByVal order As GpMatrixOrder = MatrixOrderPrepend) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"RotateAt","kind":"function","vis":"public","signature":"Function RotateAt(ByVal angle!, ByVal center As GpPointF, ByVal order As GpMatrixOrder = MatrixOrderPrepend) As GpStatus","returnType":"GpStatus"}, + {"name":"RotateTransform","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function RotateTransform Lib \"gdiplus\" Alias \"GdipRotateMatrix\" (ByVal Me As GpMatrix, ByVal angle As Single, ByVal order As GpMatrixOrder = MatrixOrderPrepend) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"Scale","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function Scale Lib \"gdiplus\" Alias \"GdipScaleMatrix\" (ByVal Me As GpMatrix, ByVal scaleX As Single, ByVal scaleY As Single, ByVal order As GpMatrixOrder = MatrixOrderPrepend) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetElements","kind":"function","vis":"public","signature":"Function SetElements(ByVal m11!, ByVal m12!, ByVal m21!, ByVal m22!, ByVal dx!, ByVal dy!) As GpStatus","returnType":"GpStatus"}, + {"name":"SetElements2","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function SetElements2 Lib \"gdiplus\" Alias \"GdipSetMatrixElements\" (ByVal Me As GpMatrix, ByVal m11 As Single, ByVal m12 As Single, ByVal m21 As Single, ByVal m22 As Single, ByVal Dx As Single, ByVal Dy As Single) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetElementsArray","kind":"function","vis":"public","signature":"Function SetElementsArray(elts() As Single) As GpStatus","returnType":"GpStatus"}, + {"name":"SetFrom","kind":"function","vis":"public","signature":"Function SetFrom(ByVal other As GpMatrix) As GpStatus","returnType":"GpStatus"}, + {"name":"SetOffset","kind":"function","vis":"public","signature":"Function SetOffset(ByVal ofs As GpPointF) As GpStatus","returnType":"GpStatus"}, + {"name":"SetOffsetX","kind":"function","vis":"public","signature":"Function SetOffsetX(ByVal ofsX!) As GpStatus","returnType":"GpStatus"}, + {"name":"SetOffsetY","kind":"function","vis":"public","signature":"Function SetOffsetY(ByVal ofsY!) As GpStatus","returnType":"GpStatus"}, + {"name":"Shear","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function Shear Lib \"gdiplus\" Alias \"GdipShearMatrix\" (ByVal Me As GpMatrix, ByVal shearX As Single, ByVal shearY As Single, ByVal order As GpMatrixOrder = MatrixOrderPrepend) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"TransformPoint","kind":"function","vis":"public","signature":"Function TransformPoint(pt As GpPointF) As GpStatus","returnType":"GpStatus"}, + {"name":"TransformPointI","kind":"function","vis":"public","signature":"Function TransformPointI(pt As GpPoint) As GpStatus","returnType":"GpStatus"}, + {"name":"TransformPoints","kind":"function","vis":"public","signature":"Function TransformPoints(points() As GpPointF) As GpStatus","returnType":"GpStatus"}, + {"name":"TransformPoints2","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function TransformPoints2 Lib \"gdiplus\" Alias \"GdipTransformMatrixPoints\" (ByVal Me As GpMatrix, pts As GpPointF, ByVal count As Long) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"TransformPoints2I","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function TransformPoints2I Lib \"gdiplus\" Alias \"GdipTransformMatrixPointsI\" (ByVal Me As GpMatrix, pts As GpPoint, ByVal count As Long) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"TransformPointsI","kind":"function","vis":"public","signature":"Function TransformPointsI(points() As GpPoint) As GpStatus","returnType":"GpStatus"}, + {"name":"Translate","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function Translate Lib \"gdiplus\" Alias \"GdipTranslateMatrix\" (ByVal Me As GpMatrix, ByVal offsetX As Single, ByVal offsetY As Single, ByVal order As GpMatrixOrder = MatrixOrderPrepend) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"TranslateP","kind":"function","vis":"public","signature":"Function TranslateP(ByVal by As GpPointF, ByVal order As GpMatrixOrder = MatrixOrderPrepend) As GpStatus","returnType":"GpStatus"}, + {"name":"TranslateTransform","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function TranslateTransform Lib \"gdiplus\" Alias \"GdipTranslateMatrix\" (ByVal Me As GpMatrix, ByVal offsetX As Single, ByVal offsetY As Single, ByVal order As GpMatrixOrder = MatrixOrderPrepend) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"VectorTransformPoint","kind":"function","vis":"public","signature":"Function VectorTransformPoint(pt As GpPointF) As GpStatus","returnType":"GpStatus"}, + {"name":"VectorTransformPointI","kind":"function","vis":"public","signature":"Function VectorTransformPointI(pt As GpPoint) As GpStatus","returnType":"GpStatus"}, + {"name":"VectorTransformPoints","kind":"function","vis":"public","signature":"Function VectorTransformPoints(points() As GpPointF) As GpStatus","returnType":"GpStatus"}, + {"name":"VectorTransformPoints2","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function VectorTransformPoints2 Lib \"gdiplus\" Alias \"GdipVectorTransformMatrixPoints\" (ByVal Me As GpMatrix, pts As GpPointF, ByVal count As Long) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"VectorTransformPoints2I","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function VectorTransformPoints2I Lib \"gdiplus\" Alias \"GdipVectorTransformMatrixPointsI\" (ByVal Me As GpMatrix, pts As GpPoint, ByVal count As Long) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"VectorTransformPointsI","kind":"function","vis":"public","signature":"Function VectorTransformPointsI(points() As GpPoint) As GpStatus","returnType":"GpStatus"} + ] + }, + { + "name": "GdipMetaHeader", + "kind": "module", + "vis": "public", + "file": "GdiPlus/MetaHeader.twin", + "signature": "Module GdipMetaHeader", + "members": [ + {"name":"GDIP_EMFPLUSFLAGS_DISPLAY","kind":"const","vis":"public","signature":"Public Const GDIP_EMFPLUSFLAGS_DISPLAY = &h00000001"} + ] + }, + { + "name": "GDIP_ENHMETAHEADER3", + "kind": "type", + "in": "GdipMetaHeader", + "vis": "public", + "file": "GdiPlus/MetaHeader.twin", + "signature": "Type GDIP_ENHMETAHEADER3", + "fields": [ + {"name":"iType","vis":"public","signature":"iType As Long"}, + {"name":"nSize","vis":"public","signature":"nSize As Long"}, + {"name":"rclBounds","vis":"public","signature":"rclBounds As GDIP_RECT"}, + {"name":"rclFrame","vis":"public","signature":"rclFrame As GDIP_RECT"}, + {"name":"dSignature","vis":"public","signature":"dSignature As Long"}, + {"name":"nVersion","vis":"public","signature":"nVersion As Long"}, + {"name":"nBytes","vis":"public","signature":"nBytes As Long"}, + {"name":"nRecords","vis":"public","signature":"nRecords As Long"}, + {"name":"nHandles","vis":"public","signature":"nHandles As Integer"}, + {"name":"sReserved","vis":"public","signature":"sReserved As Integer"}, + {"name":"nDescription","vis":"public","signature":"nDescription As Long"}, + {"name":"offDescription","vis":"public","signature":"offDescription As Long"}, + {"name":"nPalEntries","vis":"public","signature":"nPalEntries As Long"}, + {"name":"szlDevice","vis":"public","signature":"szlDevice As GpSize"}, + {"name":"szlMillimeters","vis":"public","signature":"szlMillimeters As GpSize"} + ], + "members": [] + }, + { + "name": "GDIP_METAHEADER", + "kind": "type", + "in": "GdipMetaHeader", + "vis": "public", + "file": "GdiPlus/MetaHeader.twin", + "signature": "Public Type GDIP_METAHEADER", + "attrs": [{"name":"PackingAlignment","args":"2"}], + "fields": [ + {"name":"mtType","vis":"public","signature":"mtType As Integer"}, + {"name":"mtHeaderSize","vis":"public","signature":"mtHeaderSize As Integer"}, + {"name":"mtVersion","vis":"public","signature":"mtVersion As Integer"}, + {"name":"mtSize","vis":"public","signature":"mtSize As Long"}, + {"name":"mtNoObjects","vis":"public","signature":"mtNoObjects As Integer"}, + {"name":"mtMaxRecord","vis":"public","signature":"mtMaxRecord As Long"}, + {"name":"mtNoParameters","vis":"public","signature":"mtNoParameters As Integer"} + ], + "members": [] + }, + { + "name": "MetafileHeader", + "kind": "type", + "in": "GdipMetaHeader", + "vis": "public", + "file": "GdiPlus/MetaHeader.twin", + "signature": "Type MetafileHeader", + "fields": [ + {"name":"Type","vis":"public","signature":"Type As GpMetafileType"}, + {"name":"Size","vis":"public","signature":"Size As UINT"}, + {"name":"Version","vis":"public","signature":"Version As UINT"}, + {"name":"EmfPlusFlags","vis":"public","signature":"EmfPlusFlags As UINT"}, + {"name":"DpiX","vis":"public","signature":"DpiX!"}, + {"name":"DpiY","vis":"public","signature":"DpiY!"}, + {"name":"X","vis":"public","signature":"X&"}, + {"name":"Y","vis":"public","signature":"Y&"}, + {"name":"Width","vis":"public","signature":"Width&"}, + {"name":"Height","vis":"public","signature":"Height&"}, + {"name":"HeaderSpace","vis":"public","signature":"HeaderSpace As GDIP_ENHMETAHEADER3"}, + {"name":"EmfPlusHeaderSize","vis":"public","signature":"EmfPlusHeaderSize&"}, + {"name":"LogicalDpiX","vis":"public","signature":"LogicalDpiX&"}, + {"name":"LogicalDpiY","vis":"public","signature":"LogicalDpiY&"} + ], + "members": [ + {"name":"Bounds","kind":"property","vis":"public","signature":"Property Get Bounds() As GpRect","returnType":"GpRect","accessor":"Get"}, + {"name":"EmfHeader","kind":"property","vis":"public","signature":"Property Get EmfHeader() As GDIP_ENHMETAHEADER3","returnType":"GDIP_ENHMETAHEADER3","accessor":"Get","description":"Get the EMF header of the metafile (if it is an EMF)"}, + {"name":"IsDisplay","kind":"property","vis":"public","signature":"Property Get IsDisplay() As Boolean","returnType":"Boolean","accessor":"Get","description":"If it's an EMF+ file, was it recorded against a display Hdc?"}, + {"name":"IsEmf","kind":"property","vis":"public","signature":"Property Get IsEmf() As Boolean","returnType":"Boolean","accessor":"Get","description":"Is this an EMF (not an EMF+)?"}, + {"name":"IsEmfOrEmfPlus","kind":"property","vis":"public","signature":"Property Get IsEmfOrEmfPlus() As Boolean","returnType":"Boolean","accessor":"Get","description":"Is this an EMF or EMF+ file?"}, + {"name":"IsEmfPlus","kind":"property","vis":"public","signature":"Property Get IsEmfPlus() As Boolean","returnType":"Boolean","accessor":"Get","description":"Is this an EMF+ file?"}, + {"name":"IsEmfPlusDual","kind":"property","vis":"public","signature":"Property Get IsEmfPlusDual() As Boolean","returnType":"Boolean","accessor":"Get","description":"Is this an EMF+ dual (has dual, down-level records) file?"}, + {"name":"IsEmfPlusOnly","kind":"property","vis":"public","signature":"Property Get IsEmfPlusOnly() As Boolean","returnType":"Boolean","accessor":"Get","description":"Is this an EMF+ only (no dual records) file?"}, + {"name":"IsWmf","kind":"property","vis":"public","signature":"Property Get IsWmf() As Boolean","returnType":"Boolean","accessor":"Get","description":"Is it any type of WMF (standard or Placeable Metafile)?"}, + {"name":"IsWmfPlaceable","kind":"property","vis":"public","signature":"Property Get IsWmfPlaceable() As Boolean","returnType":"Boolean","accessor":"Get","description":"Is this an Placeable Metafile?"}, + {"name":"WmfHeader","kind":"property","vis":"public","signature":"Property Get WmfHeader() As GDIP_METAHEADER","returnType":"GDIP_METAHEADER","accessor":"Get","description":"Get the WMF header of the metafile (if it is a WMF)"} + ] + }, + { + "name": "PWMFRect16", + "kind": "type", + "in": "GdipMetaHeader", + "vis": "public", + "file": "GdiPlus/MetaHeader.twin", + "signature": "Public Type PWMFRect16", + "attrs": [{"name":"PackingAlignment","args":"2"}], + "fields": [ + {"name":"Left","vis":"public","signature":"Left As Integer"}, + {"name":"Top","vis":"public","signature":"Top As Integer"}, + {"name":"Right","vis":"public","signature":"Right As Integer"}, + {"name":"Bottom","vis":"public","signature":"Bottom As Integer"} + ], + "members": [] + }, + { + "name": "WmfPlaceableFileHeader", + "kind": "type", + "in": "GdipMetaHeader", + "vis": "public", + "file": "GdiPlus/MetaHeader.twin", + "signature": "Public Type WmfPlaceableFileHeader", + "attrs": [{"name":"PackingAlignment","args":"2"}], + "fields": [ + {"name":"Key","vis":"public","signature":"Key As Long"}, + {"name":"Hmf","vis":"public","signature":"Hmf As Integer"}, + {"name":"BoundingBox","vis":"public","signature":"BoundingBox As PWMFRect16"}, + {"name":"Inch","vis":"public","signature":"Inch As Integer"}, + {"name":"Reserved","vis":"public","signature":"Reserved As Long"}, + {"name":"Checksum","vis":"public","signature":"Checksum As Integer"} + ], + "members": [] + }, + { + "name": "GdipMetafile", + "kind": "module", + "vis": "public", + "file": "GdiPlus/Metafile.twin", + "signature": "Module GdipMetafile", + "members": [ + {"name":"EmfToWmfBits","kind":"function","vis":"public","signature":"Function EmfToWmfBits(ByVal hEmf As LongPtr, ByVal cbData16 As UINT, pData16 As Byte, ByVal iMapMode As GDIP_MappingModes = MM_ANISOTROPIC, ByVal eFlags As GpEmfToWmfBitsFlags = EmfToWmfBitsFlagsDefault) As UINT","returnType":"UINT"}, + {"name":"GdipCreateStreamOnFile","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function GdipCreateStreamOnFile Lib \"gdiplus\" (ByVal filename As LongPtr, ByVal access As Long, stream As GDIP_IStream) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GdipEmfToWmfBits","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function GdipEmfToWmfBits Lib \"gdiplus\" (ByVal hemf As LongPtr, ByVal cbData16 As Long, pData16 As Byte, ByVal iMapMode As Long, ByVal eFlags As Long) As Long","returnType":"Long","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GdipGetMetafileHeaderFromEmf","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function GdipGetMetafileHeaderFromEmf Lib \"gdiplus\" (ByVal hEmf As LongPtr, header As MetafileHeader) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GdipGetMetafileHeaderFromFile","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function GdipGetMetafileHeaderFromFile Lib \"gdiplus\" (ByVal filename As LongPtr, header As MetafileHeader) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GdipGetMetafileHeaderFromStream","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function GdipGetMetafileHeaderFromStream Lib \"gdiplus\" (ByVal stream As GDIP_IStream, header As MetafileHeader) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GdipGetMetafileHeaderFromWmf","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function GdipGetMetafileHeaderFromWmf Lib \"gdiplus\" (ByVal hWmf As LongPtr, wmfPlaceableFileHeader As WmfPlaceableFileHeader, header As MetafileHeader) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetMetafileHeader","kind":"function","vis":"public","signature":"Function GetMetafileHeader(ByVal filename$, header As MetafileHeader) As GpStatus","returnType":"GpStatus"}, + {"name":"GetMetafileHeader","kind":"function","vis":"public","signature":"Function GetMetafileHeader(stream As GDIP_IStream, header As MetafileHeader) As GpStatus","returnType":"GpStatus"}, + {"name":"GetMetafileHeaderFromEmf","kind":"function","vis":"public","signature":"Function GetMetafileHeaderFromEmf(ByVal hEmf As LongPtr, header As MetafileHeader) As GpStatus","returnType":"GpStatus"}, + {"name":"GetMetafileHeaderFromWmf","kind":"function","vis":"public","signature":"Function GetMetafileHeaderFromWmf(ByVal hWmf As LongPtr, ByVal wmfPlaceableFileHeader As WmfPlaceableFileHeader, header As MetafileHeader) As GpStatus","returnType":"GpStatus"}, + {"name":"GpMetafile","kind":"function","vis":"public","signature":"Function GpMetafile() As GpMetafile","returnType":"GpMetafile"}, + {"name":"Metafile","kind":"function","vis":"public","signature":"Function Metafile(ByVal hWmf As LongPtr, wmfPlaceableFileHeader As WmfPlaceableFileHeader, ByVal deleteWmf As Boolean = False) As Metafile","returnType":"Metafile"}, + {"name":"Metafile","kind":"function","vis":"public","signature":"Function Metafile(ByVal hEmf As LongPtr, ByVal deleteWmf As Boolean = False) As Metafile","returnType":"Metafile"}, + {"name":"Metafile","kind":"function","vis":"public","signature":"Function Metafile(ByVal filename$) As Metafile","returnType":"Metafile"}, + {"name":"Metafile","kind":"function","vis":"public","signature":"Function Metafile(ByVal filename$, wmfPlaceableFileHeader As WmfPlaceableFileHeader) As Metafile","returnType":"Metafile"}, + {"name":"Metafile","kind":"function","vis":"public","signature":"Function Metafile(stream As GDIP_IStream) As Metafile","returnType":"Metafile"}, + {"name":"Metafile","kind":"function","vis":"public","signature":"Function Metafile(ByVal referenceHdc As LongPtr, ByVal Type As GpEmfType = EmfTypeEmfPlusDual, Optional ByVal description$) As Metafile","returnType":"Metafile"}, + {"name":"Metafile","kind":"function","vis":"public","signature":"Function Metafile(ByVal referenceHdc As LongPtr, frameRect As GpRectF, ByVal frameUnit As GpMetafileFrameUnit = MetaFileFrameUnitGdi, ByVal type As GpEmfType = EmfTypeEmfPlusDual, Optional ByVal description$) As Metafile","returnType":"Metafile"}, + {"name":"Metafile","kind":"function","vis":"public","signature":"Function Metafile(ByVal referenceHdc As LongPtr, frameRect As GpRect, ByVal frameUnit As GpMetafileFrameUnit = MetaFileFrameUnitGdi, ByVal type As GpEmfType = EmfTypeEmfPlusDual, Optional ByVal description$) As Metafile","returnType":"Metafile"}, + {"name":"Metafile","kind":"function","vis":"public","signature":"Function Metafile(ByVal filename$, ByVal referenceHdc As LongPtr, ByVal type As GpEmfType = EmfTypeEmfPlusDual, Optional ByVal description$) As Metafile","returnType":"Metafile"}, + {"name":"Metafile","kind":"function","vis":"public","signature":"Function Metafile(ByVal filename$, ByVal referenceHdc As LongPtr, frameRect As GpRectF, ByVal frameUnit As GpMetafileFrameUnit = MetaFileFrameUnitGdi, ByVal type As GpEmfType = EmfTypeEmfPlusDual, Optional ByVal description$) As Metafile","returnType":"Metafile"}, + {"name":"Metafile","kind":"function","vis":"public","signature":"Function Metafile(ByVal filename$, ByVal referenceHdc As LongPtr, frameRect As GpRect, ByVal frameUnit As GpMetafileFrameUnit = MetaFileFrameUnitGdi, ByVal type As GpEmfType = EmfTypeEmfPlusDual, Optional ByVal description$) As Metafile","returnType":"Metafile"}, + {"name":"Metafile","kind":"function","vis":"public","signature":"Function Metafile(stream As GDIP_IStream, ByVal referenceHdc As LongPtr, ByVal type As GpEmfType = EmfTypeEmfPlusDual, Optional ByVal description$) As Metafile","returnType":"Metafile"}, + {"name":"Metafile","kind":"function","vis":"public","signature":"Function Metafile(stream As GDIP_IStream, ByVal referenceHdc As LongPtr, frameRect As GpRectF, ByVal frameUnit As GpMetafileFrameUnit = MetaFileFrameUnitGdi, ByVal type As GpEmfType = EmfTypeEmfPlusDual, Optional ByVal description$) As Metafile","returnType":"Metafile"}, + {"name":"Metafile","kind":"function","vis":"public","signature":"Function Metafile(stream As GDIP_IStream, ByVal referenceHdc As LongPtr, frameRect As GpRect, ByVal frameUnit As GpMetafileFrameUnit = MetaFileFrameUnitGdi, ByVal type As GpEmfType = EmfTypeEmfPlusDual, Optional ByVal description$) As Metafile","returnType":"Metafile"} + ] + }, + { + "name": "GDIP_MappingModes", + "kind": "enum", + "in": "GdipMetafile", + "vis": "private", + "public": false, + "file": "GdiPlus/Metafile.twin", + "signature": "Private Enum GDIP_MappingModes", + "values": [ + {"name":"MM_TEXT","value":"1"}, + {"name":"MM_LOMETRIC","value":"2"}, + {"name":"MM_HIMETRIC","value":"3"}, + {"name":"MM_LOENGLISH","value":"4"}, + {"name":"MM_HIENGLISH","value":"5"}, + {"name":"MM_TWIPS","value":"6"}, + {"name":"MM_ISOTROPIC","value":"7"}, + {"name":"MM_ANISOTROPIC","value":"8"}, + {"name":"MM_MIN","value":"MM_TEXT"}, + {"name":"MM_MAX","value":"MM_ANISOTROPIC"}, + {"name":"MM_MAX_FIXEDSCALE","value":"MM_TWIPS"} + ] + }, + { + "name": "GpMetafile", + "kind": "type", + "in": "GdipMetafile", + "vis": "public", + "file": "GdiPlus/Metafile.twin", + "signature": "Type GpMetafile", + "fields": [ + {"name":"Native","vis":"public","signature":"Native As LongPtr"} + ], + "members": [ + {"name":"Clone","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function Clone Lib \"gdiplus\" Alias \"GdipCloneImage\" (ByVal Me As GpMetafile, cloneImage As GpMetafile) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"ConvertToEmfPlus","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function ConvertToEmfPlus Lib \"gdiplus\" Alias \"GdipConvertToEmfPlus\" (ByVal refGraphics As GpGraphics, ByVal metafile As GpMetafile, conversionFailureFlag As Long, ByVal emfType As GpEmfType, ByVal description As LongPtr, out_metafile As GpMetafile) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"ConvertToEmfPlusToFile","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function ConvertToEmfPlusToFile Lib \"gdiplus\" Alias \"GdipConvertToEmfPlusToFile\" (ByVal refGraphics As GpGraphics, ByVal metafile As GpMetafile, conversionFailureFlag As Long, ByVal filename As LongPtr, ByVal emfType As GpEmfType, ByVal description As LongPtr, out_metafile As GpMetafile) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"ConvertToEmfPlusToStream","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function ConvertToEmfPlusToStream Lib \"gdiplus\" Alias \"GdipConvertToEmfPlusToStream\" (ByVal refGraphics As GpGraphics, ByVal metafile As GpMetafile, conversionFailureFlag As Long, ByVal stream As GDIP_IStream, ByVal emfType As GpEmfType, ByVal description As LongPtr, out_metafile As GpMetafile) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"CreateFromEmfInto","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function CreateFromEmfInto Lib \"gdiplus\" Alias \"GdipCreateMetafileFromEmf\" (ByVal hEnf As LongPtr, ByVal deleteEmf As GDIP_BOOL, metafile As GpMetafile) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"CreateFromFileInto","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function CreateFromFileInto Lib \"gdiplus\" Alias \"GdipCreateMetafileFromFile\" (ByVal filename As LongPtr, metafile As GpMetafile) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"CreateFromStreamInto","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function CreateFromStreamInto Lib \"gdiplus\" Alias \"GdipCreateMetafileFromStream\" (ByVal stream As GDIP_IStream, metafile As GpMetafile) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"CreateFromWmfFileInto","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function CreateFromWmfFileInto Lib \"gdiplus\" Alias \"GdipCreateMetafileFromWmfFile\" (ByVal filename As LongPtr, wmfPlaceableFileHeader As WmfPlaceableFileHeader, metafile As GpMetafile) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"CreateFromWmfInto","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function CreateFromWmfInto Lib \"gdiplus\" Alias \"GdipCreateMetafileFromWmf\" (ByVal hWnf As LongPtr, ByVal deleteWmf As GDIP_BOOL, wmfPlaceableFileHeader As WmfPlaceableFileHeader, metafile As GpMetafile) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"Delete","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function Delete Lib \"gdiplus\" Alias \"GdipDisposeImage\" (ByVal Me As GpMetafile) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"Dispose","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function Dispose Lib \"gdiplus\" Alias \"GdipDisposeImage\" (ByVal Me As GpMetafile) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"FindFirstItem","kind":"function","vis":"public","signature":"Function FindFirstItem(item() As GpImageItemData) As GpStatus","returnType":"GpStatus"}, + {"name":"FindNextItem","kind":"function","vis":"public","signature":"Function FindNextItem(item() As GpImageItemData) As GpStatus","returnType":"GpStatus"}, + {"name":"GetAllPropertyItems","kind":"function","vis":"public","signature":"Function GetAllPropertyItems(items() As GpPropertyItem) As GpStatus","returnType":"GpStatus"}, + {"name":"GetBounds","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetBounds Lib \"gdiplus\" Alias \"GdipGetImageBounds\" (ByVal Me As GpMetafile, srcRect As GpRectF, srcUnit As GpUnit) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetDimension","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetDimension Lib \"gdiplus\" Alias \"GdipGetImageDimension\" (ByVal Me As GpMetafile, ByRef Width!, ByRef Height!) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetDownLevelRasterizationLimit","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function GetDownLevelRasterizationLimit Lib \"gdiplus\" Alias \"GdipGetMetafileDownLevelRasterizationLimit\" (ByVal Me As GpMetafile, metafileRasterizationLimitDpi As Long) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetEncoderParameterList","kind":"function","vis":"public","signature":"Function GetEncoderParameterList(ByVal clsidencoder As GDIP_UUID, params() As GpEncoderParameter) As GpStatus","returnType":"GpStatus","description":"Returns an array with parameters. The array starts at index 1 even though LBound(params)=0"}, + {"name":"GetEncoderParameterListSize","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetEncoderParameterListSize Lib \"gdiplus\" Alias \"GdipGetEncoderParameterListSize\" (ByVal Me As GpMetafile, clsidEncoder As GDIP_UUID, size&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetFlags","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetFlags Lib \"gdiplus\" Alias \"GdipGetImageFlags\" (ByVal Me As GpMetafile, flags&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetFrameCount","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetFrameCount Lib \"gdiplus\" Alias \"GdipImageGetFrameCount\" (ByVal Me As GpMetafile, dimensionID As GDIP_UUID, count&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetFrameDimensionsCount","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetFrameDimensionsCount Lib \"gdiplus\" Alias \"GdipImageGetFrameDimensionsCount\" (ByVal Me As GpMetafile, count&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetFrameDimensionsList","kind":"function","vis":"public","signature":"Function GetFrameDimensionsList(dims As GDIP_UUID()) As GpStatus","returnType":"GpStatus"}, + {"name":"GetGraphicsContext","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetGraphicsContext Lib \"gdiplus\" Alias \"GdipGetImageGraphicsContext\" (ByVal Me As GpMetafile, ByVal Graphics As GpGraphics) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetHeaderFromMetafile","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function GetHeaderFromMetafile Lib \"gdiplus\" Alias \"GdipGetMetafileHeaderFromMetafile\" (ByVal Me As GpMetafile, header As MetafileHeader) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetHeight","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetHeight Lib \"gdiplus\" Alias \"GdipGetImageHeight\" (ByVal Me As GpMetafile, Height As Long) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetHemfFromMetafile","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function GetHemfFromMetafile Lib \"gdiplus\" Alias \"GdipGetHemfFromMetafile\" (ByVal Me As GpMetafile, hemf As LongPtr) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetHorizontalResolution","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetHorizontalResolution Lib \"gdiplus\" Alias \"GdipGetImageHorizontalResolution\" (ByVal Me As GpMetafile, resolution!) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetItemData","kind":"function","vis":"public","signature":"Function GetItemData(item() As GpImageItemData) As GpStatus","returnType":"GpStatus"}, + {"name":"GetPalette","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetPalette Lib \"gdiplus\" Alias \"GdipGetImagePalette\" (ByVal Me As GpMetafile, palette As ColorPalette, ByVal size&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetPaletteSize","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetPaletteSize Lib \"gdiplus\" Alias \"GdipGetImagePaletteSize\" (ByVal Me As GpMetafile, size As Long) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetPixelFormat","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetPixelFormat Lib \"gdiplus\" Alias \"GdipGetImagePixelFormat\" (ByVal Me As GpMetafile, format As PixelFormat) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetPropertyCount","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetPropertyCount Lib \"gdiplus\" Alias \"GdipGetPropertyCount\" (ByVal Me As GpMetafile, numOfProperty&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetPropertyIdList","kind":"function","vis":"public","signature":"Function GetPropertyIdList(propIDs() As PROPID) As GpStatus","returnType":"GpStatus"}, + {"name":"GetPropertyItem","kind":"function","vis":"public","signature":"Function GetPropertyItem(ByVal propID As PROPID, item() As GpPropertyItem) As GpStatus","returnType":"GpStatus"}, + {"name":"GetPropertyItemSize","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetPropertyItemSize Lib \"gdiplus\" Alias \"GdipGetPropertyItemSize\" (ByVal Me As GpMetafile, ByVal propId&, ByRef Size&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetPropertySize","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetPropertySize Lib \"gdiplus\" Alias \"GdipGetPropertySize\" (ByVal Me As GpMetafile, totalBufferSize&, numProperties&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetRawFormat","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetRawFormat Lib \"gdiplus\" Alias \"GdipGetImageRawFormat\" (ByVal Me As GpMetafile, Format As GDIP_UUID) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetSize","kind":"function","vis":"public","signature":"Function GetSize(size As GpSize) As GpStatus","returnType":"GpStatus"}, + {"name":"GetThumbnail","kind":"function","vis":"public","signature":"Function GetThumbnail(ByVal thumbSize As GpSize, thumbImage As GpMetafile, ByVal callback As LongPtr, callbackData As LongPtr) As GpStatus","returnType":"GpStatus"}, + {"name":"GetThumbnail2","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetThumbnail2 Lib \"gdiplus\" Alias \"GdipGetImageThumbnail\" (ByVal Me As GpMetafile, ByVal thumbWidth&, ByVal thumbHeight&, thumbImage As GpImage, ByVal callback As LongPtr, callbackData As Any) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetType","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetType Lib \"gdiplus\" Alias \"GdipGetImageType\" (ByVal Me As GpMetafile, type As GpImageType) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetVerticalResolution","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetVerticalResolution Lib \"gdiplus\" Alias \"GdipGetImageVerticalResolution\" (ByVal Me As GpMetafile, resolution!) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetWidth","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetWidth Lib \"gdiplus\" Alias \"GdipGetImageWidth\" (ByVal Me As GpMetafile, Width As Long) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"LoadFromFileICMInto","kind":"function","vis":"public","declare":true,"signature":"DeclareWide PtrSafe Function LoadFromFileICMInto Lib \"gdiplus\" Alias \"GdipLoadImageFromFileICM\" (ByVal FileName$, ByRef Image As GpMetafile) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"LoadFromFileInto","kind":"function","vis":"public","declare":true,"signature":"DeclareWide PtrSafe Function LoadFromFileInto Lib \"gdiplus\" Alias \"GdipLoadImageFromFile\" (ByVal FileName$, ByRef Image As GpMetafile) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"LoadFromStreamICMInto","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function LoadFromStreamICMInto Lib \"gdiplus\" Alias \"GdipLoadImageFromStreamICM\" (ByVal stream As GDIP_IStream, ByRef Image As GpMetafile) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"LoadFromStreamInto","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function LoadFromStreamInto Lib \"gdiplus\" Alias \"GdipLoadImageFromStream\" (ByVal stream As GDIP_IStream, ByRef Image As GpMetafile) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"PlayRecord","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function PlayRecord Lib \"gdiplus\" Alias \"GdipPlayMetafileRecord\" (ByVal Me As GpMetafile, ByVal recordType As GpEmfPlusRecordType, ByVal flags As Long, ByVal dataSize As Long, data As Byte) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"RecordFileNameInto","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function RecordFileNameInto Lib \"gdiplus\" Alias \"GdipRecordMetafileFileName\" (ByVal FileName As LongPtr, ByVal referenceHdc As LongPtr, ByVal type As GpEmfType, frameRect As GpRectF, ByVal frameUnit As GpMetafileFrameUnit, ByVal Description As LongPtr, metafile As GpMetafile) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"RecordFileNameIntoI","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function RecordFileNameIntoI Lib \"gdiplus\" Alias \"GdipRecordMetafileFileNameI\" (ByVal FileName As LongPtr, ByVal referenceHdc As LongPtr, ByVal type As GpEmfType, frameRect As GpRect, ByVal frameUnit As GpMetafileFrameUnit, ByVal Description As LongPtr, metafile As GpMetafile) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"RecordInto","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function RecordInto Lib \"gdiplus\" Alias \"GdipRecordMetafile\" (ByVal referenceHdc As LongPtr, ByVal type As GpEmfType, frameRect As GpRectF, ByVal frameUnit As GpMetafileFrameUnit, ByVal Description As LongPtr, metafile As GpMetafile) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"RecordIntoI","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function RecordIntoI Lib \"gdiplus\" Alias \"GdipRecordMetafileI\" (ByVal referenceHdc As LongPtr, ByVal type As GpEmfType, frameRect As GpRect, ByVal frameUnit As GpMetafileFrameUnit, ByVal Description As LongPtr, metafile As GpMetafile) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"RecordStreamInto","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function RecordStreamInto Lib \"gdiplus\" Alias \"GdipRecordMetafileStream\" (ByVal stream As GDIP_IStream, ByVal referenceHdc As LongPtr, ByVal type As GpEmfType, frameRect As GpRectF, ByVal frameUnit As GpMetafileFrameUnit, ByVal Description As LongPtr, metafile As GpMetafile) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"RecordStreamIntoI","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function RecordStreamIntoI Lib \"gdiplus\" Alias \"GdipRecordMetafileStreamI\" (ByVal stream As GDIP_IStream, ByVal referenceHdc As LongPtr, ByVal type As GpEmfType, frameRect As GpRect, ByVal frameUnit As GpMetafileFrameUnit, ByVal Description As LongPtr, metafile As GpMetafile) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"RemovePropertyItem","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function RemovePropertyItem Lib \"gdiplus\" Alias \"GdipRemovePropertyItem\" (ByVal Me As GpMetafile, ByVal propId As PROPID) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"RotateFlip","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function RotateFlip Lib \"gdiplus\" Alias \"GdipImageRotateFlip\" (ByVal Me As GpMetafile, ByVal rfType As RotateFlipType) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SaveAdd","kind":"function","vis":"public","signature":"Function SaveAdd(encoderParams() As GpEncoderParameter) As GpStatus","returnType":"GpStatus","description":"There should be a dummy encoderParams(0) that's not filled in. It's used internally."}, + {"name":"SaveAddImage","kind":"function","vis":"public","signature":"Function SaveAddImage(ByVal newImage As GpMetafile, encoderParams() As GpEncoderParameter) As GpStatus","returnType":"GpStatus","description":"There should be a dummy encoderParams(0) that's not filled in. It's used internally."}, + {"name":"SaveToFile","kind":"function","vis":"public","signature":"Function SaveToFile(ByVal FileName$, ByVal clsidEncoder As GDIP_UUID, encoderParams() As GpEncoderParameter) As GpStatus","returnType":"GpStatus","description":"There should be a dummy encoderParams(0) that's not filled in. It's used internally."}, + {"name":"SaveToStream","kind":"function","vis":"public","signature":"Function SaveToStream(ByVal stream As GDIP_IStream, ByVal clsidEncoder As GDIP_UUID, encoderParams() As GpEncoderParameter) As GpStatus","returnType":"GpStatus","description":"There should be a dummy encoderParams(0) that's not filled in. It's used internally."}, + {"name":"SelectActiveFrame","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SelectActiveFrame Lib \"gdiplus\" Alias \"GdipImageSelectActiveFrame\" (ByVal Me As GpMetafile, ByRef dimensionID As GDIP_UUID, ByVal frameIndex&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetAbort","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetAbort Lib \"gdiplus\" Alias \"GdipImageSetAbort\" (ByVal Me As GpMetafile, pIAbort As Any ) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}],"description":"⛔This API is not implemented in GdiPlus 1.0 nor 1.1.\n⛔NOTE: This API is a placeholder until tB supports no-vtable interfaces"}, + {"name":"SetDownLevelRasterizationLimit","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function SetDownLevelRasterizationLimit Lib \"gdiplus\" Alias \"GdipSetMetafileDownLevelRasterizationLimit\" (ByVal Me As GpMetafile, ByVal metafileRasterizationLimitDpi As Long) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetPalette","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetPalette Lib \"gdiplus\" Alias \"GdipSetImagePalette\" (ByVal Me As GpMetafile, palette As ColorPalette) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetPropertyItem","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetPropertyItem Lib \"gdiplus\" Alias \"GdipSetPropertyItem\" (ByVal Me As GpMetafile, item As GpPropertyItem) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]} + ] + }, + { + "name": "GdipModule", + "kind": "module", + "vis": "public", + "file": "GdiPlus/GdiPlusBase.twin", + "signature": "Module GdipModule", + "members": [ + {"name":"GdipAlloc","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GdipAlloc Lib \"gdiplus.dll\" (ByVal Size As LongPtr) As LongPtr","returnType":"LongPtr","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GdipErrorCodeBase","kind":"field","vis":"public","signature":"Public GdipErrorCodeBase&= 3300","description":"The base error code in the RaiseErrors strategy. GpStatus is added to this base code."}, + {"name":"GdipErrorHandler","kind":"delegate","vis":"public","signature":"Public Delegate Function GdipErrorHandler (ByVal obj As GdiPlusBase)"}, + {"name":"GdipErrorHandler","kind":"field","vis":"public","signature":"Public GdipErrorHandler As GdipErrorHandler = 0","description":"The error handler to be invoked upon errors when the strategy is HandleErrors."}, + {"name":"GdipErrorHandlingStrategy","kind":"field","vis":"public","signature":"Public GdipErrorHandlingStrategy As GpErrorHandlingStrategy = IgnoreErrors","description":"Whether the errors from GdiPlus objects are ignored, Err.Raise-d, or processed by a handler."}, + {"name":"GdipFree","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GdipFree Lib \"gdiplus.dll\" (ByVal Ptr As LongPtr) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]} + ] + }, + { + "name": "GpErrorHandlingStrategy", + "kind": "enum", + "in": "GdipModule", + "vis": "public", + "file": "GdiPlus/GdiPlusBase.twin", + "signature": "Enum GpErrorHandlingStrategy", + "values": [ + {"name":"IgnoreErrors"}, + {"name":"RaiseErrors"}, + {"name":"HandleErrors"}, + {"name":"StopOnErrors"} + ] + }, + { + "name": "GdipPathData", + "kind": "module", + "vis": "public", + "file": "GdiPlus/PathData.twin", + "signature": "Module GdipPathData", + "members": [ + {"name":"GDIP_CopyMemory","kind":"sub","vis":"public","declare":true,"signature":"Declare PtrSafe Sub GDIP_CopyMemory Lib \"kernel32\" Alias \"RtlMoveMemory\" (Destination As Any, Source As Any, ByVal Length As LongPtr)"}, + {"name":"GpPathData","kind":"function","vis":"public","signature":"Function GpPathData() As GpPathData","returnType":"GpPathData"}, + {"name":"GpPathData","kind":"function","vis":"public","signature":"Function GpPathData(ByVal count&) As GpPathData","returnType":"GpPathData"}, + {"name":"GpPathData","kind":"function","vis":"public","signature":"Function GpPathData(points() As TypedPoint) As GpPathData","returnType":"GpPathData"}, + {"name":"PathData","kind":"function","vis":"public","signature":"Function PathData(ByVal count&) As PathData","returnType":"PathData"}, + {"name":"PathData","kind":"function","vis":"public","signature":"Function PathData(points() As TypedPoint) As PathData","returnType":"PathData"}, + {"name":"PathData","kind":"function","vis":"public","signature":"Function PathData(pd As GpPathData) As PathData","returnType":"PathData"} + ] + }, + { + "name": "GpPathData", + "kind": "type", + "in": "GdipPathData", + "vis": "public", + "file": "GdiPlus/PathData.twin", + "signature": "Type GpPathData", + "description": "Points and nodes in a Path.\nThis UDT does not manage memory by itself. Allocate() and Free()\nmust be explicitly invoked. Use the PathData class instead.", + "fields": [ + {"name":"count","vis":"public","signature":"count&"}, + {"name":"Points","vis":"public","signature":"Points As LongPtr"}, + {"name":"Types","vis":"public","signature":"Types As LongPtr"} + ], + "members": [ + {"name":"Allocate","kind":"function","vis":"public","signature":"Function Allocate(ByVal newCount&) As GpStatus","returnType":"GpStatus"}, + {"name":"Free","kind":"sub","vis":"public","signature":"Sub Free()"}, + {"name":"GetPoints","kind":"function","vis":"public","signature":"Function GetPoints() As GpPointF()","returnType":"GpPointF()","description":"Returns a view into the points array.\nThe view is valid only as long as the PathData exists."}, + {"name":"GetTypedPoints","kind":"function","vis":"public","signature":"Function GetTypedPoints() As TypedPoint()","returnType":"TypedPoint()"}, + {"name":"GetTypes","kind":"function","vis":"public","signature":"Function GetTypes() As PathPointType()","returnType":"PathPointType()","description":"Returns a view into the types array.\nThe view is valid only as long as the PathData exists"}, + {"name":"Point","kind":"property","vis":"public","signature":"Property Get Point(ByVal index&) As GpPointF","returnType":"GpPointF","accessor":"Get"}, + {"name":"Point","kind":"property","vis":"public","signature":"Property Let Point(ByVal index&, ByVal point As GpPointF)","accessor":"Let"}, + {"name":"Type","kind":"property","vis":"public","signature":"Property Get Type(ByVal index&) As PathPointType","returnType":"PathPointType","accessor":"Get"}, + {"name":"Type","kind":"property","vis":"public","signature":"Property Let Type(ByVal index&, ByVal type As PathPointType)","accessor":"Let"}, + {"name":"TypedPoint","kind":"property","vis":"public","signature":"Property Get TypedPoint(ByVal index&) As TypedPoint","returnType":"TypedPoint","accessor":"Get"}, + {"name":"TypedPoint","kind":"property","vis":"public","signature":"Property Let TypedPoint(ByVal index&, point As TypedPoint)","accessor":"Let"} + ] + }, + { + "name": "GdipPathGradient", + "kind": "module", + "vis": "public", + "file": "GdiPlus/PathGradientBrush.twin", + "signature": "Module GdipPathGradient", + "members": [ + {"name":"GpPathGradient","kind":"function","vis":"public","signature":"Function GpPathGradient() As GpPathGradient","returnType":"GpPathGradient"}, + {"name":"GpPathGradient","kind":"function","vis":"public","signature":"Function GpPathGradient(nativeBrush As GpBrush) As GpPathGradient","returnType":"GpPathGradient"}, + {"name":"PathGradientBrush","kind":"function","vis":"public","signature":"Function PathGradientBrush(points() As GpPointF, ByVal wrapMode As GpWrapMode = WrapModeClamp) As PathGradientBrush","returnType":"PathGradientBrush"}, + {"name":"PathGradientBrush","kind":"function","vis":"public","signature":"Function PathGradientBrush(points() As GpPoint, ByVal wrapMode As GpWrapMode = WrapModeClamp) As PathGradientBrush","returnType":"PathGradientBrush"}, + {"name":"PathGradientBrush","kind":"function","vis":"public","signature":"Function PathGradientBrush(path As GraphicsPath) As PathGradientBrush","returnType":"PathGradientBrush"} + ] + }, + { + "name": "GpPathGradient", + "kind": "type", + "in": "GdipPathGradient", + "vis": "public", + "file": "GdiPlus/PathGradientBrush.twin", + "signature": "Type GpPathGradient", + "fields": [ + {"name":"Native","vis":"public","signature":"Native As LongPtr"} + ], + "members": [ + {"name":"Clone","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function Clone Lib \"gdiplus\" Alias \"GdipCloneBrush\" (ByVal Me As GpPathGradient, cloneBrush As GpPathGradient) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"Create","kind":"function","vis":"public","signature":"Function Create(points() As GpPointF, ByVal wrapMode As GpWrapMode = WrapModeClamp) As GpStatus","returnType":"GpStatus"}, + {"name":"CreateFromPath","kind":"function","vis":"public","signature":"Function CreateFromPath(ByVal path As GpPath) As GpStatus","returnType":"GpStatus"}, + {"name":"CreateFromPathInto","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function CreateFromPathInto Lib \"gdiplus\" Alias \"GdipCreatePathGradientFromPath\" (ByVal Path As GpPath, polyGradient As GpPathGradient) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"CreateI","kind":"function","vis":"public","signature":"Function CreateI(points() As GpPoint, ByVal wrapMode As GpWrapMode = WrapModeClamp) As GpStatus","returnType":"GpStatus"}, + {"name":"CreateInto","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function CreateInto Lib \"gdiplus\" Alias \"GdipCreatePathGradient\" (points As GpPointF, ByVal count As Long, ByVal wrapMode As GpWrapMode, polyGradient As GpPathGradient) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"CreateIntoI","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function CreateIntoI Lib \"gdiplus\" Alias \"GdipCreatePathGradientI\" (points As GpPoint, ByVal count As Long, ByVal wrapMode As GpWrapMode, polyGradient As GpPathGradient) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"Delete","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function Delete Lib \"gdiplus\" Alias \"GdipDeleteBrush\" (ByVal Me As GpPathGradient) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetBlend","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetBlend Lib \"gdiplus\" Alias \"GdipGetPathGradientBlend\" (ByVal Me As GpPathGradient, blend As Single, positions As Single, ByVal count As Long) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetBlendCount","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetBlendCount Lib \"gdiplus\" Alias \"GdipGetPathGradientBlendCount\" (ByVal Me As GpPathGradient, count As Long) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetCenterColor","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetCenterColor Lib \"gdiplus\" Alias \"GdipGetPathGradientCenterColor\" (ByVal Me As GpPathGradient, colors As Color) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetCenterPoint","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetCenterPoint Lib \"gdiplus\" Alias \"GdipGetPathGradientCenterPoint\" (ByVal Me As GpPathGradient, Points As GpPointF) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetCenterPointI","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetCenterPointI Lib \"gdiplus\" Alias \"GdipGetPathGradientCenterPointI\" (ByVal Me As GpPathGradient, Points As GpPoint) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetFocusScales","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetFocusScales Lib \"gdiplus\" Alias \"GdipGetPathGradientFocusScales\" (ByVal Me As GpPathGradient, xScale As Single, yScale As Single) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetGammaCorrection","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetGammaCorrection Lib \"gdiplus\" Alias \"GdipGetPathGradientGammaCorrection\" (ByVal Me As GpPathGradient, useGammaCorrection As GDIP_BOOL) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetPath","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetPath Lib \"gdiplus\" Alias \"GdipGetPathGradientPath\" (ByVal Me As GpPathGradient, ByVal path As GpPath) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"},{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetPointCount","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetPointCount Lib \"gdiplus\" Alias \"GdipGetPathGradientPointCount\" (ByVal Me As GpPathGradient, count As Long) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetPresetBlend","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetPresetBlend Lib \"gdiplus\" Alias \"GdipGetPathGradientPresetBlend\" (ByVal Me As GpPathGradient, blend As Color, positions As Single, ByVal count As Long) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetPresetBlendCount","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetPresetBlendCount Lib \"gdiplus\" Alias \"GdipGetPathGradientPresetBlendCount\" (ByVal Me As GpPathGradient, count As Long) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetRect","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetRect Lib \"gdiplus\" Alias \"GdipGetPathGradientRect\" (ByVal Me As GpPathGradient, rect As GpRectF) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetRectI","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetRectI Lib \"gdiplus\" Alias \"GdipGetPathGradientRectI\" (ByVal Me As GpPathGradient, rect As GpRect) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetSurroundColorCount","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetSurroundColorCount Lib \"gdiplus\" Alias \"GdipGetPathGradientSurroundColorCount\" (ByVal Me As GpPathGradient, count As Long) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetSurroundColorsWithCount","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetSurroundColorsWithCount Lib \"gdiplus\" Alias \"GdipGetPathGradientSurroundColorsWithCount\" (ByVal Me As GpPathGradient, colors As Color, count As Long) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetTransform","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetTransform Lib \"gdiplus\" Alias \"GdipGetPathGradientTransform\" (ByVal Me As GpPathGradient, ByVal matrix As GpMatrix) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetType","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetType Lib \"gdiplus\" Alias \"GdipGetBrushType\" (ByVal Me As GpPathGradient, type As GpBrushType) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetWrapMode","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetWrapMode Lib \"gdiplus\" Alias \"GdipGetPathGradientWrapMode\" (ByVal Me As GpPathGradient, wrapMode As GpWrapMode) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"MultiplyTransform","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function MultiplyTransform Lib \"gdiplus\" Alias \"GdipMultiplyPathGradientTransform\" (ByVal Me As GpPathGradient, ByVal matrix As GpMatrix, ByVal order As GpMatrixOrder) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"Release","kind":"function","vis":"public","signature":"Function Release() As GpPathGradient","returnType":"GpPathGradient"}, + {"name":"ResetTransform","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function ResetTransform Lib \"gdiplus\" Alias \"GdipResetPathGradientTransform\" (ByVal Me As GpPathGradient) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"RotateTransform","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function RotateTransform Lib \"gdiplus\" Alias \"GdipRotatePathGradientTransform\" (ByVal Me As GpPathGradient, ByVal angle As Single, ByVal order As GpMatrixOrder) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"RotateTransformAt","kind":"function","vis":"public","signature":"Function RotateTransformAt(ByVal angle!, ByVal center As GpPointF, ByVal order As GpMatrixOrder = MatrixOrderPrepend) As GpStatus","returnType":"GpStatus"}, + {"name":"ScaleTransform","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function ScaleTransform Lib \"gdiplus\" Alias \"GdipScalePathGradientTransform\" (ByVal Me As GpPathGradient, ByVal sx As Single, ByVal sy As Single, ByVal order As GpMatrixOrder) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetBlend","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetBlend Lib \"gdiplus\" Alias \"GdipSetPathGradientBlend\" (ByVal Me As GpPathGradient, blend As Single, positions As Single, ByVal count As Long) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetCenterColor","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetCenterColor Lib \"gdiplus\" Alias \"GdipSetPathGradientCenterColor\" (ByVal Me As GpPathGradient, ByVal colors As Color) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetCenterPoint","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetCenterPoint Lib \"gdiplus\" Alias \"GdipSetPathGradientCenterPoint\" (ByVal Me As GpPathGradient, Points As GpPointF) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetCenterPointI","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetCenterPointI Lib \"gdiplus\" Alias \"GdipSetPathGradientCenterPointI\" (ByVal Me As GpPathGradient, Points As GpPoint) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetFocusScales","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetFocusScales Lib \"gdiplus\" Alias \"GdipSetPathGradientFocusScales\" (ByVal Me As GpPathGradient, ByVal xScale As Single, ByVal yScale As Single) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetGammaCorrection","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetGammaCorrection Lib \"gdiplus\" Alias \"GdipSetPathGradientGammaCorrection\" (ByVal Me As GpPathGradient, ByVal useGammaCorrection As GDIP_BOOL) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetLinearBlend","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetLinearBlend Lib \"gdiplus\" Alias \"GdipSetPathGradientLinearBlend\" (ByVal Me As GpPathGradient, ByVal focus As Single, ByVal scale As Single) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetPath","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetPath Lib \"gdiplus\" Alias \"GdipSetPathGradientPath\" (ByVal Me As GpPathGradient, ByVal path As GpPath) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetPresetBlend","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetPresetBlend Lib \"gdiplus\" Alias \"GdipSetPathGradientPresetBlend\" (ByVal Me As GpPathGradient, blend As Color, positions As Single, ByVal count As Long) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetSigmaBlend","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetSigmaBlend Lib \"gdiplus\" Alias \"GdipSetPathGradientSigmaBlend\" (ByVal Me As GpPathGradient, ByVal focus As Single, ByVal scale As Single) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetSurroundColorsWithCount","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetSurroundColorsWithCount Lib \"gdiplus\" Alias \"GdipSetPathGradientSurroundColorsWithCount\" (ByVal Me As GpPathGradient, colors As Color, count As Long) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetTransform","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetTransform Lib \"gdiplus\" Alias \"GdipSetPathGradientTransform\" (ByVal Me As GpPathGradient, ByVal matrix As GpMatrix) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetWrapMode","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetWrapMode Lib \"gdiplus\" Alias \"GdipSetPathGradientWrapMode\" (ByVal Me As GpPathGradient, ByVal wrapMode As GpWrapMode) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"ShearTransform","kind":"function","vis":"public","signature":"Function ShearTransform(ByVal shearX!, ByVal shearY!, ByVal order As GpMatrixOrder = MatrixOrderPrepend) As GpStatus","returnType":"GpStatus"}, + {"name":"TranslateTransform","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function TranslateTransform Lib \"gdiplus\" Alias \"GdipTranslatePathGradientTransform\" (ByVal Me As GpPathGradient, ByVal dx As Single, ByVal dy As Single, ByVal order As GpMatrixOrder) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]} + ] + }, + { + "name": "GdipPathIterator", + "kind": "module", + "vis": "public", + "file": "GdiPlus/PathIterator.twin", + "signature": "Module GdipPathIterator", + "members": [ + {"name":"GpPathIterator","kind":"function","vis":"public","signature":"Function GpPathIterator() As GpPathIterator","returnType":"GpPathIterator"}, + {"name":"PathIterator","kind":"function","vis":"public","signature":"Function PathIterator(path As GraphicsPath) As PathIterator","returnType":"PathIterator"}, + {"name":"PathPointType_DebugView","kind":"function","vis":"private","signature":"Private Function PathPointType_DebugView(ByVal t As PathPointType) As String","returnType":"String"}, + {"name":"_StaticAsserts","kind":"sub","vis":"private","signature":"Private Sub _StaticAsserts()","attrs":[{"name":"RunAfterBuild"},{"name":"DebugOnly"}]} + ] + }, + { + "name": "GpMarkerPath", + "kind": "type", + "in": "GdipPathIterator", + "vis": "public", + "file": "GdiPlus/PathIterator.twin", + "signature": "Type GpMarkerPath", + "fields": [ + {"name":"path","vis":"public","signature":"path As GpPath"}, + {"name":"resultCount","vis":"public","signature":"resultCount&"} + ], + "members": [] + }, + { + "name": "GpPathIterator", + "kind": "type", + "in": "GdipPathIterator", + "vis": "public", + "file": "GdiPlus/PathIterator.twin", + "signature": "Type GpPathIterator", + "fields": [ + {"name":"Native","vis":"public","signature":"Native As LongPtr"} + ], + "members": [ + {"name":"CopyData","kind":"function","vis":"public","signature":"Function CopyData(resultCount&, points() As GpPointF, types() As PathPointType, ByVal startIndex&, ByVal endIndex&) As GpStatus","returnType":"GpStatus","description":"⛔ Deprecated. Use Enumerate with startIndex and endIndex arguments instead."}, + {"name":"CopyData2","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function CopyData2 Lib \"gdiplus\" Alias \"GdipPathIterCopyData\" (ByVal Me As GpPathIterator, resultCount As Long, points As GpPointF, types As PathPointType, ByVal startIndex As Long, ByVal endIndex As Long) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"CopyDataTyped","kind":"function","vis":"public","signature":"Function CopyDataTyped(typedPoints As TypedPoints, ByVal startIndex&, ByVal endIndex&) As GpStatus","returnType":"GpStatus","description":"⛔ Deprecated. Use EnumerateTyped with startIndex and endIndex arguments instead."}, + {"name":"Create","kind":"function","vis":"public","signature":"Function Create(ByVal path As GpPath) As GpStatus","returnType":"GpStatus"}, + {"name":"CreateInto","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function CreateInto Lib \"gdiplus\" Alias \"GdipCreatePathIter\" (pi As GpPathIterator, ByVal Path As GpPath) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"Delete","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function Delete Lib \"gdiplus\" Alias \"GdipDeletePathIter\" (ByVal Me As GpPathIterator) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"Enumerate","kind":"function","vis":"public","signature":"Function Enumerate(resultCount&, points() As GpPointF, types() As PathPointType, ByVal startIndex& = -1, ByVal endIndex& = -1) As GpStatus","returnType":"GpStatus"}, + {"name":"Enumerate2","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function Enumerate2 Lib \"gdiplus\" Alias \"GdipPathIterEnumerate\" (ByVal Me As GpPathIterator, resultCount As Long, points As GpPointF, types As PathPointType, ByVal count As Long) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"EnumerateTyped","kind":"function","vis":"public","signature":"Function EnumerateTyped(typedPoints As TypedPoints, ByVal startIndex& = -1, ByVal endIndex& = -1) As GpStatus","returnType":"GpStatus"}, + {"name":"GetCount","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetCount Lib \"gdiplus\" Alias \"GdipPathIterGetCount\" (ByVal Me As GpPathIterator, count As Long) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetSubpathCount","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetSubpathCount Lib \"gdiplus\" Alias \"GdipPathIterGetSubpathCount\" (ByVal Me As GpPathIterator, count As Long) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"HasCurve","kind":"function","vis":"public","signature":"Function HasCurve(result As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"HasCurve2","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function HasCurve2 Lib \"gdiplus\" Alias \"GdipPathIterHasCurve\" (ByVal Me As GpPathIterator, hasCurve As GDIP_BOOL) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"IsValid","kind":"function","vis":"public","signature":"Function IsValid(result As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"IsValid2","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function IsValid2 Lib \"gdiplus\" Alias \"GdipPathIterIsValid\" (ByVal Me As GpPathIterator, valid As GDIP_BOOL) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"NextMarker","kind":"function","vis":"public","signature":"Function NextMarker(section As Marker) As GpStatus","returnType":"GpStatus"}, + {"name":"NextMarkerDirect","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function NextMarkerDirect Lib \"gdiplus\" Alias \"GdipPathIterNextMarker\" (ByVal Me As GpPathIterator, resultCount&, startIndex&, endIndex&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"NextMarkerPath","kind":"function","vis":"public","signature":"Function NextMarkerPath(marker As GpMarkerPath) As GpStatus","returnType":"GpStatus"}, + {"name":"NextMarkerPath2","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function NextMarkerPath2 Lib \"gdiplus\" Alias \"GdipPathIterNextMarkerPath\" (ByVal Me As GpPathIterator, resultCount As Long, path As GpPath) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"NextMarkerPathDirect","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function NextMarkerPathDirect Lib \"gdiplus\" Alias \"GdipPathIterNextMarkerPath\" (ByVal Me As GpPathIterator, resultCount&, path As GpPath) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"NextPathType","kind":"function","vis":"public","signature":"Function NextPathType(type As PathType) As GpStatus","returnType":"GpStatus"}, + {"name":"NextPathTypeDirect","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function NextPathTypeDirect Lib \"gdiplus\" Alias \"GdipPathIterNextPathType\" (ByVal Me As GpPathIterator, resultCount&, pathType As PathPointType, startIndex&, endIndex&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"NextSubpath","kind":"function","vis":"public","signature":"Function NextSubpath(subpath As SubPath) As GpStatus","returnType":"GpStatus"}, + {"name":"NextSubpath2","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function NextSubpath2 Lib \"gdiplus\" Alias \"GdipPathIterNextSubpath\" (ByVal Me As GpPathIterator, resultCount As Long, startIndex As Long, endIndex As Long, isClosed As GDIP_BOOL) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"NextSubpathDirect","kind":"function","vis":"public","signature":"Function NextSubpathDirect(resultCount&, startIndex&, endIndex&, isClosed As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"NextSubpathPath","kind":"function","vis":"public","signature":"Function NextSubpathPath(pathSubpath As GpSubPathPath) As GpStatus","returnType":"GpStatus"}, + {"name":"NextSubpathPath2","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function NextSubpathPath2 Lib \"gdiplus\" Alias \"GdipPathIterNextSubpathPath\" (ByVal Me As GpPathIterator, resultCount As Long, ByVal path As GpPath, isClosed As GDIP_BOOL) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"NextSubpathPathDirect","kind":"function","vis":"public","signature":"Function NextSubpathPathDirect(resultCount&, path As GpPath, isClosed As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"Rewind","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function Rewind Lib \"gdiplus\" Alias \"GdipPathIterRewind\" (ByVal Me As GpPathIterator) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]} + ] + }, + { + "name": "GpSubPathPath", + "kind": "type", + "in": "GdipPathIterator", + "vis": "public", + "file": "GdiPlus/PathIterator.twin", + "signature": "Type GpSubPathPath", + "fields": [ + {"name":"path","vis":"public","signature":"path As GpPath"}, + {"name":"isClosed","vis":"public","signature":"isClosed As Boolean"}, + {"name":"resultCount","vis":"public","signature":"resultCount&"} + ], + "members": [] + }, + { + "name": "Marker", + "kind": "type", + "in": "GdipPathIterator", + "vis": "public", + "file": "GdiPlus/PathIterator.twin", + "signature": "Type Marker", + "fields": [ + {"name":"startIndex","vis":"public","signature":"startIndex&"}, + {"name":"endIndex","vis":"public","signature":"endIndex&"}, + {"name":"resultCount","vis":"public","signature":"resultCount&"} + ], + "members": [] + }, + { + "name": "MarkerPath", + "kind": "type", + "in": "GdipPathIterator", + "vis": "public", + "file": "GdiPlus/PathIterator.twin", + "signature": "Type MarkerPath", + "fields": [ + {"name":"path","vis":"public","signature":"path As GraphicsPath"}, + {"name":"resultCount","vis":"public","signature":"resultCount&"} + ], + "members": [] + }, + { + "name": "PathPointType", + "kind": "type", + "in": "GdipPathIterator", + "vis": "public", + "file": "GdiPlus/PathIterator.twin", + "signature": "Type PathPointType", + "fields": [ + {"name":"_value","vis":"public","signature":"_value As Byte"} + ], + "members": [ + {"name":"CloseSubpath","kind":"property","vis":"public","signature":"Property Get CloseSubpath() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"DashMode","kind":"property","vis":"public","signature":"Property Get DashMode() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"PathMarker","kind":"property","vis":"public","signature":"Property Get PathMarker() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"PointType","kind":"property","vis":"public","signature":"Property Get PointType() As GpPathPointType","returnType":"GpPathPointType","accessor":"Get"}, + {"name":"ReservedFlag1","kind":"property","vis":"public","signature":"Property Get ReservedFlag1() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"ReservedFlag2","kind":"property","vis":"public","signature":"Property Get ReservedFlag2() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"Type_DebugView","kind":"function","vis":"private","signature":"Private Function Type_DebugView() As String","returnType":"String"} + ] + }, + { + "name": "PathType", + "kind": "type", + "in": "GdipPathIterator", + "vis": "public", + "file": "GdiPlus/PathIterator.twin", + "signature": "Type PathType", + "fields": [ + {"name":"type","vis":"public","signature":"type As PathPointType"}, + {"name":"startIndex","vis":"public","signature":"startIndex&"}, + {"name":"endIndex","vis":"public","signature":"endIndex&"}, + {"name":"resultCount","vis":"public","signature":"resultCount&"} + ], + "members": [] + }, + { + "name": "SubPath", + "kind": "type", + "in": "GdipPathIterator", + "vis": "public", + "file": "GdiPlus/PathIterator.twin", + "signature": "Type SubPath", + "fields": [ + {"name":"startIndex","vis":"public","signature":"startIndex&"}, + {"name":"endIndex","vis":"public","signature":"endIndex&"}, + {"name":"isClosed","vis":"public","signature":"isClosed As Boolean"}, + {"name":"resultCount","vis":"public","signature":"resultCount&"} + ], + "members": [] + }, + { + "name": "SubPathPath", + "kind": "type", + "in": "GdipPathIterator", + "vis": "public", + "file": "GdiPlus/PathIterator.twin", + "signature": "Type SubPathPath", + "fields": [ + {"name":"path","vis":"public","signature":"path As GraphicsPath"}, + {"name":"isClosed","vis":"public","signature":"isClosed As Boolean"}, + {"name":"resultCount","vis":"public","signature":"resultCount&"} + ], + "members": [] + }, + { + "name": "TypedPoint", + "kind": "type", + "in": "GdipPathIterator", + "vis": "public", + "file": "GdiPlus/PathIterator.twin", + "signature": "Type TypedPoint", + "fields": [ + {"name":"pos","vis":"public","signature":"pos As GpPointF"}, + {"name":"type","vis":"public","signature":"type As PathPointType"} + ], + "members": [] + }, + { + "name": "TypedPoints", + "kind": "type", + "in": "GdipPathIterator", + "vis": "public", + "file": "GdiPlus/PathIterator.twin", + "signature": "Type TypedPoints", + "fields": [ + {"name":"points","vis":"public","signature":"points() As TypedPoint"}, + {"name":"resultCount","vis":"public","signature":"resultCount&"} + ], + "members": [] + }, + { + "name": "GdipPen", + "kind": "module", + "vis": "public", + "file": "GdiPlus/Pen.twin", + "signature": "Module GdipPen", + "members": [ + {"name":"GpPen","kind":"function","vis":"public","signature":"Function GpPen() As GpPen","returnType":"GpPen"}, + {"name":"Pen","kind":"function","vis":"public","signature":"Function Pen(ByVal rgb As Long, ByVal width! = 1.0!, ByVal unit As GpUnit = UnitWorld) As Pen","returnType":"Pen"}, + {"name":"Pen","kind":"function","vis":"public","signature":"Function Pen(ByVal color As Color, ByVal width! = 1.0!, ByVal unit As GpUnit = UnitWorld) As Pen","returnType":"Pen"}, + {"name":"Pen","kind":"function","vis":"public","signature":"Function Pen(brush As Brush, ByVal width! = 1.0!) As Pen","returnType":"Pen"} + ] + }, + { + "name": "GpPen", + "kind": "type", + "in": "GdipPen", + "vis": "public", + "file": "GdiPlus/Pen.twin", + "signature": "Type GpPen", + "fields": [ + {"name":"Native","vis":"public","signature":"Native As LongPtr"} + ], + "members": [ + {"name":"Clone","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function Clone Lib \"gdiplus\" Alias \"GdipClonePen\" (ByVal Me As GpPen, clonepen As GpPen) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"Create1","kind":"function","vis":"public","signature":"Function Create1(ByVal color As Color, ByVal width!, ByVal unit As GpUnit = UnitWorld) As GpStatus","returnType":"GpStatus"}, + {"name":"Create2","kind":"function","vis":"public","signature":"Function Create2(ByVal brush As GpBrush, ByVal width!, ByVal unit As GpUnit = UnitWorld) As GpStatus","returnType":"GpStatus"}, + {"name":"CreateInto1","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function CreateInto1 Lib \"gdiplus\" Alias \"GdipCreatePen1\" (ByVal Color As Color, ByVal Width As Single, ByVal unit As GpUnit, pen As GpPen) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"CreateInto2","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function CreateInto2 Lib \"gdiplus\" Alias \"GdipCreatePen2\" (ByVal brush As GpBrush, ByVal Width As Single, ByVal unit As GpUnit, pen As GpPen) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"Delete","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function Delete Lib \"gdiplus\" Alias \"GdipDeletePen\" (ByVal Me As GpPen) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetAlignment","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetAlignment Lib \"gdiplus\" Alias \"GdipGetPenMode\" (ByVal Me As GpPen, penMode As GpPenAlignment) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetBrushFill","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetBrushFill Lib \"gdiplus\" Alias \"GdipGetPenBrushFill\" (ByVal Me As GpPen, Brush As GpBrush) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetColor","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetColor Lib \"gdiplus\" Alias \"GdipGetPenColor\" (ByVal Me As GpPen, color As Color) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetCompoundArray","kind":"function","vis":"public","signature":"Function GetCompoundArray(array As Single()) As GpStatus","returnType":"GpStatus"}, + {"name":"GetCompoundArrayX","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetCompoundArrayX Lib \"gdiplus\" Alias \"GdipGetPenCompoundArray\" (ByVal Me As GpPen, dash As Single, ByVal count As Long) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetCompoundCount","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetCompoundCount Lib \"gdiplus\" Alias \"GdipGetPenCompoundCount\" (ByVal Me As GpPen, count As Long) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetCustomEndCap","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetCustomEndCap Lib \"gdiplus\" Alias \"GdipGetPenCustomEndCap\" (ByVal Me As GpPen, customCap As GpCustomLineCap) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetCustomStartCap","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetCustomStartCap Lib \"gdiplus\" Alias \"GdipGetPenCustomStartCap\" (ByVal Me As GpPen, customCap As GpCustomLineCap) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetDashArray","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetDashArray Lib \"gdiplus\" Alias \"GdipGetPenDashArray\" (ByVal Me As GpPen, dash As Single, ByVal count As Long) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetDashCap","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetDashCap Lib \"gdiplus\" Alias \"GdipGetPenDashCap197819\" (ByVal Me As GpPen, dashCap As GpDashCap) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetDashCount","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetDashCount Lib \"gdiplus\" Alias \"GdipGetPenDashCount\" (ByVal Me As GpPen, count As Long) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetDashOffset","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetDashOffset Lib \"gdiplus\" Alias \"GdipGetPenDashOffset\" (ByVal Me As GpPen, offset As Single) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetDashPattern","kind":"function","vis":"public","signature":"Function GetDashPattern(pattern() As Single) As GpStatus","returnType":"GpStatus"}, + {"name":"GetDashStyle","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetDashStyle Lib \"gdiplus\" Alias \"GdipGetPenDashStyle\" (ByVal Me As GpPen, dashStyle As GpDashStyle) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetEndCap","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetEndCap Lib \"gdiplus\" Alias \"GdipGetPenEndCap\" (ByVal Me As GpPen, endCap As GpLineCap) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetFillType","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetFillType Lib \"gdiplus\" Alias \"GdipGetPenFillType\" (ByVal Me As GpPen, type As GpPenType) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetLineJoin","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetLineJoin Lib \"gdiplus\" Alias \"GdipGetPenLineJoin\" (ByVal Me As GpPen, lineJoin As GpLineJoin) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetMiterLimit","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetMiterLimit Lib \"gdiplus\" Alias \"GdipGetPenMiterLimit\" (ByVal Me As GpPen, miterLimit As Single) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetMode","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetMode Lib \"gdiplus\" Alias \"GdipGetPenMode\" (ByVal Me As GpPen, penMode As GpPenAlignment) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetRGB","kind":"function","vis":"public","signature":"Function GetRGB(rgb&) As GpStatus","returnType":"GpStatus"}, + {"name":"GetStartCap","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetStartCap Lib \"gdiplus\" Alias \"GdipGetPenStartCap\" (ByVal Me As GpPen, startCap As GpLineCap) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetTransform","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetTransform Lib \"gdiplus\" Alias \"GdipGetPenTransform\" (ByVal Me As GpPen, ByVal matrix As GpMatrix) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetUnit","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetUnit Lib \"gdiplus\" Alias \"GdipGetPenUnit\" (ByVal Me As GpPen, unit As GpUnit) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetWidth","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetWidth Lib \"gdiplus\" Alias \"GdipGetPenWidth\" (ByVal Me As GpPen, width As Single) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"MultiplyTransform","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function MultiplyTransform Lib \"gdiplus\" Alias \"GdipMultiplyPenTransform\" (ByVal Me As GpPen, ByVal matrix As GpMatrix, ByVal order As GpMatrixOrder) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"Release","kind":"function","vis":"public","signature":"Function Release() As GpPen","returnType":"GpPen"}, + {"name":"ResetTransform","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function ResetTransform Lib \"gdiplus\" Alias \"GdipResetPenTransform\" (ByVal Me As GpPen) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"RotateTransform","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function RotateTransform Lib \"gdiplus\" Alias \"GdipRotatePenTransform\" (ByVal Me As GpPen, ByVal angle As Single, ByVal order As GpMatrixOrder) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"ScaleTransform","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function ScaleTransform Lib \"gdiplus\" Alias \"GdipScalePenTransform\" (ByVal Me As GpPen, ByVal sx As Single, ByVal sy As Single, ByVal order As GpMatrixOrder) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"Set2","kind":"function","vis":"public","signature":"Function Set2(ByVal color As Color, ByVal width!) As GpStatus","returnType":"GpStatus"}, + {"name":"SetAlignment","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetAlignment Lib \"gdiplus\" Alias \"GdipSetPenMode\" (ByVal Me As GpPen, ByVal penMode As GpPenAlignment) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetBrushFill","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetBrushFill Lib \"gdiplus\" Alias \"GdipSetPenBrushFill\" (ByVal Me As GpPen, ByVal Brush As GpBrush) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetCaps","kind":"function","vis":"public","signature":"Function SetCaps(ByVal bothCaps As GpLineCap) As GpStatus","returnType":"GpStatus"}, + {"name":"SetColor","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetColor Lib \"gdiplus\" Alias \"GdipSetPenColor\" (ByVal Me As GpPen, ByVal color As Color) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetCompoundArray","kind":"function","vis":"public","signature":"Function SetCompoundArray(array() As Single) As GpStatus","returnType":"GpStatus"}, + {"name":"SetCompoundArrayX","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetCompoundArrayX Lib \"gdiplus\" Alias \"GdipSetPenCompoundArray\" (ByVal Me As GpPen, ByVal dash As LongPtr, ByVal count As Long) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetCustomEndCap","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetCustomEndCap Lib \"gdiplus\" Alias \"GdipSetPenCustomEndCap\" (ByVal Me As GpPen, ByVal customCap As GpCustomLineCap) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetCustomStartCap","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetCustomStartCap Lib \"gdiplus\" Alias \"GdipSetPenCustomStartCap\" (ByVal Me As GpPen, ByVal customCap As GpCustomLineCap) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetDashArray","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetDashArray Lib \"gdiplus\" Alias \"GdipSetPenDashArray\" (ByVal Me As GpPen, ByVal dash As LongPtr, ByVal count As Long) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetDashCap","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetDashCap Lib \"gdiplus\" Alias \"GdipSetPenDashCap197819\" (ByVal Me As GpPen, ByVal dashCap As GpDashCap) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetDashOffset","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetDashOffset Lib \"gdiplus\" Alias \"GdipSetPenDashOffset\" (ByVal Me As GpPen, ByVal offset As Single) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetDashPattern","kind":"function","vis":"public","signature":"Function SetDashPattern(pattern() As Single) As GpStatus","returnType":"GpStatus"}, + {"name":"SetDashStyle","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetDashStyle Lib \"gdiplus\" Alias \"GdipSetPenDashStyle\" (ByVal Me As GpPen, ByVal dashStyle As GpDashStyle) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetEndCap","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetEndCap Lib \"gdiplus\" Alias \"GdipSetPenEndCap\" (ByVal Me As GpPen, ByVal endCap As GpLineCap) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetLineCap","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetLineCap Lib \"gdiplus\" Alias \"GdipSetPenLineCap197819\" (ByVal Me As GpPen, ByVal startCap As GpLineCap, ByVal endCap As GpLineCap, ByVal dashCap As GpDashCap) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetLineJoin","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetLineJoin Lib \"gdiplus\" Alias \"GdipSetPenLineJoin\" (ByVal Me As GpPen, ByVal lineJoin As GpLineJoin) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetMiterLimit","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetMiterLimit Lib \"gdiplus\" Alias \"GdipSetPenMiterLimit\" (ByVal Me As GpPen, ByVal miterLimit As Single) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetMode","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetMode Lib \"gdiplus\" Alias \"GdipSetPenMode\" (ByVal Me As GpPen, ByVal penMode As GpPenAlignment) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetRGB","kind":"function","vis":"public","signature":"Function SetRGB(ByVal rgb&) As GpStatus","returnType":"GpStatus"}, + {"name":"SetRGB2","kind":"function","vis":"public","signature":"Function SetRGB2(ByVal rgb&, ByVal width!) As GpStatus","returnType":"GpStatus"}, + {"name":"SetStartCap","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetStartCap Lib \"gdiplus\" Alias \"GdipSetPenStartCap\" (ByVal Me As GpPen, ByVal startCap As GpLineCap) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetTransform","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetTransform Lib \"gdiplus\" Alias \"GdipSetPenTransform\" (ByVal Me As GpPen, ByVal matrix As GpMatrix) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetUnit","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetUnit Lib \"gdiplus\" Alias \"GdipSetPenUnit\" (ByVal Me As GpPen, ByVal unit As GpUnit) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetWidth","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetWidth Lib \"gdiplus\" Alias \"GdipSetPenWidth\" (ByVal Me As GpPen, ByVal width As Single) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"TranslateTransform","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function TranslateTransform Lib \"gdiplus\" Alias \"GdipTranslatePenTransform\" (ByVal Me As GpPen, ByVal dx As Single, ByVal dy As Single, ByVal order As GpMatrixOrder) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]} + ] + }, + { + "name": "GdipPixelFormats", + "kind": "module", + "vis": "public", + "file": "GdiPlus/PixelFormats.twin", + "signature": "Module GdipPixelFormats", + "members": [ + {"name":"GetPixelFormatSize","kind":"function","vis":"public","signature":"Function GetPixelFormatSize(pixfmt As PixelFormat) As UINT","returnType":"UINT"}, + {"name":"IsAlphaPixelFormat","kind":"function","vis":"public","signature":"Function IsAlphaPixelFormat(pixfmt As PixelFormat) As Boolean","returnType":"Boolean"}, + {"name":"IsCanonicalPixelFormat","kind":"function","vis":"public","signature":"Function IsCanonicalPixelFormat(pixfmt As PixelFormat) As Boolean","returnType":"Boolean"}, + {"name":"IsExtendedPixelFormat","kind":"function","vis":"public","signature":"Function IsExtendedPixelFormat(pixfmt As PixelFormat) As Boolean","returnType":"Boolean"}, + {"name":"IsIndexedPixelFormat","kind":"function","vis":"public","signature":"Function IsIndexedPixelFormat(pixfmt As PixelFormat) As Boolean","returnType":"Boolean"} + ] + }, + { + "name": "DitherType", + "kind": "enum", + "in": "GdipPixelFormats", + "vis": "public", + "file": "GdiPlus/PixelFormats.twin", + "signature": "Enum DitherType", + "values": [ + {"name":"DitherTypeNone","value":"0"}, + {"name":"DitherTypeSolid","value":"1"}, + {"name":"DitherTypeOrdered4x4","value":"2"}, + {"name":"DitherTypeOrdered8x8","value":"3"}, + {"name":"DitherTypeOrdered16x16","value":"4"}, + {"name":"DitherTypeSpiral4x4","value":"5"}, + {"name":"DitherTypeSpiral8x8","value":"6"}, + {"name":"DitherTypeDualSpiral4x4","value":"7"}, + {"name":"DitherTypeDualSpiral8x8","value":"8"}, + {"name":"DitherTypeErrorDiffusion","value":"9"}, + {"name":"DitherTypeMax","value":"10"} + ] + }, + { + "name": "PaletteFlags", + "kind": "enum", + "in": "GdipPixelFormats", + "vis": "public", + "file": "GdiPlus/PixelFormats.twin", + "signature": "Enum PaletteFlags", + "values": [ + {"name":"PaletteFlagsHasAlpha","value":"&h0001"}, + {"name":"PaletteFlagsGrayScale","value":"&h0002"}, + {"name":"PaletteFlagsHalftone","value":"&h0004"} + ] + }, + { + "name": "PaletteType", + "kind": "enum", + "in": "GdipPixelFormats", + "vis": "public", + "file": "GdiPlus/PixelFormats.twin", + "signature": "Enum PaletteType", + "values": [ + {"name":"PaletteTypeCustom","value":"0"}, + {"name":"PaletteTypeOptimal","value":"1"}, + {"name":"PaletteTypeFixedBW","value":"2"}, + {"name":"PaletteTypeFixedHalftone8","value":"3"}, + {"name":"PaletteTypeFixedHalftone27","value":"4"}, + {"name":"PaletteTypeFixedHalftone64","value":"5"}, + {"name":"PaletteTypeFixedHalftone125","value":"6"}, + {"name":"PaletteTypeFixedHalftone216","value":"7"}, + {"name":"PaletteTypeFixedHalftone252","value":"8"}, + {"name":"PaletteTypeFixedHalftone256","value":"9"} + ] + }, + { + "name": "PixelFormat", + "kind": "enum", + "in": "GdipPixelFormats", + "vis": "public", + "file": "GdiPlus/PixelFormats.twin", + "signature": "Enum PixelFormat", + "values": [ + {"name":"PixelFormatIndexed","value":"&h00010000"}, + {"name":"PixelFormatGDI","value":"&h00020000"}, + {"name":"PixelFormatAlpha","value":"&h00040000"}, + {"name":"PixelFormatPAlpha","value":"&h00080000"}, + {"name":"PixelFormatExtended","value":"&h00100000"}, + {"name":"PixelFormatCanonical","value":"&h00200000"}, + {"name":"PixelFormatUndefined","value":"0"}, + {"name":"PixelFormatDontCare","value":"0"}, + {"name":"PixelFormat1bppIndexed","value":"(1 Or (1 << 8) Or PixelFormatIndexed Or PixelFormatGDI)"}, + {"name":"PixelFormat4bppIndexed","value":"(2 Or (4 << 8) Or PixelFormatIndexed Or PixelFormatGDI)"}, + {"name":"PixelFormat8bppIndexed","value":"(3 Or (8 << 8) Or PixelFormatIndexed Or PixelFormatGDI)"}, + {"name":"PixelFormat16bppGrayScale","value":"(4 Or (16 << 8) Or PixelFormatExtended)"}, + {"name":"PixelFormat16bppRGB555","value":"(5 Or (16 << 8) Or PixelFormatGDI)"}, + {"name":"PixelFormat16bppRGB565","value":"(6 Or (16 << 8) Or PixelFormatGDI)"}, + {"name":"PixelFormat16bppARGB1555","value":"(7 Or (16 << 8) Or PixelFormatAlpha Or PixelFormatGDI)"}, + {"name":"PixelFormat24bppRGB","value":"(8 Or (24 << 8) Or PixelFormatGDI)"}, + {"name":"PixelFormat32bppRGB","value":"(9 Or (32 << 8) Or PixelFormatGDI)"}, + {"name":"PixelFormat32bppARGB","value":"(10 Or (32 << 8) Or PixelFormatAlpha Or PixelFormatGDI Or PixelFormatCanonical)"}, + {"name":"PixelFormat32bppPARGB","value":"(11 Or (32 << 8) Or PixelFormatAlpha Or PixelFormatPAlpha Or PixelFormatGDI)"}, + {"name":"PixelFormat48bppRGB","value":"(12 Or (48 << 8) Or PixelFormatExtended)"}, + {"name":"PixelFormat64bppARGB","value":"(13 Or (64 << 8) Or PixelFormatAlpha Or PixelFormatCanonical Or PixelFormatExtended)"}, + {"name":"PixelFormat64bppPARGB","value":"(14 Or (64 << 8) Or PixelFormatAlpha Or PixelFormatPAlpha Or PixelFormatExtended)"}, + {"name":"PixelFormat32bppCMYK","value":"(15 Or (32 << 8))"}, + {"name":"PixelFormatMax","value":"16"} + ] + }, + { + "name": "GdipPlatform", + "kind": "module", + "vis": "public", + "file": "GdiPlus/Platform.twin", + "signature": "Module GdipPlatform", + "members": [ + {"name":"CLSIDFromString","kind":"function","vis":"private","declare":true,"signature":"Private Declarewide PtrSafe Function CLSIDFromString Lib \"ole32\" (ByVal in$, ByRef out As GDIP_UUID) As Long","returnType":"Long"}, + {"name":"GDIPDEF_UUID","kind":"sub","vis":"public","signature":"Public Sub GDIPDEF_UUID(output As GDIP_UUID, ByVal input$)"} + ] + }, + { + "name": "GDIP_BOOL", + "kind": "enum", + "in": "GdipPlatform", + "vis": "public", + "file": "GdiPlus/Platform.twin", + "signature": "Enum GDIP_BOOL", + "values": [ + {"name":"GDIP_CFALSE"}, + {"name":"GDIP_CTRUE"} + ] + }, + { + "name": "GDIP_POINT", + "kind": "type", + "in": "GdipPlatform", + "vis": "public", + "file": "GdiPlus/Platform.twin", + "signature": "Public Type GDIP_POINT", + "fields": [ + {"name":"x","vis":"public","signature":"x As Long"}, + {"name":"y","vis":"public","signature":"y As Long"} + ], + "members": [] + }, + { + "name": "GDIP_RECT", + "kind": "type", + "in": "GdipPlatform", + "vis": "public", + "file": "GdiPlus/Platform.twin", + "signature": "Public Type GDIP_RECT", + "fields": [ + {"name":"Left","vis":"public","signature":"Left As Long"}, + {"name":"Top","vis":"public","signature":"Top As Long"}, + {"name":"Right","vis":"public","signature":"Right As Long"}, + {"name":"Bottom","vis":"public","signature":"Bottom As Long"} + ], + "members": [] + }, + { + "name": "GDIP_RECTF", + "kind": "type", + "in": "GdipPlatform", + "vis": "public", + "file": "GdiPlus/Platform.twin", + "signature": "Public Type GDIP_RECTF", + "fields": [ + {"name":"Left","vis":"public","signature":"Left As Single"}, + {"name":"Top","vis":"public","signature":"Top As Single"}, + {"name":"Right","vis":"public","signature":"Right As Single"}, + {"name":"Bottom","vis":"public","signature":"Bottom As Single"} + ], + "members": [] + }, + { + "name": "GDIP_SIZE", + "kind": "type", + "in": "GdipPlatform", + "vis": "public", + "file": "GdiPlus/Platform.twin", + "signature": "Public Type GDIP_SIZE", + "fields": [ + {"name":"cx","vis":"public","signature":"cx As Long"}, + {"name":"cy","vis":"public","signature":"cy As Long"} + ], + "members": [] + }, + { + "name": "GDIP_UUID", + "kind": "type", + "in": "GdipPlatform", + "vis": "public", + "file": "GdiPlus/Platform.twin", + "signature": "Public Type GDIP_UUID", + "fields": [ + {"name":"Data1","vis":"public","signature":"Data1 As Long"}, + {"name":"Data2","vis":"public","signature":"Data2 As Integer"}, + {"name":"Data3","vis":"public","signature":"Data3 As Integer"}, + {"name":"Data4","vis":"public","signature":"Data4 (0 To 7) As Byte"} + ], + "members": [] + }, + { + "name": "GdipPrivateFontCollection", + "kind": "module", + "vis": "public", + "file": "GdiPlus/PrivateFontCollection.twin", + "signature": "Module GdipPrivateFontCollection", + "members": [ + {"name":"GpPrivateFontCollection","kind":"function","vis":"public","signature":"Function GpPrivateFontCollection() As GpPrivateFontCollection","returnType":"GpPrivateFontCollection"}, + {"name":"PrivateFontCollection","kind":"function","vis":"public","signature":"Function PrivateFontCollection() As PrivateFontCollection","returnType":"PrivateFontCollection"} + ] + }, + { + "name": "GpPrivateFontCollection", + "kind": "type", + "in": "GdipPrivateFontCollection", + "vis": "public", + "file": "GdiPlus/PrivateFontCollection.twin", + "signature": "Type GpPrivateFontCollection", + "fields": [ + {"name":"Native","vis":"public","signature":"Native As LongPtr"} + ], + "members": [ + {"name":"AddFontFile","kind":"function","vis":"public","declare":true,"signature":"Public DeclareWide PtrSafe Function AddFontFile Lib \"gdiplus\" Alias \"GdipPrivateAddFontFile\" (ByVal Me As GpPrivateFontCollection, ByVal FileName$) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"AddMemoryFont","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function AddMemoryFont Lib \"gdiplus\" Alias \"GdipPrivateAddMemoryFont\" (ByVal Me As GpPrivateFontCollection, memory As Any, ByVal length&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"Create","kind":"function","vis":"public","signature":"Function Create() As GpStatus","returnType":"GpStatus"}, + {"name":"CreateInto","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function CreateInto Lib \"gdiplus\" Alias \"GdipNewPrivateFontCollection\" (pf As GpPrivateFontCollection) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"Delete","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function Delete Lib \"gdiplus\" Alias \"GdipDeletePrivateFontCollection\" (ByVal Me As GpPrivateFontCollection) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetFamilyCount","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function GetFamilyCount Lib \"gdiplus\" Alias \"GdipGetFontCollectionFamilyCount\" (ByVal Me As GpPrivateFontCollection, numFound&) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetFamilyList","kind":"function","vis":"public","signature":"Function GetFamilyList(list() As GpFontFamily) As GpStatus","returnType":"GpStatus"} + ] + }, + { + "name": "GdipRegion", + "kind": "module", + "vis": "public", + "file": "GdiPlus/Region.twin", + "signature": "Module GdipRegion", + "members": [ + {"name":"FromHRGN","kind":"function","vis":"public","signature":"Function FromHRGN(ByVal hRgn As LongPtr) As Region","returnType":"Region"}, + {"name":"GpRegion","kind":"function","vis":"public","signature":"Function GpRegion() As GpRegion","returnType":"GpRegion"}, + {"name":"Region","kind":"function","vis":"public","signature":"Function Region() As Region","returnType":"Region"}, + {"name":"Region","kind":"function","vis":"public","signature":"Function Region(rect As GpRectF) As Region","returnType":"Region"}, + {"name":"Region","kind":"function","vis":"public","signature":"Function Region(rect As GpRect) As Region","returnType":"Region"}, + {"name":"Region","kind":"function","vis":"public","signature":"Function Region(path As GraphicsPath) As Region","returnType":"Region"}, + {"name":"Region","kind":"function","vis":"public","signature":"Function Region(regionData As Byte, ByVal size&) As Region","returnType":"Region"}, + {"name":"Region","kind":"function","vis":"public","signature":"Function Region(ByVal hRgn As LongPtr) As Region","returnType":"Region"} + ] + }, + { + "name": "GpRegion", + "kind": "type", + "in": "GdipRegion", + "vis": "public", + "file": "GdiPlus/Region.twin", + "signature": "Type GpRegion", + "fields": [ + {"name":"Native","vis":"public","signature":"Native As LongPtr"} + ], + "members": [ + {"name":"Clone","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function Clone Lib \"gdiplus\" Alias \"GdipCloneRegion\" (ByVal Me As GpRegion, CloneRegion As GpRegion) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"CombinePath","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function CombinePath Lib \"gdiplus\" Alias \"GdipCombineRegionPath\" (ByVal Me As GpRegion, ByVal Path As GpPath, ByVal combineMode As GpCombineMode) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"CombineRect","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function CombineRect Lib \"gdiplus\" Alias \"GdipCombineRegionRect\" (ByVal Me As GpRegion, Rect As GpRectF, ByVal combineMode As GpCombineMode) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"CombineRectI","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function CombineRectI Lib \"gdiplus\" Alias \"GdipCombineRegionRectI\" (ByVal Me As GpRegion, Rect As GpRect, ByVal combineMode As GpCombineMode) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"CombineRegion","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function CombineRegion Lib \"gdiplus\" Alias \"GdipCombineRegionRegion\" (ByVal Me As GpRegion, ByVal region2 As GpRegion, ByVal combineMode As GpCombineMode) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"Complement","kind":"function","vis":"public","signature":"Function Complement(ByVal region As GpRegion) As GpStatus","returnType":"GpStatus"}, + {"name":"ComplementP","kind":"function","vis":"public","signature":"Function ComplementP(ByVal path As GpPath) As GpStatus","returnType":"GpStatus"}, + {"name":"ComplementRF","kind":"function","vis":"public","signature":"Function ComplementRF(rect As GpRectF) As GpStatus","returnType":"GpStatus"}, + {"name":"ComplementRI","kind":"function","vis":"public","signature":"Function ComplementRI(rect As GpRect) As GpStatus","returnType":"GpStatus"}, + {"name":"Create","kind":"function","vis":"public","signature":"Function Create() As GpStatus","returnType":"GpStatus"}, + {"name":"CreateFromHrgnInto","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function CreateFromHrgnInto Lib \"gdiplus\" Alias \"GdipCreateRegionHrgn\" (ByVal hRgn As LongPtr, Region As GpRegion) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"CreateFromPathInto","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function CreateFromPathInto Lib \"gdiplus\" Alias \"GdipCreateRegionPath\" (ByVal Path As GpPath, Region As GpRegion) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"CreateFromRectInto","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function CreateFromRectInto Lib \"gdiplus\" Alias \"GdipCreateRegionRect\" (Rect As GpRectF, Region As GpRegion) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"CreateFromRectIntoI","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function CreateFromRectIntoI Lib \"gdiplus\" Alias \"GdipCreateRegionRectI\" (Rect As GpRect, Region As GpRegion) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"CreateFromRgnDataInto","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function CreateFromRgnDataInto Lib \"gdiplus\" Alias \"GdipCreateRegionRgnData\" (regionData As Any, ByVal size As Long, Region As GpRegion) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"CreateInto","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function CreateInto Lib \"gdiplus\" Alias \"GdipCreateRegion\" (Region As GpRegion) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"Delete","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function Delete Lib \"gdiplus\" Alias \"GdipDeleteRegion\" (ByVal Me As GpRegion) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"Exclude","kind":"function","vis":"public","signature":"Function Exclude(ByVal region As GpRegion) As GpStatus","returnType":"GpStatus"}, + {"name":"ExcludeP","kind":"function","vis":"public","signature":"Function ExcludeP(ByVal path As GpPath) As GpStatus","returnType":"GpStatus"}, + {"name":"ExcludeRF","kind":"function","vis":"public","signature":"Function ExcludeRF(rect As GpRectF) As GpStatus","returnType":"GpStatus"}, + {"name":"ExcludeRI","kind":"function","vis":"public","signature":"Function ExcludeRI(rect As GpRect) As GpStatus","returnType":"GpStatus"}, + {"name":"GetBounds","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function GetBounds Lib \"gdiplus\" Alias \"GdipGetRegionBounds\" (ByVal Me As GpRegion, ByVal Graphics As GpGraphics, Rect As GpRectF) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetBoundsI","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function GetBoundsI Lib \"gdiplus\" Alias \"GdipGetRegionBoundsI\" (ByVal Me As GpRegion, ByVal Graphics As GpGraphics, Rect As GpRect) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetData","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function GetData Lib \"gdiplus\" Alias \"GdipGetRegionData\" (ByVal Me As GpRegion, buffer As Byte, ByVal bufferSize As Long, sizeFilled As Long) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetDataSize","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function GetDataSize Lib \"gdiplus\" Alias \"GdipGetRegionDataSize\" (ByVal Me As GpRegion, bufferSize As Long) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetHRgn","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function GetHRgn Lib \"gdiplus\" Alias \"GdipGetRegionHRgn\" (ByVal Me As GpRegion, ByVal Graphics As GpGraphics, hRgn As LongPtr) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetRegionScans","kind":"function","vis":"public","signature":"Function GetRegionScans(ByVal matrix As GpMatrix, scans() As GpRectF) As GpStatus","returnType":"GpStatus"}, + {"name":"GetRegionScansI","kind":"function","vis":"public","signature":"Function GetRegionScansI(ByVal matrix As GpMatrix, scans() As GpRect) As GpStatus","returnType":"GpStatus"}, + {"name":"GetScans","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function GetScans Lib \"gdiplus\" Alias \"GdipGetRegionScans\" (ByVal Me As GpRegion, rects As GpRectF, count As Long, ByVal matrix As GpMatrix) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetScansCount","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function GetScansCount Lib \"gdiplus\" Alias \"GdipGetRegionScansCount\" (ByVal Me As GpRegion, count As Long, ByVal matrix As GpMatrix) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetScansI","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function GetScansI Lib \"gdiplus\" Alias \"GdipGetRegionScansI\" (ByVal Me As GpRegion, rects As GpRect, count As Long, ByVal matrix As GpMatrix) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"Intersect","kind":"function","vis":"public","signature":"Function Intersect(ByVal region As GpRegion) As GpStatus","returnType":"GpStatus"}, + {"name":"IntersectP","kind":"function","vis":"public","signature":"Function IntersectP(ByVal path As GpPath) As GpStatus","returnType":"GpStatus"}, + {"name":"IntersectRF","kind":"function","vis":"public","signature":"Function IntersectRF(rect As GpRectF) As GpStatus","returnType":"GpStatus"}, + {"name":"IntersectRI","kind":"function","vis":"public","signature":"Function IntersectRI(rect As GpRect) As GpStatus","returnType":"GpStatus"}, + {"name":"IsEmpty","kind":"function","vis":"public","signature":"Function IsEmpty(ByVal gr As GpGraphics, result As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"IsEmpty2","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function IsEmpty2 Lib \"gdiplus\" Alias \"GdipIsEmptyRegion\" (ByVal Me As GpRegion, ByVal Graphics As GpGraphics, result As GDIP_BOOL) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"IsEqualTo","kind":"function","vis":"public","signature":"Function IsEqualTo(ByVal rg As GpRegion, gr As GpGraphics, result As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"IsEqualTo2","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function IsEqualTo2 Lib \"gdiplus\" Alias \"GdipIsEqualRegion\" (ByVal Me As GpRegion, ByVal region2 As GpRegion, ByVal Graphics As GpGraphics, result As GDIP_BOOL) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"IsInfinite","kind":"function","vis":"public","signature":"Function IsInfinite(ByVal gr As GpGraphics, result As Boolean) As Boolean","returnType":"Boolean"}, + {"name":"IsInfinite2","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function IsInfinite2 Lib \"gdiplus\" Alias \"GdipIsInfiniteRegion\" (ByVal Me As GpRegion, ByVal Graphics As GpGraphics, result As GDIP_BOOL) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"IsVisiblePF","kind":"function","vis":"public","signature":"Function IsVisiblePF(ByVal pt As GpPointF, ByVal gr As GpGraphics, result As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"IsVisiblePI","kind":"function","vis":"public","signature":"Function IsVisiblePI(ByVal pt As GpPoint, ByVal gr As GpGraphics, result As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"IsVisiblePoint","kind":"function","vis":"public","signature":"Function IsVisiblePoint(ByVal x!, ByVal y!, ByVal gr As GpGraphics, result As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"IsVisiblePoint2","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function IsVisiblePoint2 Lib \"gdiplus\" Alias \"GdipIsVisibleRegionPoint\" (ByVal Me As GpRegion, ByVal X As Single, ByVal Y As Single, ByVal Graphics As GpGraphics, result As GDIP_BOOL) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"IsVisiblePointI","kind":"function","vis":"public","signature":"Function IsVisiblePointI(ByVal x&, ByVal y&, ByVal gr As GpGraphics, result As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"IsVisiblePointI2","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function IsVisiblePointI2 Lib \"gdiplus\" Alias \"GdipIsVisibleRegionPointI\" (ByVal Me As GpRegion, ByVal X As Long, ByVal Y As Long, ByVal Graphics As GpGraphics, result As GDIP_BOOL) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"IsVisibleRF","kind":"function","vis":"public","signature":"Function IsVisibleRF(rect As GpRectF, ByVal gr As GpGraphics, result As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"IsVisibleRI","kind":"function","vis":"public","signature":"Function IsVisibleRI(rect As GpRect, ByVal gr As GpGraphics, result As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"IsVisibleRect","kind":"function","vis":"public","signature":"Function IsVisibleRect(ByVal x!, ByVal y!, ByVal width!, ByVal height!, ByVal gr As GpGraphics, result As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"IsVisibleRect2","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function IsVisibleRect2 Lib \"gdiplus\" Alias \"GdipIsVisibleRegionRect\" (ByVal Me As GpRegion, ByVal X As Single, ByVal Y As Single, ByVal width As Single, ByVal height As Single, ByVal Graphics As GpGraphics, result As GDIP_BOOL) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"IsVisibleRectI","kind":"function","vis":"public","signature":"Function IsVisibleRectI(ByVal x&, ByVal y&, ByVal width&, ByVal height&, ByVal gr As GpGraphics, result As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"IsVisibleRectI2","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function IsVisibleRectI2 Lib \"gdiplus\" Alias \"GdipIsVisibleRegionRectI\" (ByVal Me As GpRegion, ByVal X As Long, ByVal Y As Long, ByVal width As Long, ByVal height As Long, ByVal Graphics As GpGraphics, result As GDIP_BOOL) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetEmpty","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function SetEmpty Lib \"gdiplus\" Alias \"GdipSetEmpty\" (ByVal Me As GpRegion) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetInfinite","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function SetInfinite Lib \"gdiplus\" Alias \"GdipSetInfinite\" (ByVal Me As GpRegion) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"Transform","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function Transform Lib \"gdiplus\" Alias \"GdipTransformRegion\" (ByVal Me As GpRegion, ByVal matrix As GpMatrix) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"Translate","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function Translate Lib \"gdiplus\" Alias \"GdipTranslateRegion\" (ByVal Me As GpRegion, ByVal dx As Single, ByVal dy As Single) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"TranslateI","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function TranslateI Lib \"gdiplus\" Alias \"GdipTranslateRegionI\" (ByVal Me As GpRegion, ByVal dx As Long, ByVal dy As Long) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"TranslatePF","kind":"function","vis":"public","signature":"Function TranslatePF(ByVal pt As GpPointF) As GpStatus","returnType":"GpStatus"}, + {"name":"TranslatePI","kind":"function","vis":"public","signature":"Function TranslatePI(ByVal pt As GpPoint) As GpStatus","returnType":"GpStatus"}, + {"name":"Union","kind":"function","vis":"public","signature":"Function Union(ByVal region As GpRegion) As GpStatus","returnType":"GpStatus"}, + {"name":"UnionP","kind":"function","vis":"public","signature":"Function UnionP(ByVal path As GpPath) As GpStatus","returnType":"GpStatus"}, + {"name":"UnionRF","kind":"function","vis":"public","signature":"Function UnionRF(rect As GpRectF) As GpStatus","returnType":"GpStatus"}, + {"name":"UnionRI","kind":"function","vis":"public","signature":"Function UnionRI(rect As GpRect) As GpStatus","returnType":"GpStatus"}, + {"name":"Xor","kind":"function","vis":"public","signature":"Function Xor(ByVal region As GpRegion) As GpStatus","returnType":"GpStatus"}, + {"name":"XorP","kind":"function","vis":"public","signature":"Function XorP(ByVal path As GpPath) As GpStatus","returnType":"GpStatus"}, + {"name":"XorRF","kind":"function","vis":"public","signature":"Function XorRF(rect As GpRectF) As GpStatus","returnType":"GpStatus"}, + {"name":"XorRI","kind":"function","vis":"public","signature":"Function XorRI(rect As GpRect) As GpStatus","returnType":"GpStatus"} + ] + }, + { + "name": "GdipSolidBrush", + "kind": "module", + "vis": "public", + "file": "GdiPlus/SolidBrush.twin", + "signature": "Module GdipSolidBrush", + "members": [ + {"name":"GpSolidFill","kind":"function","vis":"public","signature":"Function GpSolidFill() As GpSolidFill","returnType":"GpSolidFill"}, + {"name":"GpSolidFill","kind":"function","vis":"public","signature":"Function GpSolidFill(nativeBrush As GpBrush) As GpSolidFill","returnType":"GpSolidFill"}, + {"name":"SolidBrush","kind":"function","vis":"public","signature":"Function SolidBrush(ByVal rgb&) As SolidBrush","returnType":"SolidBrush"}, + {"name":"SolidBrush","kind":"function","vis":"public","signature":"Function SolidBrush(ByVal color As Color) As SolidBrush","returnType":"SolidBrush"} + ] + }, + { + "name": "GpSolidFill", + "kind": "type", + "in": "GdipSolidBrush", + "vis": "public", + "file": "GdiPlus/SolidBrush.twin", + "signature": "Type GpSolidFill", + "fields": [ + {"name":"Native","vis":"public","signature":"Native As LongPtr"} + ], + "members": [ + {"name":"Clone","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function Clone Lib \"gdiplus\" Alias \"GdipCloneBrush\" (ByVal Me As GpSolidFill, cloneBrush As GpSolidFill) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"Create","kind":"function","vis":"public","signature":"Function Create(ByVal argb As Color) As GpStatus","returnType":"GpStatus"}, + {"name":"CreateInto","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function CreateInto Lib \"gdiplus\" Alias \"GdipCreateSolidFill\" (ByVal argb As Color, brush As GpSolidFill) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"Delete","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function Delete Lib \"gdiplus\" Alias \"GdipDeleteBrush\" (ByVal Me As GpSolidFill) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetColor","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetColor Lib \"gdiplus\" Alias \"GdipGetSolidFillColor\" (ByVal Me As GpSolidFill, color As Color) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetRGB","kind":"function","vis":"public","signature":"Function GetRGB(rgb&) As GpStatus","returnType":"GpStatus"}, + {"name":"GetType","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetType Lib \"gdiplus\" Alias \"GdipGetBrushType\" (ByVal Me As GpSolidFill, type As GpBrushType) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"Release","kind":"function","vis":"public","signature":"Function Release() As GpSolidFill","returnType":"GpSolidFill"}, + {"name":"SetColor","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetColor Lib \"gdiplus\" Alias \"GdipSetSolidFillColor\" (ByVal Me As GpSolidFill, ByVal color As Color) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetRGB","kind":"function","vis":"public","signature":"Function SetRGB(ByVal rgb&) As GpStatus","returnType":"GpStatus"} + ] + }, + { + "name": "GdipStringFormat", + "kind": "module", + "vis": "public", + "file": "GdiPlus/StringFormat.twin", + "signature": "Module GdipStringFormat", + "members": [ + {"name":"GenericDefaultStringFormat","kind":"function","vis":"public","signature":"Function GenericDefaultStringFormat() As StringFormat","returnType":"StringFormat"}, + {"name":"GenericTypographicStringFormat","kind":"function","vis":"public","signature":"Function GenericTypographicStringFormat() As StringFormat","returnType":"StringFormat"}, + {"name":"GpStringFormat","kind":"function","vis":"public","signature":"Function GpStringFormat() As GpStringFormat","returnType":"GpStringFormat"}, + {"name":"LANG_NEUTRAL","kind":"const","vis":"private","signature":"Private Const LANG_NEUTRAL = &H00"}, + {"name":"StringFormat","kind":"function","vis":"public","signature":"Function StringFormat(ByVal flags As GpStringFormatFlags = 0, ByVal language As LANGID = lang_neutral) As StringFormat","returnType":"StringFormat"} + ] + }, + { + "name": "GpStringFormat", + "kind": "type", + "in": "GdipStringFormat", + "vis": "public", + "file": "GdiPlus/StringFormat.twin", + "signature": "Type GpStringFormat", + "fields": [ + {"name":"Native","vis":"public","signature":"Native As LongPtr"} + ], + "members": [ + {"name":"Clone","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function Clone Lib \"gdiplus\" Alias \"GdipCloneStringFormat\" (ByVal Me As GpStringFormat, newFormat As GpStringFormat) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"CreateInto","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function CreateInto Lib \"gdiplus\" Alias \"GdipCreateStringFormat\" (ByVal formatAttributes As Long, ByVal language As Integer, format As GpStringFormat) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"Delete","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function Delete Lib \"gdiplus\" Alias \"GdipDeleteStringFormat\" (ByVal Me As GpStringFormat) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetAlignment","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function GetAlignment Lib \"gdiplus\" Alias \"GdipGetStringFormatAlign\" (ByVal Me As GpStringFormat, ByVal align As GpStringAlignment) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetAlignmentImpl","kind":"function","vis":"private","signature":"Private Function GetAlignmentImpl(status As GpStatus) As GpStringAlignment","returnType":"GpStringAlignment"}, + {"name":"GetDigitSubstitution","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function GetDigitSubstitution Lib \"gdiplus\" Alias \"GdipGetStringFormatDigitSubstitution\" (ByVal Me As GpStringFormat, language%, substitute As GpStringDigitSubstitute) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetDigitSubstitutionImpl","kind":"function","vis":"private","signature":"Private Function GetDigitSubstitutionImpl(Optional language%, Optional substitute As GpStringDigitSubstitute) As GpStatus","returnType":"GpStatus"}, + {"name":"GetDigitSubstitutionImpl1","kind":"function","vis":"private","signature":"Private Function GetDigitSubstitutionImpl1(status As GpStatus, Optional language%) As GpStringDigitSubstitute","returnType":"GpStringDigitSubstitute"}, + {"name":"GetDigitSubstitutionLanguage","kind":"function","vis":"public","signature":"Function GetDigitSubstitutionLanguage(language%) As GpStatus","returnType":"GpStatus"}, + {"name":"GetDigitSubstitutionMethod","kind":"function","vis":"public","signature":"Function GetDigitSubstitutionMethod(subst As GpStringDigitSubstitute) As GpStatus","returnType":"GpStatus"}, + {"name":"GetFlags","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function GetFlags Lib \"gdiplus\" Alias \"GdipGetStringFormatFlags\" (ByVal Me As GpStringFormat, flags As Long) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetFlagsImpl","kind":"function","vis":"private","signature":"Private Function GetFlagsImpl(status As GpStatus) As GpStringFormatFlags","returnType":"GpStringFormatFlags"}, + {"name":"GetGenericDefault","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function GetGenericDefault Lib \"gdiplus\" Alias \"GdipStringFormatGetGenericDefault\" (sf As GpStringFormat) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetGenericTypographic","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function GetGenericTypographic Lib \"gdiplus\" Alias \"GdipStringFormatGetGenericTypographic\" (sf As GpStringFormat) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetHotkeyPrefix","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function GetHotkeyPrefix Lib \"gdiplus\" Alias \"GdipGetStringFormatHotkeyPrefix\" (ByVal Me As GpStringFormat, hotkeyPrefix As Long) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetHotkeyPrefixImpl","kind":"function","vis":"private","signature":"Private Function GetHotkeyPrefixImpl(status As GpStatus) As GpHotkeyPrefix","returnType":"GpHotkeyPrefix"}, + {"name":"GetLineAlignment","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function GetLineAlignment Lib \"gdiplus\" Alias \"GdipGetStringFormatLineAlign\" (ByVal Me As GpStringFormat, align As GpStringAlignment) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetLineAlignmentImpl","kind":"function","vis":"private","signature":"Private Function GetLineAlignmentImpl(status As GpStatus) As GpStringAlignment","returnType":"GpStringAlignment"}, + {"name":"GetMeasurableCharacterRangeCount","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function GetMeasurableCharacterRangeCount Lib \"gdiplus\" Alias \"GdipGetStringFormatMeasurableCharacterRangeCount\" (ByVal Me As GpStringFormat, count As Long) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetTabStopCount","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function GetTabStopCount Lib \"gdiplus\" Alias \"GdipGetStringFormatTabStopCount\" (ByVal Me As GpStringFormat, count As Long) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetTabStops","kind":"function","vis":"public","signature":"Function GetTabStops(ByVal firstTabOffset!, tabStops() As Single) As GpStatus","returnType":"GpStatus"}, + {"name":"GetTabStops2","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function GetTabStops2 Lib \"gdiplus\" Alias \"GdipGetStringFormatTabStops\" (ByVal Me As GpStringFormat, ByVal count As Long, firstTabOffset As Single, tabStops As Single) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetTrimming","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function GetTrimming Lib \"gdiplus\" Alias \"GdipGetStringFormatTrimming\" (ByVal Me As GpStringFormat, trimming As GpStringTrimming) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetTrimmingImpl","kind":"function","vis":"private","signature":"Private Function GetTrimmingImpl(status As GpStatus) As GpStringTrimming","returnType":"GpStringTrimming"}, + {"name":"IsAlignmentCenter","kind":"function","vis":"public","signature":"Function IsAlignmentCenter(value As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"IsAlignmentFar","kind":"function","vis":"public","signature":"Function IsAlignmentFar(value As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"IsAlignmentNear","kind":"function","vis":"public","signature":"Function IsAlignmentNear(value As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"IsBypassGDI","kind":"function","vis":"public","signature":"Function IsBypassGDI(value As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"IsDigitSubstitutionNational","kind":"function","vis":"public","signature":"Function IsDigitSubstitutionNational(value As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"IsDigitSubstitutionNone","kind":"function","vis":"public","signature":"Function IsDigitSubstitutionNone(value As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"IsDigitSubstitutionTraditional","kind":"function","vis":"public","signature":"Function IsDigitSubstitutionTraditional(value As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"IsDigitSubstitutionUser","kind":"function","vis":"public","signature":"Function IsDigitSubstitutionUser(value As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"IsDirectionRightToLeft","kind":"function","vis":"public","signature":"Function IsDirectionRightToLeft(value As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"IsDirectionVertical","kind":"function","vis":"public","signature":"Function IsDirectionVertical(value As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"IsDisplayFormatControl","kind":"function","vis":"public","signature":"Function IsDisplayFormatControl(value As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"IsHotkeyPrefixHide","kind":"function","vis":"public","signature":"Function IsHotkeyPrefixHide(value As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"IsHotkeyPrefixNone","kind":"function","vis":"public","signature":"Function IsHotkeyPrefixNone(value As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"IsHotkeyPrefixShow","kind":"function","vis":"public","signature":"Function IsHotkeyPrefixShow(value As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"IsLineAlignmentCenter","kind":"function","vis":"public","signature":"Function IsLineAlignmentCenter(value As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"IsLineAlignmentFar","kind":"function","vis":"public","signature":"Function IsLineAlignmentFar(value As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"IsLineAlignmentNear","kind":"function","vis":"public","signature":"Function IsLineAlignmentNear(value As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"IsLineLimit","kind":"function","vis":"public","signature":"Function IsLineLimit(value As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"IsMeasureTrailingSpaces","kind":"function","vis":"public","signature":"Function IsMeasureTrailingSpaces(value As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"IsNoClip","kind":"function","vis":"public","signature":"Function IsNoClip(value As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"IsNoFitBlackBox","kind":"function","vis":"public","signature":"Function IsNoFitBlackBox(value As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"IsNoFontFallback","kind":"function","vis":"public","signature":"Function IsNoFontFallback(value As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"IsNoWrap","kind":"function","vis":"public","signature":"Function IsNoWrap(value As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"IsTrimmingCharacter","kind":"function","vis":"public","signature":"Function IsTrimmingCharacter(value As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"IsTrimmingEllipsisCharacter","kind":"function","vis":"public","signature":"Function IsTrimmingEllipsisCharacter(value As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"IsTrimmingEllipsisPath","kind":"function","vis":"public","signature":"Function IsTrimmingEllipsisPath(value As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"IsTrimmingEllipsisWord","kind":"function","vis":"public","signature":"Function IsTrimmingEllipsisWord(value As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"IsTrimmingNone","kind":"function","vis":"public","signature":"Function IsTrimmingNone(value As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"IsTrimmingWord","kind":"function","vis":"public","signature":"Function IsTrimmingWord(value As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"SetAlignment","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function SetAlignment Lib \"gdiplus\" Alias \"GdipSetStringFormatAlign\" (ByVal Me As GpStringFormat, ByVal align As GpStringAlignment) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetAlignmentCenter","kind":"function","vis":"public","signature":"Function SetAlignmentCenter() As GpStatus","returnType":"GpStatus"}, + {"name":"SetAlignmentFar","kind":"function","vis":"public","signature":"Function SetAlignmentFar() As GpStatus","returnType":"GpStatus"}, + {"name":"SetAlignmentNear","kind":"function","vis":"public","signature":"Function SetAlignmentNear() As GpStatus","returnType":"GpStatus"}, + {"name":"SetBypassGDI","kind":"function","vis":"public","signature":"Function SetBypassGDI(ByVal value As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"SetDigitSubstitution","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function SetDigitSubstitution Lib \"gdiplus\" Alias \"GdipSetStringFormatDigitSubstitution\" (ByVal Me As GpStringFormat, ByVal language%, ByVal substitute As GpStringDigitSubstitute) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetDigitSubstitutionImpl","kind":"function","vis":"private","signature":"Private Function SetDigitSubstitutionImpl(Optional ByVal language%, Optional ByVal substitute As GpStringDigitSubstitute) As GpStatus","returnType":"GpStatus"}, + {"name":"SetDigitSubstitutionLanguage","kind":"function","vis":"public","signature":"Function SetDigitSubstitutionLanguage(ByVal language%) As GpStatus","returnType":"GpStatus"}, + {"name":"SetDigitSubstitutionMethod","kind":"function","vis":"public","signature":"Function SetDigitSubstitutionMethod(ByVal subst As GpStringDigitSubstitute) As GpStatus","returnType":"GpStatus"}, + {"name":"SetDigitSubstitutionNational","kind":"function","vis":"public","signature":"Function SetDigitSubstitutionNational() As GpStatus","returnType":"GpStatus"}, + {"name":"SetDigitSubstitutionNone","kind":"function","vis":"public","signature":"Function SetDigitSubstitutionNone() As GpStatus","returnType":"GpStatus"}, + {"name":"SetDigitSubstitutionTraditional","kind":"function","vis":"public","signature":"Function SetDigitSubstitutionTraditional() As GpStatus","returnType":"GpStatus"}, + {"name":"SetDigitSubstitutionUser","kind":"function","vis":"public","signature":"Function SetDigitSubstitutionUser() As GpStatus","returnType":"GpStatus"}, + {"name":"SetDirectionRightToLeft","kind":"function","vis":"public","signature":"Function SetDirectionRightToLeft(ByVal value As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"SetDirectionVertical","kind":"function","vis":"public","signature":"Function SetDirectionVertical(ByVal value As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"SetDisplayFormatControl","kind":"function","vis":"public","signature":"Function SetDisplayFormatControl(ByVal value As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"SetFlags","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function SetFlags Lib \"gdiplus\" Alias \"GdipSetStringFormatFlags\" (ByVal Me As GpStringFormat, ByVal flags As Long) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetFlagsImpl","kind":"function","vis":"private","signature":"Private Function SetFlagsImpl(ByVal value As Boolean, ByVal flag As GpStringFormatFlags) As GpStatus","returnType":"GpStatus"}, + {"name":"SetHotkeyPrefix","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function SetHotkeyPrefix Lib \"gdiplus\" Alias \"GdipSetStringFormatHotkeyPrefix\" (ByVal Me As GpStringFormat, ByVal hotkeyPrefix As Long) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetHotkeyPrefixHide","kind":"function","vis":"public","signature":"Function SetHotkeyPrefixHide() As GpStatus","returnType":"GpStatus"}, + {"name":"SetHotkeyPrefixNone","kind":"function","vis":"public","signature":"Function SetHotkeyPrefixNone() As GpStatus","returnType":"GpStatus"}, + {"name":"SetHotkeyPrefixShow","kind":"function","vis":"public","signature":"Function SetHotkeyPrefixShow() As GpStatus","returnType":"GpStatus"}, + {"name":"SetLineAlignment","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function SetLineAlignment Lib \"gdiplus\" Alias \"GdipSetStringFormatLineAlign\" (ByVal Me As GpStringFormat, ByVal align As GpStringAlignment) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetLineAlignmentCenter","kind":"function","vis":"public","signature":"Function SetLineAlignmentCenter() As GpStatus","returnType":"GpStatus"}, + {"name":"SetLineAlignmentFar","kind":"function","vis":"public","signature":"Function SetLineAlignmentFar() As GpStatus","returnType":"GpStatus"}, + {"name":"SetLineAlignmentNear","kind":"function","vis":"public","signature":"Function SetLineAlignmentNear() As GpStatus","returnType":"GpStatus"}, + {"name":"SetLineLimit","kind":"function","vis":"public","signature":"Function SetLineLimit(ByVal value As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"SetMeasurableCharacterRanges","kind":"function","vis":"public","signature":"Function SetMeasurableCharacterRanges(ranges() As CharacterRange) As GpStatus","returnType":"GpStatus"}, + {"name":"SetMeasurableCharacterRanges2","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function SetMeasurableCharacterRanges2 Lib \"gdiplus\" Alias \"GdipSetStringFormatMeasurableCharacterRanges\" (ByVal Me As GpStringFormat, ByVal rangeCount As Long, ranges As CharacterRange) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetMeasureTrailingSpaces","kind":"function","vis":"public","signature":"Function SetMeasureTrailingSpaces(ByVal value As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"SetNoClip","kind":"function","vis":"public","signature":"Function SetNoClip(ByVal value As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"SetNoFitBlackBox","kind":"function","vis":"public","signature":"Function SetNoFitBlackBox(ByVal value As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"SetNoFontFallback","kind":"function","vis":"public","signature":"Function SetNoFontFallback(ByVal value As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"SetNoWrap","kind":"function","vis":"public","signature":"Function SetNoWrap(ByVal value As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"SetTabStops","kind":"function","vis":"public","signature":"Function SetTabStops(ByVal firstTabOffset!, tabStops() As Single) As GpStatus","returnType":"GpStatus"}, + {"name":"SetTabStops2","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function SetTabStops2 Lib \"gdiplus\" Alias \"GdipSetStringFormatTabStops\" (ByVal Me As GpStringFormat, ByVal firstTabOffset As Single, ByVal count As Long, ByVal tabStops As LongPtr) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetTrimming","kind":"function","vis":"public","declare":true,"signature":"Public Declare PtrSafe Function SetTrimming Lib \"gdiplus\" Alias \"GdipSetStringFormatTrimming\" (ByVal Me As GpStringFormat, ByVal trimming As GpStringTrimming) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetTrimmingCharacter","kind":"function","vis":"public","signature":"Function SetTrimmingCharacter() As GpStatus","returnType":"GpStatus"}, + {"name":"SetTrimmingEllipsisCharacter","kind":"function","vis":"public","signature":"Function SetTrimmingEllipsisCharacter() As GpStatus","returnType":"GpStatus"}, + {"name":"SetTrimmingEllipsisPath","kind":"function","vis":"public","signature":"Function SetTrimmingEllipsisPath() As GpStatus","returnType":"GpStatus"}, + {"name":"SetTrimmingEllipsisWord","kind":"function","vis":"public","signature":"Function SetTrimmingEllipsisWord() As GpStatus","returnType":"GpStatus"}, + {"name":"SetTrimmingNone","kind":"function","vis":"public","signature":"Function SetTrimmingNone() As GpStatus","returnType":"GpStatus"}, + {"name":"SetTrimmingWord","kind":"function","vis":"public","signature":"Function SetTrimmingWord() As GpStatus","returnType":"GpStatus"} + ] + }, + { + "name": "GdipTexture", + "kind": "module", + "vis": "public", + "file": "GdiPlus/TextureBrush.twin", + "signature": "Module GdipTexture", + "members": [ + {"name":"GpTexture","kind":"function","vis":"public","signature":"Function GpTexture() As GpTexture","returnType":"GpTexture"}, + {"name":"GpTexture","kind":"function","vis":"public","signature":"Function GpTexture(nativeBrush As GpBrush) As GpTexture","returnType":"GpTexture"}, + {"name":"TextureBrush","kind":"function","vis":"public","signature":"Function TextureBrush(image As Image, ByVal wrapMode As GpWrapMode = WrapModeTile) As TextureBrush","returnType":"TextureBrush"}, + {"name":"TextureBrush","kind":"function","vis":"public","signature":"Function TextureBrush(image As Image, ByVal wrapmode As GpWrapMode, dstRect As GpRectF) As TextureBrush","returnType":"TextureBrush"}, + {"name":"TextureBrush","kind":"function","vis":"public","signature":"Function TextureBrush(image As Image, ByVal wrapmode As GpWrapMode, dstRect As GpRect) As TextureBrush","returnType":"TextureBrush"}, + {"name":"TextureBrush","kind":"function","vis":"public","signature":"Function TextureBrush(image As Image, dstRect As GpRectF, Optional imageAttributes As ImageAttributes) As TextureBrush","returnType":"TextureBrush"}, + {"name":"TextureBrush","kind":"function","vis":"public","signature":"Function TextureBrush(image As Image, dstRect As GpRect, Optional imageAttributes As ImageAttributes) As TextureBrush","returnType":"TextureBrush"}, + {"name":"TextureBrush","kind":"function","vis":"public","signature":"Function TextureBrush(image As Image, ByVal wrapmode As GpWrapMode, ByVal dstX!, ByVal dstY!, ByVal dstWidth!, ByVal dstHeight!) As TextureBrush","returnType":"TextureBrush"}, + {"name":"TextureBrushI","kind":"function","vis":"public","signature":"Function TextureBrushI(image As Image, ByVal wrapmode As GpWrapMode, ByVal dstX&, ByVal dstY&, ByVal dstWidth&, ByVal dstHeight&) As TextureBrush","returnType":"TextureBrush"} + ] + }, + { + "name": "GpTexture", + "kind": "type", + "in": "GdipTexture", + "vis": "public", + "file": "GdiPlus/TextureBrush.twin", + "signature": "Type GpTexture", + "fields": [ + {"name":"Native","vis":"public","signature":"Native As LongPtr"} + ], + "members": [ + {"name":"Clone","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function Clone Lib \"gdiplus\" Alias \"GdipCloneBrush\" (ByVal Me As GpTexture, cloneBrush As GpLineGradient) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"CreateIAInto","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function CreateIAInto Lib \"gdiplus\" Alias \"GdipCreateTextureIA\" (ByVal Image As GpImage, ByVal imageAttributes As GpImageAttributes, ByVal x!, ByVal y!, ByVal width!, ByVal height!, texture As GpTexture) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"CreateIAIntoI","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function CreateIAIntoI Lib \"gdiplus\" Alias \"GdipCreateTextureIAI\" (ByVal Image As GpImage, ByVal imageAttributes As GpImageAttributes, ByVal x&, ByVal y&, ByVal width&, ByVal height&, texture As GpTexture) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"CreateInto","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function CreateInto Lib \"gdiplus\" Alias \"GdipCreateTexture\" (ByVal Image As GpImage, ByVal wrapMode As GpWrapMode, texture As GpTexture) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"CreateInto","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function CreateInto Lib \"gdiplus\" Alias \"GdipCreateTexture2\" (ByVal Image As GpImage, ByVal wrapMode As GpWrapMode, ByVal x!, ByVal y!, ByVal width!, ByVal height!, texture As GpTexture) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"CreateIntoI","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function CreateIntoI Lib \"gdiplus\" Alias \"GdipCreateTexture2I\" (ByVal Image As GpImage, ByVal wrapMode As GpWrapMode, ByVal x&, ByVal y&, ByVal width&, ByVal height&, texture As GpTexture) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"Delete","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function Delete Lib \"gdiplus\" Alias \"GdipDeleteBrush\" (ByVal Me As GpTexture) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetImage","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetImage Lib \"gdiplus\" Alias \"GdipGetTextureImage\" (ByVal Me As GpTexture, Image As GpImage) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetTransform","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetTransform Lib \"gdiplus\" Alias \"GdipGetTextureTransform\" (ByVal Me As GpTexture, ByVal matrix As GpMatrix) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetType","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetType Lib \"gdiplus\" Alias \"GdipGetBrushType\" (ByVal Me As GpTexture, type As GpBrushType) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"GetWrapMode","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function GetWrapMode Lib \"gdiplus\" Alias \"GdipGetTextureWrapMode\" (ByVal Me As GpTexture, wrapMode As GpWrapMode) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"MultiplyTransform","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function MultiplyTransform Lib \"gdiplus\" Alias \"GdipMultiplyTextureTransform\" (ByVal Me As GpTexture, ByVal matrix As GpMatrix, ByVal order As GpMatrixOrder) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"ResetTransform","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function ResetTransform Lib \"gdiplus\" Alias \"GdipResetTextureTransform\" (ByVal Me As GpTexture) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"RotateTransform","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function RotateTransform Lib \"gdiplus\" Alias \"GdipRotateTextureTransform\" (ByVal Me As GpTexture, ByVal angle!, ByVal order As GpMatrixOrder) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"RotateTransformAt","kind":"function","vis":"public","signature":"Function RotateTransformAt(ByVal angle!, ByVal center As GpPointF, ByVal order As GpMatrixOrder = MatrixOrderPrepend) As GpStatus","returnType":"GpStatus"}, + {"name":"ScaleTransform","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function ScaleTransform Lib \"gdiplus\" Alias \"GdipScaleTextureTransform\" (ByVal Me As GpTexture, ByVal sx!, ByVal sy!, ByVal order As GpMatrixOrder) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetTransform","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetTransform Lib \"gdiplus\" Alias \"GdipSetTextureTransform\" (ByVal Me As GpTexture, ByVal matrix As GpMatrix) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"SetWrapMode","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function SetWrapMode Lib \"gdiplus\" Alias \"GdipSetTextureWrapMode\" (ByVal Me As GpTexture, ByVal wrapMode As GpWrapMode) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]}, + {"name":"ShearTransform","kind":"function","vis":"public","signature":"Function ShearTransform(ByVal shearX!, ByVal shearY!, ByVal order As GpMatrixOrder = MatrixOrderPrepend) As GpStatus","returnType":"GpStatus"}, + {"name":"TranslateTransform","kind":"function","vis":"public","declare":true,"signature":"Declare PtrSafe Function TranslateTransform Lib \"gdiplus\" Alias \"GdipTranslateTextureTransform\" (ByVal Me As GpTexture, ByVal Dx!, ByVal Dy!, ByVal order As GpMatrixOrder) As GpStatus","returnType":"GpStatus","attrs":[{"name":"UseGetLastError","args":"False"}]} + ] + }, + { + "name": "GdipVBGraphics", + "kind": "module", + "vis": "public", + "file": "GdiPlus/VBGraphics.twin", + "signature": "Module GdipVBGraphics", + "members": [ + {"name":"BufferedVBGraphicsFromHDC","kind":"function","vis":"public","signature":"Function BufferedVBGraphicsFromHDC(ByVal hdc As LongPtr, drawArea As GpRect) As VBGraphics","returnType":"VBGraphics"}, + {"name":"BufferedVBGraphicsFromHWND","kind":"function","vis":"public","signature":"Function BufferedVBGraphicsFromHWND(ByVal hwnd As LongPtr) As VBGraphics","returnType":"VBGraphics"}, + {"name":"VBGraphics","kind":"function","vis":"public","signature":"Function VBGraphics(image As Image) As VBGraphics","returnType":"VBGraphics"}, + {"name":"VBGraphics","kind":"function","vis":"public","signature":"Function VBGraphics(ByVal options As GraphicsCreationOptions, ByVal h1&, ByVal h2&) As VBGraphics","returnType":"VBGraphics"}, + {"name":"VBGraphicsFromHDC","kind":"function","vis":"public","signature":"Function VBGraphicsFromHDC(ByVal hdc As LongPtr, ByVal hdevice As LongPtr = 0) As VBGraphics","returnType":"VBGraphics"}, + {"name":"VBGraphicsFromHWND","kind":"function","vis":"public","signature":"Function VBGraphicsFromHWND(ByVal hwnd As LongPtr) As VBGraphics","returnType":"VBGraphics"}, + {"name":"VBGraphicsFromHWNDWithICM","kind":"function","vis":"public","signature":"Function VBGraphicsFromHWNDWithICM(ByVal hwnd As LongPtr) As VBGraphics","returnType":"VBGraphics"}, + {"name":"VBGraphicsFromImage","kind":"function","vis":"public","signature":"Function VBGraphicsFromImage(image As Image) As VBGraphics","returnType":"VBGraphics"} + ] + }, + { + "name": "Graphics", + "kind": "class", + "vis": "public", + "file": "GdiPlus/Graphics.twin", + "signature": "Class Graphics", + "inherits": ["GdiPlusBase"], + "implements": ["ITransformable","IDeviceContext"], + "attrs": [{"name":"COMCreatable","args":"False"}], + "members": [ + {"name":"AddMetafileComment","kind":"function","vis":"public","signature":"Function AddMetafileComment(data As Byte, ByVal sizeData&) As GpStatus","returnType":"GpStatus"}, + {"name":"BeginBufferedPaint","kind":"function","vis":"private","declare":true,"signature":"Private Declare PtrSafe Function BeginBufferedPaint Lib \"uxtheme\" (ByVal hdcTarget As LongPtr, prcTarget As GDIP_RECT, ByVal dwFormat As GDIP_BP_BUFFERFORMAT, pPaintParams As Any, phdc As LongPtr) As LongPtr","returnType":"LongPtr"}, + {"name":"BeginContainer","kind":"function","vis":"public","signature":"Function BeginContainer(dstRect As GpRectF, srcRect As GpRectF, ByVal unit As GpUnit) As GraphicsContainer","returnType":"GraphicsContainer"}, + {"name":"BeginContainer","kind":"function","vis":"public","signature":"Function BeginContainer(dstRect As GpRect, srcRect As GpRect, ByVal unit As GpUnit) As GraphicsContainer","returnType":"GraphicsContainer"}, + {"name":"BeginContainer","kind":"function","vis":"public","signature":"Function BeginContainer() As GraphicsContainer","returnType":"GraphicsContainer"}, + {"name":"BeginPaint","kind":"function","vis":"private","declare":true,"signature":"Private Declare PtrSafe Function BeginPaint Lib \"user32\" (ByVal hWnd As LongPtr, lpPaint As GDIP_PAINTSTRUCT) As LongPtr","returnType":"LongPtr"}, + {"name":"Class_Terminate","kind":"sub","vis":"public","signature":"Sub Class_Terminate()"}, + {"name":"Clear","kind":"function","vis":"public","signature":"Function Clear(ByVal rgb&) As GpStatus","returnType":"GpStatus"}, + {"name":"Clear","kind":"function","vis":"public","signature":"Function Clear(ByVal color As Color) As GpStatus","returnType":"GpStatus"}, + {"name":"Clip","kind":"property","vis":"public","signature":"Property Get Clip() As Region","returnType":"Region","accessor":"Get"}, + {"name":"ClipBounds","kind":"property","vis":"public","signature":"Property Get ClipBounds() As GpRectF","returnType":"GpRectF","accessor":"Get"}, + {"name":"ClipBoundsI","kind":"property","vis":"public","signature":"Property Get ClipBoundsI() As GpRect","returnType":"GpRect","accessor":"Get"}, + {"name":"CompositingMode","kind":"property","vis":"public","signature":"Property Let CompositingMode(ByVal compositingMode As GpCompositingMode)","accessor":"Let"}, + {"name":"CompositingMode","kind":"property","vis":"public","signature":"Property Get CompositingMode() As GpCompositingMode","returnType":"GpCompositingMode","accessor":"Get"}, + {"name":"CompositingQuality","kind":"property","vis":"public","signature":"Property Let CompositingQuality(ByVal compositingQuality As GpCompositingQuality)","accessor":"Let"}, + {"name":"CompositingQuality","kind":"property","vis":"public","signature":"Property Get CompositingQuality() As GpCompositingQuality","returnType":"GpCompositingQuality","accessor":"Get"}, + {"name":"DpiX","kind":"property","vis":"public","signature":"Property Get DpiX() As Single","returnType":"Single","accessor":"Get"}, + {"name":"DpiY","kind":"property","vis":"public","signature":"Property Get DpiY() As Single","returnType":"Single","accessor":"Get"}, + {"name":"DrawArc","kind":"function","vis":"public","signature":"Function DrawArc(pen As Pen, ByVal x!, ByVal y!, ByVal width!, ByVal height!, ByVal startAngle!, ByVal sweepAngle!) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawArc","kind":"function","vis":"public","signature":"Function DrawArc(pen As Pen, ByVal pt As GpPointF, ByVal size As GpSizeF, ByVal startAngle!, ByVal sweepAngle!) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawArc","kind":"function","vis":"public","signature":"Function DrawArc(pen As Pen, rect As GpRectF, ByVal startAngle!, ByVal sweepAngle!) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawArc","kind":"function","vis":"public","signature":"Function DrawArc(pen As Pen, ByVal pt As GpPoint, ByVal size As GpSize, ByVal startAngle!, ByVal sweepAngle!) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawArc","kind":"function","vis":"public","signature":"Function DrawArc(pen As Pen, rect As GpRect, ByVal startAngle!, ByVal sweepAngle!) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawArcI","kind":"function","vis":"public","signature":"Function DrawArcI(pen As Pen, ByVal x&, ByVal y&, ByVal width&, ByVal height&, ByVal startAngle!, ByVal sweepAngle!) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawBezier","kind":"function","vis":"public","signature":"Function DrawBezier(pen As Pen, ByVal x1!, ByVal y1!, ByVal x2!, ByVal y2!, ByVal x3!, ByVal y3!, ByVal x4!, ByVal y4!) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawBezier","kind":"function","vis":"public","signature":"Function DrawBezier(pen As Pen, ByVal pt1 As GpPointF, ByVal pt2 As GpPointF, ByVal pt3 As GpPointF, ByVal pt4 As GpPointF) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawBezier","kind":"function","vis":"public","signature":"Function DrawBezier(pen As Pen, ByVal pt1 As GpPoint, ByVal pt2 As GpPoint, ByVal pt3 As GpPoint, ByVal pt4 As GpPoint) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawBezierI","kind":"function","vis":"public","signature":"Function DrawBezierI(pen As Pen, ByVal x1&, ByVal y1&, ByVal x2&, ByVal y2&, ByVal x3&, ByVal y3&, ByVal x4&, ByVal y4&) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawBeziers","kind":"function","vis":"public","signature":"Function DrawBeziers(pen As Pen, points() As GpPointF) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawBeziers","kind":"function","vis":"public","signature":"Function DrawBeziers(pen As Pen, points() As GpPoint) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawCachedBitmap","kind":"function","vis":"public","signature":"Function DrawCachedBitmap(cb As CachedBitmap, ByVal offset As GpPoint) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawCachedBitmapI","kind":"function","vis":"public","signature":"Function DrawCachedBitmapI(cb As CachedBitmap, ByVal x&, ByVal y&) As GpStatus","returnType":"GpStatus","description":"Draw a cached bitmap on this graphics destination offset by\nx, y. Note this will fail with WrongState if the CachedBitmap\nnative format differs from this Graphics."}, + {"name":"DrawClosedCurve","kind":"function","vis":"public","signature":"Function DrawClosedCurve(pen As Pen, points() As GpPointF) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawClosedCurve","kind":"function","vis":"public","signature":"Function DrawClosedCurve(pen As Pen, points() As GpPointF, ByVal tension!) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawClosedCurve","kind":"function","vis":"public","signature":"Function DrawClosedCurve(pen As Pen, points() As GpPoint) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawClosedCurve","kind":"function","vis":"public","signature":"Function DrawClosedCurve(pen As Pen, points() As GpPoint, ByVal tension!) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawCurve","kind":"function","vis":"public","signature":"Function DrawCurve(pen As Pen, points() As GpPointF) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawCurve","kind":"function","vis":"public","signature":"Function DrawCurve(pen As Pen, points() As GpPointF, ByVal tension!) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawCurve","kind":"function","vis":"public","signature":"Function DrawCurve(pen As Pen, points() As GpPointF, ByVal offset&, ByVal numberOfSegments&, ByVal tension! = 0.5) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawCurve","kind":"function","vis":"public","signature":"Function DrawCurve(pen As Pen, points() As GpPoint) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawCurve","kind":"function","vis":"public","signature":"Function DrawCurve(pen As Pen, points() As GpPoint, ByVal tension!) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawCurve","kind":"function","vis":"public","signature":"Function DrawCurve(pen As Pen, points() As GpPoint, ByVal offset&, ByVal numberOfSegments&, ByVal tension! = 0.5) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawDriverString","kind":"function","vis":"public","signature":"Function DrawDriverString(ByVal str$, font As Font, brush As Brush, ByVal position As GpPointF, ByVal flags As GpDriverStringOptions, matrix As Matrix) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawDriverString","kind":"function","vis":"public","signature":"Function DrawDriverString(ByVal str$, font As Font, brush As Brush, positions() As GpPointF, ByVal flags As GpDriverStringOptions, matrix As Matrix) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawDriverString","kind":"function","vis":"public","signature":"Function DrawDriverString(glyphs() As Integer, font As Font, brush As Brush, ByVal position As GpPointF, ByVal flags As GpDriverStringOptions, matrix As Matrix) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawDriverString","kind":"function","vis":"public","signature":"Function DrawDriverString(glyphs() As Integer, font As Font, brush As Brush, positions() As GpPointF, ByVal flags As GpDriverStringOptions, matrix As Matrix) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawEllipse","kind":"function","vis":"public","signature":"Function DrawEllipse(pen As Pen, rect As GpRectF) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawEllipse","kind":"function","vis":"public","signature":"Function DrawEllipse(pen As Pen, ByVal pt As GpPointF, ByVal size As GpSizeF) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawEllipse","kind":"function","vis":"public","signature":"Function DrawEllipse(pen As Pen, ByVal x!, ByVal y!, ByVal width!, ByVal height!) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawEllipse","kind":"function","vis":"public","signature":"Function DrawEllipse(pen As Pen, rect As GpRect) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawEllipse","kind":"function","vis":"public","signature":"Function DrawEllipse(pen As Pen, ByVal pt As GpPoint, ByVal size As GpSize) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawEllipseI","kind":"function","vis":"public","signature":"Function DrawEllipseI(pen As Pen, ByVal x&, ByVal y&, ByVal width&, ByVal height&) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawImage","kind":"function","vis":"public","signature":"Function DrawImage(image As Image, ByVal point As GpPointF) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawImage","kind":"function","vis":"public","signature":"Function DrawImage(image As Image, ByVal x!, ByVal y!) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawImage","kind":"function","vis":"public","signature":"Function DrawImage(image As Image, rect As GpRectF) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawImage","kind":"function","vis":"public","signature":"Function DrawImage(image As Image, ByVal x!, ByVal y!, ByVal width!, ByVal height!) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawImage","kind":"function","vis":"public","signature":"Function DrawImage(image As Image, ByVal point As GpPoint) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawImage","kind":"function","vis":"public","signature":"Function DrawImage(image As Image, rect As GpRect) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawImage","kind":"function","vis":"public","signature":"Function DrawImage(image As Image, destPoints() As GpPointF) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawImage","kind":"function","vis":"public","signature":"Function DrawImage(image As Image, destPoints() As GpPoint) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawImage","kind":"function","vis":"public","signature":"Function DrawImage(image As Image, ByVal x!, ByVal y!, ByVal srcx!, ByVal srcy!, ByVal srcwidth!, ByVal srcheight!, ByVal srcUnit As GpUnit) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawImage","kind":"function","vis":"public","signature":"Function DrawImage(image As Image, destRect As GpRectF, srcRect As GpRectF, ByVal srcUnit As GpUnit, Optional imageAttributes As ImageAttributes = Nothing, Optional ByVal callback As LongPtr, Optional ByVal callbackData As LongPtr) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawImage","kind":"function","vis":"public","signature":"Function DrawImage(image As Image, destPoints() As GpPointF, srcx!, ByVal srcy!, ByVal srcwidth!, ByVal srcheight!, ByVal srcUnit As GpUnit, Optional imageAttributes As ImageAttributes, Optional ByVal callback As LongPtr = vbNullPtr, Optional ByVal callbackData As LongPtr = vbNullPtr) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawImage","kind":"function","vis":"public","signature":"Function DrawImage(image As Image, destRect As GpRect, srcRect As GpRect, ByVal srcUnit As GpUnit, Optional imageAttributes As ImageAttributes, Optional ByVal callback As LongPtr = vbNullPtr, Optional ByVal callbackData As LongPtr = vbNullPtr) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawImage","kind":"function","vis":"public","signature":"Function DrawImage(image As Image, destPoints() As GpPoint, ByVal srcx&, ByVal srcy&, ByVal srcwidth&, ByVal srcheight&, ByVal srcUnit As GpUnit, Optional imageAttributes As ImageAttributes = Nothing, Optional ByVal callback As LongPtr, Optional ByVal callbackData As LongPtr) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawImage","kind":"function","vis":"public","signature":"Function DrawImage(image As Image, sourceRect As GpRectF, xForm As Matrix, effect As Effect, imageAttributes As ImageAttributes, ByVal srcUnit As GpUnit) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawImageI","kind":"function","vis":"public","signature":"Function DrawImageI(image As Image, ByVal x&, ByVal y&) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawImageI","kind":"function","vis":"public","signature":"Function DrawImageI(image As Image, ByVal x&, ByVal y&, ByVal width&, ByVal height&) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawImageI","kind":"function","vis":"public","signature":"Function DrawImageI(image As Image, ByVal x&, ByVal y&, ByVal srcx&, ByVal srcy&, ByVal srcwidth&, ByVal srcheight&, ByVal srcUnit As GpUnit) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawLine","kind":"function","vis":"public","signature":"Function DrawLine(pen As Pen, ByVal x1!, ByVal y1!, ByVal x2!, ByVal y2!) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawLine","kind":"function","vis":"public","signature":"Function DrawLine(pen As Pen, ByVal pt1 As GpPointF, ByVal pt2 As GpPointF) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawLine","kind":"function","vis":"public","signature":"Function DrawLine(pen As Pen, rect As GpRectF) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawLine","kind":"function","vis":"public","signature":"Function DrawLine(pen As Pen, ByVal pt1 As GpPoint, ByVal pt2 As GpPoint) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawLine","kind":"function","vis":"public","signature":"Function DrawLine(pen As Pen, rect As GpRect) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawLineI","kind":"function","vis":"public","signature":"Function DrawLineI(pen As Pen, ByVal x1&, ByVal y1&, ByVal x2&, ByVal y2&) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawLines","kind":"function","vis":"public","signature":"Function DrawLines(pen As Pen, points As GpPointF()) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawLines","kind":"function","vis":"public","signature":"Function DrawLines(pen As Pen, points As GpPoint()) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawPath","kind":"function","vis":"public","signature":"Function DrawPath(Optional pen As Pen = Nothing, Optional path As GraphicsPath = Nothing) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawPie","kind":"function","vis":"public","signature":"Function DrawPie(pen As Pen, rect As GpRectF, ByVal startAngle!, ByVal sweepAngle!) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawPie","kind":"function","vis":"public","signature":"Function DrawPie(pen As Pen, ByVal pt As GpPointF, ByVal size As GpSizeF, ByVal startAngle!, ByVal sweepAngle!) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawPie","kind":"function","vis":"public","signature":"Function DrawPie(pen As Pen, ByVal x!, ByVal y!, ByVal width!, ByVal height!, ByVal startAngle!, ByVal sweepAngle!) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawPie","kind":"function","vis":"public","signature":"Function DrawPie(pen As Pen, rect As GpRect, ByVal startAngle!, ByVal sweepAngle!) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawPie","kind":"function","vis":"public","signature":"Function DrawPie(pen As Pen, ByVal pt As GpPoint, ByVal size As GpSize, ByVal startAngle!, ByVal sweepAngle!) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawPieI","kind":"function","vis":"public","signature":"Function DrawPieI(pen As Pen, ByVal x&, ByVal y&, ByVal width&, ByVal height&, ByVal startAngle!, ByVal sweepAngle!) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawPolygon","kind":"function","vis":"public","signature":"Function DrawPolygon(pen As Pen, points() As GpPointF) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawPolygon","kind":"function","vis":"public","signature":"Function DrawPolygon(pen As Pen, points() As GpPoint) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawRectangle","kind":"function","vis":"public","signature":"Function DrawRectangle(pen As Pen, rect As GpRectF) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawRectangle","kind":"function","vis":"public","signature":"Function DrawRectangle(pen As Pen, ByVal pt As GpPointF, ByVal size As GpSizeF) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawRectangle","kind":"function","vis":"public","signature":"Function DrawRectangle(pen As Pen, ByVal x!, ByVal y!, ByVal width!, ByVal height!) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawRectangle","kind":"function","vis":"public","signature":"Function DrawRectangle(pen As Pen, rect As GpRect) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawRectangle","kind":"function","vis":"public","signature":"Function DrawRectangle(pen As Pen, ByVal pt As GpPoint, ByVal size As GpSize) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawRectangleI","kind":"function","vis":"public","signature":"Function DrawRectangleI(pen As Pen, ByVal x&, ByVal y&, ByVal width&, ByVal height&) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawRectangles","kind":"function","vis":"public","signature":"Function DrawRectangles(pen As Pen, rects() As GpRectF) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawRectangles","kind":"function","vis":"public","signature":"Function DrawRectangles(pen As Pen, rects() As GpRect) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawString","kind":"function","vis":"public","signature":"Function DrawString(ByVal str$, font As Font, layoutRect As GpRectF, stringFormat As StringFormat, brush As Brush) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawString","kind":"function","vis":"public","signature":"Function DrawString(ByVal str$, font As Font, ByVal origin As GpPointF, brush As Brush) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawString","kind":"function","vis":"public","signature":"Function DrawString(ByVal str$, font As Font, ByVal x!, ByVal y!, brush As Brush) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawString","kind":"function","vis":"public","signature":"Function DrawString(ByVal str$, font As Font, ByVal origin As GpPointF, format As StringFormat, brush As Brush) As GpStatus","returnType":"GpStatus"}, + {"name":"DrawString","kind":"function","vis":"public","signature":"Function DrawString(ByVal str$, font As Font, ByVal x!, ByVal y!, format As StringFormat, brush As Brush) As GpStatus","returnType":"GpStatus"}, + {"name":"EndBufferedPaint","kind":"function","vis":"private","declare":true,"signature":"Private Declare PtrSafe Function EndBufferedPaint Lib \"uxtheme\" (ByVal hBufferedPaint As LongPtr, ByVal fUpdateTarget As Long) As Long","returnType":"Long"}, + {"name":"EndContainer","kind":"function","vis":"public","signature":"Function EndContainer(state As GraphicsContainer) As GpStatus","returnType":"GpStatus"}, + {"name":"EndPaint","kind":"function","vis":"private","declare":true,"signature":"Private Declare PtrSafe Function EndPaint Lib \"user32\" (ByVal hWnd As LongPtr, lpPaint As GDIP_PAINTSTRUCT) As GDIP_BOOL","returnType":"GDIP_BOOL"}, + {"name":"EnumerateMetaFile","kind":"function","vis":"public","signature":"Function EnumerateMetaFile(metafile As Metafile, destPoint As GpPointF, ByVal callback As EnumerateMetafileProc, Optional ByVal callBackData As LongPtr, Optional imageAttributes As ImageAttributes) As GpStatus","returnType":"GpStatus"}, + {"name":"EnumerateMetaFile","kind":"function","vis":"public","signature":"Function EnumerateMetaFile(metafile As Metafile, destPoint As GpPoint, ByVal callback As EnumerateMetafileProc, Optional ByVal callBackData As LongPtr, Optional imageAttributes As ImageAttributes) As GpStatus","returnType":"GpStatus"}, + {"name":"EnumerateMetaFile","kind":"function","vis":"public","signature":"Function EnumerateMetaFile(metafile As Metafile, destRect As GpRectF, ByVal callback As EnumerateMetafileProc, Optional ByVal callBackData As LongPtr, Optional imageAttributes As ImageAttributes) As GpStatus","returnType":"GpStatus"}, + {"name":"EnumerateMetaFile","kind":"function","vis":"public","signature":"Function EnumerateMetaFile(metafile As Metafile, destRect As GpRect, ByVal callback As EnumerateMetafileProc, Optional ByVal callBackData As LongPtr, Optional imageAttributes As ImageAttributes) As GpStatus","returnType":"GpStatus"}, + {"name":"EnumerateMetaFile","kind":"function","vis":"public","signature":"Function EnumerateMetaFile(metafile As Metafile, destPoints() As GpPointF, ByVal callback As EnumerateMetafileProc, Optional ByVal callBackData As LongPtr, Optional imageAttributes As ImageAttributes) As GpStatus","returnType":"GpStatus"}, + {"name":"EnumerateMetaFile","kind":"function","vis":"public","signature":"Function EnumerateMetaFile(metafile As Metafile, destPoints() As GpPoint, ByVal callback As EnumerateMetafileProc, Optional ByVal callBackData As LongPtr, Optional imageAttributes As ImageAttributes) As GpStatus","returnType":"GpStatus"}, + {"name":"EnumerateMetaFile","kind":"function","vis":"public","signature":"Function EnumerateMetaFile(metafile As Metafile, destPoint As GpPointF, srcRect As GpRectF, ByVal srcUnit As GpUnit, ByVal callback As EnumerateMetafileProc, Optional ByVal callBackData As LongPtr, Optional imageAttributes As ImageAttributes) As GpStatus","returnType":"GpStatus"}, + {"name":"EnumerateMetaFile","kind":"function","vis":"public","signature":"Function EnumerateMetaFile(metafile As Metafile, destPoint As GpPoint, srcRect As GpRect, ByVal srcUnit As GpUnit, ByVal callback As EnumerateMetafileProc, Optional ByVal callBackData As LongPtr, Optional imageAttributes As ImageAttributes) As GpStatus","returnType":"GpStatus"}, + {"name":"EnumerateMetaFile","kind":"function","vis":"public","signature":"Function EnumerateMetaFile(metafile As Metafile, destRect As GpRectF, srcRect As GpRectF, ByVal srcUnit As GpUnit, ByVal callback As EnumerateMetafileProc, Optional ByVal callBackData As LongPtr, Optional imageAttributes As ImageAttributes) As GpStatus","returnType":"GpStatus"}, + {"name":"EnumerateMetaFile","kind":"function","vis":"public","signature":"Function EnumerateMetaFile(metafile As Metafile, destRect As GpRect, srcRect As GpRect, ByVal srcUnit As GpUnit, ByVal callback As EnumerateMetafileProc, Optional ByVal callBackData As LongPtr, Optional imageAttributes As ImageAttributes) As GpStatus","returnType":"GpStatus"}, + {"name":"EnumerateMetaFile","kind":"function","vis":"public","signature":"Function EnumerateMetaFile(metafile As Metafile, destPoints() As GpPointF, srcRect As GpRectF, ByVal srcUnit As GpUnit, ByVal callback As EnumerateMetafileProc, Optional ByVal callBackData As LongPtr, Optional imageAttributes As ImageAttributes) As GpStatus","returnType":"GpStatus"}, + {"name":"EnumerateMetaFile","kind":"function","vis":"public","signature":"Function EnumerateMetaFile(metafile As Metafile, destPoints() As GpPoint, srcRect As GpRect, ByVal srcUnit As GpUnit, ByVal callback As EnumerateMetafileProc, Optional ByVal callBackData As LongPtr, Optional imageAttributes As ImageAttributes) As GpStatus","returnType":"GpStatus"}, + {"name":"ExcludeClip","kind":"function","vis":"public","signature":"Function ExcludeClip(rect As GpRectF) As GpStatus","returnType":"GpStatus"}, + {"name":"ExcludeClip","kind":"function","vis":"public","signature":"Function ExcludeClip(rect As GpRect) As GpStatus","returnType":"GpStatus"}, + {"name":"ExcludeClip","kind":"function","vis":"public","signature":"Function ExcludeClip(region As Region) As GpStatus","returnType":"GpStatus"}, + {"name":"FillClosedCurve","kind":"function","vis":"public","signature":"Function FillClosedCurve(brush As Brush, points() As GpPointF) As GpStatus","returnType":"GpStatus"}, + {"name":"FillClosedCurve","kind":"function","vis":"public","signature":"Function FillClosedCurve(brush As Brush, points() As GpPointF, ByVal fillMode As GpFillmode, ByVal tension! = 0.5) As GpStatus","returnType":"GpStatus"}, + {"name":"FillClosedCurve","kind":"function","vis":"public","signature":"Function FillClosedCurve(brush As Brush, points() As GpPoint) As GpStatus","returnType":"GpStatus"}, + {"name":"FillClosedCurve","kind":"function","vis":"public","signature":"Function FillClosedCurve(brush As Brush, points() As GpPoint, ByVal fillMode As GpFillmode, ByVal tension! = 0.5) As GpStatus","returnType":"GpStatus"}, + {"name":"FillEllipse","kind":"function","vis":"public","signature":"Function FillEllipse(brush As Brush, rect As GpRectF) As GpStatus","returnType":"GpStatus"}, + {"name":"FillEllipse","kind":"function","vis":"public","signature":"Function FillEllipse(brush As Brush, ByVal pt As GpPointF, ByVal size As GpSizeF) As GpStatus","returnType":"GpStatus"}, + {"name":"FillEllipse","kind":"function","vis":"public","signature":"Function FillEllipse(brush As Brush, ByVal x!, ByVal y!, ByVal width!, ByVal height!) As GpStatus","returnType":"GpStatus"}, + {"name":"FillEllipse","kind":"function","vis":"public","signature":"Function FillEllipse(brush As Brush, rect As GpRect) As GpStatus","returnType":"GpStatus"}, + {"name":"FillEllipse","kind":"function","vis":"public","signature":"Function FillEllipse(brush As Brush, ByVal pt As GpPoint, ByVal size As GpSize) As GpStatus","returnType":"GpStatus"}, + {"name":"FillEllipseI","kind":"function","vis":"public","signature":"Function FillEllipseI(brush As Brush, ByVal x&, ByVal y&, ByVal width&, ByVal height&) As GpStatus","returnType":"GpStatus"}, + {"name":"FillPath","kind":"function","vis":"public","signature":"Function FillPath(brush As Brush, path As GraphicsPath) As GpStatus","returnType":"GpStatus"}, + {"name":"FillPie","kind":"function","vis":"public","signature":"Function FillPie(brush As Brush, rect As GpRectF, ByVal startAngle!, ByVal sweepAngle!) As GpStatus","returnType":"GpStatus"}, + {"name":"FillPie","kind":"function","vis":"public","signature":"Function FillPie(brush As Brush, ByVal pt As GpPointF, ByVal size As GpSizeF, ByVal startAngle!, ByVal sweepAngle!) As GpStatus","returnType":"GpStatus"}, + {"name":"FillPie","kind":"function","vis":"public","signature":"Function FillPie(brush As Brush, ByVal x!, ByVal y!, ByVal width!, ByVal height!, ByVal startAngle!, ByVal sweepAngle!) As GpStatus","returnType":"GpStatus"}, + {"name":"FillPie","kind":"function","vis":"public","signature":"Function FillPie(brush As Brush, rect As GpRect, ByVal startAngle!, ByVal sweepAngle!) As GpStatus","returnType":"GpStatus"}, + {"name":"FillPie","kind":"function","vis":"public","signature":"Function FillPie(brush As Brush, ByVal pt As GpPoint, ByVal size As GpSize, ByVal startAngle!, ByVal sweepAngle!) As GpStatus","returnType":"GpStatus"}, + {"name":"FillPieI","kind":"function","vis":"public","signature":"Function FillPieI(brush As Brush, ByVal x&, ByVal y&, ByVal width&, ByVal height&, ByVal startAngle!, ByVal sweepAngle!) As GpStatus","returnType":"GpStatus"}, + {"name":"FillPolygon","kind":"function","vis":"public","signature":"Function FillPolygon(brush As Brush, points() As GpPointF, ByVal fillMode As GpFillmode = FillModeAlternate) As GpStatus","returnType":"GpStatus"}, + {"name":"FillPolygon","kind":"function","vis":"public","signature":"Function FillPolygon(brush As Brush, points() As GpPoint, ByVal fillMode As GpFillmode = FillModeAlternate) As GpStatus","returnType":"GpStatus"}, + {"name":"FillRectangle","kind":"function","vis":"public","signature":"Function FillRectangle(brush As Brush, rect As GpRectF) As GpStatus","returnType":"GpStatus"}, + {"name":"FillRectangle","kind":"function","vis":"public","signature":"Function FillRectangle(brush As Brush, ByVal pt As GpPointF, ByVal size As GpSizeF) As GpStatus","returnType":"GpStatus"}, + {"name":"FillRectangle","kind":"function","vis":"public","signature":"Function FillRectangle(brush As Brush, ByVal x!, ByVal y!, ByVal width!, ByVal height!) As GpStatus","returnType":"GpStatus"}, + {"name":"FillRectangle","kind":"function","vis":"public","signature":"Function FillRectangle(brush As Brush, rect As GpRect) As GpStatus","returnType":"GpStatus"}, + {"name":"FillRectangle","kind":"function","vis":"public","signature":"Function FillRectangle(brush As Brush, ByVal pt As GpPoint, ByVal size As GpSize) As GpStatus","returnType":"GpStatus"}, + {"name":"FillRectangleI","kind":"function","vis":"public","signature":"Function FillRectangleI(brush As Brush, ByVal x&, ByVal y&, ByVal width&, ByVal height&) As GpStatus","returnType":"GpStatus"}, + {"name":"FillRectangles","kind":"function","vis":"public","signature":"Function FillRectangles(brush As Brush, rects() As GpRectF) As GpStatus","returnType":"GpStatus"}, + {"name":"FillRectangles","kind":"function","vis":"public","signature":"Function FillRectangles(brush As Brush, rects() As GpRect) As GpStatus","returnType":"GpStatus"}, + {"name":"FillRegion","kind":"function","vis":"public","signature":"Function FillRegion(brush As Brush, region As Region) As GpStatus","returnType":"GpStatus"}, + {"name":"Flush","kind":"function","vis":"public","signature":"Function Flush(ByVal intention As GpFlushIntention) As GpStatus","returnType":"GpStatus"}, + {"name":"GetHDC","kind":"function","vis":"public","signature":"Function GetHDC() As LongPtr Implements IDeviceContext.GetHdc","returnType":"LongPtr"}, + {"name":"GetHalftonePalette","kind":"function","vis":"public","signature":"Function GetHalftonePalette() As LongPtr","returnType":"LongPtr"}, + {"name":"GetLastError","kind":"function","vis":"private","declare":true,"signature":"Private Declare PtrSafe Function GetLastError Lib \"kernel32\" () As Long","returnType":"Long"}, + {"name":"GetNearestColor","kind":"function","vis":"public","signature":"Function GetNearestColor(color As Color) As GpStatus","returnType":"GpStatus"}, + {"name":"GetNearestColorTo","kind":"function","vis":"public","signature":"Function GetNearestColorTo(ByVal color As Color) As Color","returnType":"Color"}, + {"name":"GetRenderingOrigin","kind":"function","vis":"public","signature":"Function GetRenderingOrigin(x&, y&) As GpStatus","returnType":"GpStatus"}, + {"name":"GetTransform","kind":"function","vis":"public","signature":"Function GetTransform(matrix As Matrix) As GpStatus Implements ITransformable.GetTransform","returnType":"GpStatus"}, + {"name":"InterpolationMode","kind":"property","vis":"public","signature":"Property Get InterpolationMode() As GpInterpolationMode","returnType":"GpInterpolationMode","accessor":"Get"}, + {"name":"InterpolationMode","kind":"property","vis":"public","signature":"Property Let InterpolationMode(ByVal interpolationMode As GpInterpolationMode)","accessor":"Let"}, + {"name":"IntersectClip","kind":"function","vis":"public","signature":"Function IntersectClip(rect As GpRectF) As GpStatus","returnType":"GpStatus"}, + {"name":"IntersectClip","kind":"function","vis":"public","signature":"Function IntersectClip(rect As GpRect) As GpStatus","returnType":"GpStatus"}, + {"name":"IntersectClip","kind":"function","vis":"public","signature":"Function IntersectClip(region As Region) As GpStatus","returnType":"GpStatus"}, + {"name":"IsClipEmpty","kind":"property","vis":"public","signature":"Property Get IsClipEmpty() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"IsVisible","kind":"function","vis":"public","signature":"Function IsVisible(ByVal point As GpPoint) As Boolean","returnType":"Boolean"}, + {"name":"IsVisible","kind":"function","vis":"public","signature":"Function IsVisible(rect As GpRect) As Boolean","returnType":"Boolean"}, + {"name":"IsVisible","kind":"function","vis":"public","signature":"Function IsVisible(ByVal x!, ByVal y!) As Boolean","returnType":"Boolean"}, + {"name":"IsVisible","kind":"function","vis":"public","signature":"Function IsVisible(point As GpPointF) As Boolean","returnType":"Boolean"}, + {"name":"IsVisible","kind":"function","vis":"public","signature":"Function IsVisible(ByVal x!, ByVal y!, ByVal width!, ByVal height!) As Boolean","returnType":"Boolean"}, + {"name":"IsVisible","kind":"function","vis":"public","signature":"Function IsVisible(rect As GpRectF) As Boolean","returnType":"Boolean"}, + {"name":"IsVisibleClipEmpty","kind":"property","vis":"public","signature":"Property Get IsVisibleClipEmpty() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"IsVisibleI","kind":"function","vis":"public","signature":"Function IsVisibleI(ByVal x&, ByVal y&) As Boolean","returnType":"Boolean"}, + {"name":"IsVisibleI","kind":"function","vis":"public","signature":"Function IsVisibleI(ByVal x&, ByVal y&, ByVal width&, ByVal height&) As Boolean","returnType":"Boolean"}, + {"name":"MeasureCharacterRanges","kind":"function","vis":"public","signature":"Function MeasureCharacterRanges(ByVal str$, font As Font, layoutRect As GpRectF, stringFormat As StringFormat) As Region()","returnType":"Region()"}, + {"name":"MeasureCharacterRanges","kind":"function","vis":"public","signature":"Function MeasureCharacterRanges(ByVal str$, font As Font, layoutRect As GpRectF, stringFormat As StringFormat, regions() As Region) As GpStatus","returnType":"GpStatus"}, + {"name":"MeasureDriverString","kind":"function","vis":"public","signature":"Function MeasureDriverString(ByVal str$, font As Font, ByVal position As GpPointF, ByVal flags As GpDriverStringOptions, matrix As Matrix, boundingBox As GpRectF) As GpStatus","returnType":"GpStatus"}, + {"name":"MeasureDriverString","kind":"function","vis":"public","signature":"Function MeasureDriverString(ByVal str$, font As Font, positions() As GpPointF, ByVal flags As GpDriverStringOptions, matrix As Matrix, boundingBox As GpRectF) As GpStatus","returnType":"GpStatus"}, + {"name":"MeasureDriverString","kind":"function","vis":"public","signature":"Function MeasureDriverString(glyphs() As Integer, font As Font, ByVal position As GpPointF, ByVal flags As GpDriverStringOptions, matrix As Matrix, boundingBox As GpRectF) As GpStatus","returnType":"GpStatus"}, + {"name":"MeasureDriverString","kind":"function","vis":"public","signature":"Function MeasureDriverString(glyphs() As Integer, font As Font, positions() As GpPointF, ByVal flags As GpDriverStringOptions, matrix As Matrix, boundingBox As GpRectF) As GpStatus","returnType":"GpStatus"}, + {"name":"MeasureString","kind":"function","vis":"public","signature":"Function MeasureString(ByVal str$, font As Font, layoutRect As GpRectF, stringFormat As StringFormat, boundingBox As GpRectF, Optional codepointsFitted&, Optional linesFilled&) As GpStatus","returnType":"GpStatus"}, + {"name":"MeasureString","kind":"function","vis":"public","signature":"Function MeasureString(ByVal str$, font As Font, ByVal layoutSize As GpSizeF, format As StringFormat, ByRef size As GpSizeF, Optional codepointsFitted&, Optional linesFilled&) As GpStatus","returnType":"GpStatus"}, + {"name":"MeasureString","kind":"function","vis":"public","signature":"Function MeasureString(ByVal str$, font As Font, ByVal origin As GpPointF, stringFormat As StringFormat, boundingBox As GpRectF) As GpStatus","returnType":"GpStatus"}, + {"name":"MeasureString","kind":"function","vis":"public","signature":"Function MeasureString(ByVal str$, font As Font, layoutRect As GpRectF, boundingBox As GpRectF) As GpStatus","returnType":"GpStatus"}, + {"name":"MeasureString","kind":"function","vis":"public","signature":"Function MeasureString(ByVal str$, font As Font, ByVal origin As GpPointF, boundingBox As GpRectF) As GpStatus","returnType":"GpStatus"}, + {"name":"MultiplyTransform","kind":"function","vis":"public","signature":"Function MultiplyTransform(matrix As Matrix, ByVal order As GpMatrixOrder = MatrixOrderPrepend) As GpStatus Implements ITransformable.MultiplyTransform","returnType":"GpStatus"}, + {"name":"Native","kind":"property","vis":"protected","signature":"Protected Property Get Native() As GpGraphics","returnType":"GpGraphics","accessor":"Get"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(ByVal options As GraphicsCreationOptions, ByVal h1 As LongPtr, ByVal h2 As LongPtr = 0)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(image As Image)"}, + {"name":"New","kind":"sub","vis":"protected","signature":"Protected Sub New(ByVal nativeGr As GpGraphics, ByVal status As GpStatus = ok)"}, + {"name":"PageScale","kind":"property","vis":"public","signature":"Property Let PageScale(ByVal scale!)","accessor":"Let"}, + {"name":"PageScale","kind":"property","vis":"public","signature":"Property Get PageScale() As Single","returnType":"Single","accessor":"Get"}, + {"name":"PageUnit","kind":"property","vis":"public","signature":"Property Let PageUnit(ByVal unit As GpUnit)","accessor":"Let"}, + {"name":"PageUnit","kind":"property","vis":"public","signature":"Property Get PageUnit() As GpUnit","returnType":"GpUnit","accessor":"Get"}, + {"name":"PixelOffsetMode","kind":"property","vis":"public","signature":"Property Get PixelOffsetMode() As GpPixelOffsetMode","returnType":"GpPixelOffsetMode","accessor":"Get"}, + {"name":"PixelOffsetMode","kind":"property","vis":"public","signature":"Property Let PixelOffsetMode(ByVal pixelOffsetMode As GpPixelOffsetMode)","accessor":"Let"}, + {"name":"ReleaseHDC","kind":"sub","vis":"public","signature":"Sub ReleaseHDC(ByVal hdc As LongPtr)"}, + {"name":"ReleaseHDC","kind":"sub","vis":"public","signature":"Sub ReleaseHDC() Implements IDeviceContext.ReleaseHdc"}, + {"name":"RenderingOrigin","kind":"property","vis":"public","signature":"Property Let RenderingOrigin(ByVal origin As GpPoint)","accessor":"Let"}, + {"name":"RenderingOrigin","kind":"property","vis":"public","signature":"Property Get RenderingOrigin() As GpPoint","returnType":"GpPoint","accessor":"Get"}, + {"name":"ResetClip","kind":"function","vis":"public","signature":"Function ResetClip() As GpStatus","returnType":"GpStatus"}, + {"name":"ResetTransform","kind":"function","vis":"public","signature":"Function ResetTransform() As GpStatus Implements ITransformable.ResetTransform","returnType":"GpStatus"}, + {"name":"Restore","kind":"function","vis":"public","signature":"Function Restore(ByVal gstate As GraphicsState) As GpStatus","returnType":"GpStatus"}, + {"name":"RotateTransform","kind":"function","vis":"public","signature":"Function RotateTransform(ByVal angle!, ByVal order As GpMatrixOrder = MatrixOrderPrepend) As GpStatus Implements ITransformable.RotateTransform","returnType":"GpStatus"}, + {"name":"RotateTransformAt","kind":"function","vis":"public","signature":"Function RotateTransformAt(ByVal angle!, ByVal center As GpPointF, ByVal order As GpMatrixOrder = MatrixOrderPrepend) As GpStatus Implements ITransformable.RotateTransformAt","returnType":"GpStatus"}, + {"name":"Save","kind":"function","vis":"public","signature":"Function Save() As GraphicsState","returnType":"GraphicsState"}, + {"name":"ScaleTransform","kind":"function","vis":"public","signature":"Function ScaleTransform(ByVal sx!, ByVal sy!, ByVal order As GpMatrixOrder = MatrixOrderPrepend) As GpStatus Implements ITransformable.ScaleTransform","returnType":"GpStatus"}, + {"name":"SetAbort","kind":"function","vis":"public","signature":"Function SetAbort(ByVal pIAbort As LongPtr) As GpStatus","returnType":"GpStatus","description":"⛔NOTE: Not impemented in GdiPlus 1.0 and 1.1."}, + {"name":"SetClip","kind":"function","vis":"public","signature":"Function SetClip(g As Graphics, ByVal combineMode As GpCombineMode = CombineModeReplace) As GpStatus","returnType":"GpStatus"}, + {"name":"SetClip","kind":"function","vis":"public","signature":"Function SetClip(rect As GpRectF, ByVal combineMode As GpCombineMode = CombineModeReplace) As GpStatus","returnType":"GpStatus"}, + {"name":"SetClip","kind":"function","vis":"public","signature":"Function SetClip(rect As GpRect, ByVal combineMode As GpCombineMode = CombineModeReplace) As GpStatus","returnType":"GpStatus"}, + {"name":"SetClip","kind":"function","vis":"public","signature":"Function SetClip(path As GraphicsPath, ByVal combineMode As GpCombineMode = CombineModeReplace) As GpStatus","returnType":"GpStatus"}, + {"name":"SetClip","kind":"function","vis":"public","signature":"Function SetClip(region As Region, ByVal combineMode As GpCombineMode = CombineModeReplace) As GpStatus","returnType":"GpStatus"}, + {"name":"SetClip","kind":"function","vis":"public","signature":"Function SetClip(ByVal hRgn As LongPtr, ByVal combineMode As GpCombineMode = CombineModeReplace) As GpStatus","returnType":"GpStatus"}, + {"name":"SetRenderingOrigin","kind":"function","vis":"public","signature":"Function SetRenderingOrigin(ByVal x&, ByVal y&) As GpStatus","returnType":"GpStatus"}, + {"name":"ShearTransform","kind":"function","vis":"public","signature":"Function ShearTransform(ByVal shearX!, ByVal shearY!, ByVal order As GpMatrixOrder = MatrixOrderPrepend) As GpStatus Implements ITransformable.ShearTransform","returnType":"GpStatus"}, + {"name":"SmoothingMode","kind":"property","vis":"public","signature":"Property Get SmoothingMode() As GpSmoothingMode","returnType":"GpSmoothingMode","accessor":"Get"}, + {"name":"SmoothingMode","kind":"property","vis":"public","signature":"Property Let SmoothingMode(ByVal smoothingMode As GpSmoothingMode)","accessor":"Let"}, + {"name":"TextContrast","kind":"property","vis":"public","signature":"Property Let TextContrast(ByVal contrast As UINT)","accessor":"Let"}, + {"name":"TextContrast","kind":"property","vis":"public","signature":"Property Get TextContrast() As UINT","returnType":"UINT","accessor":"Get"}, + {"name":"TextRenderingHint","kind":"property","vis":"public","signature":"Property Let TextRenderingHint(ByVal newMode As GpTextRenderingHint)","accessor":"Let"}, + {"name":"TextRenderingHint","kind":"property","vis":"public","signature":"Property Get TextRenderingHint() As GpTextRenderingHint","returnType":"GpTextRenderingHint","accessor":"Get"}, + {"name":"Transform","kind":"property","vis":"public","signature":"Property Let Transform(matrix As Matrix) Implements ITransformable.Transform","accessor":"Let"}, + {"name":"Transform","kind":"property","vis":"public","signature":"Property Get Transform() As Matrix Implements ITransformable.Transform","returnType":"Matrix","accessor":"Get"}, + {"name":"TransformPoints","kind":"function","vis":"public","signature":"Function TransformPoints(ByVal destSpace As GpCoordinateSpace, ByVal srcSpace As GpCoordinateSpace, pts As GpPointF()) As GpStatus","returnType":"GpStatus"}, + {"name":"TransformPoints","kind":"function","vis":"public","signature":"Function TransformPoints(ByVal destSpace As GpCoordinateSpace, ByVal srcSpace As GpCoordinateSpace, pts As GpPoint()) As GpStatus","returnType":"GpStatus"}, + {"name":"TranslateClip","kind":"function","vis":"public","signature":"Function TranslateClip(ByVal delta As GpPointF) As GpStatus","returnType":"GpStatus"}, + {"name":"TranslateClip","kind":"function","vis":"public","signature":"Function TranslateClip(ByVal dx!, ByVal dy!) As GpStatus","returnType":"GpStatus"}, + {"name":"TranslateClip","kind":"function","vis":"public","signature":"Function TranslateClip(ByVal delta As GpPoint) As GpStatus","returnType":"GpStatus"}, + {"name":"TranslateClipI","kind":"function","vis":"public","signature":"Function TranslateClipI(ByVal dx&, ByVal dy&) As GpStatus","returnType":"GpStatus"}, + {"name":"TranslateTransform","kind":"function","vis":"public","signature":"Function TranslateTransform(ByVal dx!, ByVal dy!, ByVal order As GpMatrixOrder = MatrixOrderPrepend) As GpStatus Implements ITransformable.TranslateTransform","returnType":"GpStatus"}, + {"name":"TranslateTransform","kind":"function","vis":"public","signature":"Function TranslateTransform(ByVal offset As GpPointF, ByVal order As GpMatrixOrder = MatrixOrderPrepend) As GpStatus Implements ITransformable.TranslateTransform","returnType":"GpStatus"}, + {"name":"VisibleClipBounds","kind":"property","vis":"public","signature":"Property Get VisibleClipBounds() As GpRectF","returnType":"GpRectF","accessor":"Get"}, + {"name":"VisibleClipBoundsI","kind":"property","vis":"public","signature":"Property Get VisibleClipBoundsI() As GpRect","returnType":"GpRect","accessor":"Get"}, + {"name":"gr","kind":"field","vis":"protected","signature":"Protected gr As GpGraphics"}, + {"name":"hBP","kind":"field","vis":"private","signature":"Dim hBP As LongPtr"}, + {"name":"hWND","kind":"field","vis":"private","signature":"Dim hWND As LongPtr"}, + {"name":"nativeHDC","kind":"field","vis":"private","signature":"Dim nativeHDC As LongPtr"}, + {"name":"ps","kind":"field","vis":"private","signature":"Dim ps As GDIP_PAINTSTRUCT"}, + {"name":"resource","kind":"field","vis":"private","signature":"Dim resource As Object"} + ] + }, + { + "name": "GDIP_BP_BUFFERFORMAT", + "kind": "enum", + "in": "Graphics", + "vis": "private", + "public": false, + "file": "GdiPlus/Graphics.twin", + "signature": "Private Enum GDIP_BP_BUFFERFORMAT", + "values": [ + {"name":"BPBF_COMPATIBLEBITMAP"}, + {"name":"BPBF_DIB"}, + {"name":"BPBF_TOPDOWNDIB"}, + {"name":"BPBF_TOPDOWNMONODIB"} + ] + }, + { + "name": "GDIP_PAINTSTRUCT", + "kind": "type", + "in": "Graphics", + "vis": "private", + "public": false, + "file": "GdiPlus/Graphics.twin", + "signature": "Private Type GDIP_PAINTSTRUCT", + "fields": [ + {"name":"hdc","vis":"public","signature":"hdc As LongPtr"}, + {"name":"fErase","vis":"public","signature":"fErase As Long"}, + {"name":"rcPaint","vis":"public","signature":"rcPaint As GDIP_RECT"}, + {"name":"fRestore","vis":"public","signature":"fRestore As Long"}, + {"name":"fIncUpdate","vis":"public","signature":"fIncUpdate As Long"}, + {"name":"rgbReserved","vis":"public","signature":"rgbReserved(0 To 31) As Byte"} + ], + "members": [] + }, + { + "name": "GraphicsPath", + "kind": "class", + "vis": "public", + "file": "GdiPlus/GraphicsPath.twin", + "signature": "Class GraphicsPath", + "inherits": ["GdiPlusBase"], + "attrs": [{"name":"COMCreatable","args":"False"}], + "members": [ + {"name":"AddArc","kind":"function","vis":"public","signature":"Function AddArc(rect As GpRectF, ByVal startAngle!, ByVal sweepAngle!) As GpStatus","returnType":"GpStatus"}, + {"name":"AddArc","kind":"function","vis":"public","signature":"Function AddArc(ByVal x!, ByVal y!, ByVal width!, ByVal height!, ByVal startAngle!, ByVal sweepAngle!) As GpStatus","returnType":"GpStatus"}, + {"name":"AddArc","kind":"function","vis":"public","signature":"Function AddArc(rect As GpRect, ByVal startAngle!, ByVal sweepAngle!) As GpStatus","returnType":"GpStatus"}, + {"name":"AddArcI","kind":"function","vis":"public","signature":"Function AddArcI(ByVal x&, ByVal y&, ByVal width&, ByVal height&, ByVal startAngle!, ByVal sweepAngle!) As GpStatus","returnType":"GpStatus"}, + {"name":"AddBezier","kind":"function","vis":"public","signature":"Function AddBezier(ByVal pt1 As GpPointF, ByVal pt2 As GpPointF, ByVal pt3 As GpPointF, ByVal pt4 As GpPointF) As GpStatus","returnType":"GpStatus"}, + {"name":"AddBezier","kind":"function","vis":"public","signature":"Function AddBezier(ByVal x1!, ByVal y1!, ByVal x2!, ByVal y2!, ByVal x3!, ByVal y3!, ByVal x4!, ByVal y4!) As GpStatus","returnType":"GpStatus"}, + {"name":"AddBezier","kind":"function","vis":"public","signature":"Function AddBezier(ByVal pt1 As GpPoint, ByVal pt2 As GpPoint, ByVal pt3 As GpPoint, ByVal pt4 As GpPoint) As GpStatus","returnType":"GpStatus"}, + {"name":"AddBezierI","kind":"function","vis":"public","signature":"Function AddBezierI(ByVal x1&, ByVal y1&, ByVal x2&, ByVal y2&, ByVal x3&, ByVal y3&, ByVal x4&, ByVal y4&) As GpStatus","returnType":"GpStatus"}, + {"name":"AddBeziers","kind":"function","vis":"public","signature":"Function AddBeziers(points() As GpPointF) As GpStatus","returnType":"GpStatus"}, + {"name":"AddBeziers","kind":"function","vis":"public","signature":"Function AddBeziers(points() As GpPoint) As GpStatus","returnType":"GpStatus"}, + {"name":"AddClosedCurve","kind":"function","vis":"public","signature":"Function AddClosedCurve(points() As GpPointF) As GpStatus","returnType":"GpStatus"}, + {"name":"AddClosedCurve","kind":"function","vis":"public","signature":"Function AddClosedCurve(points() As GpPointF, ByVal tension!) As GpStatus","returnType":"GpStatus"}, + {"name":"AddClosedCurve","kind":"function","vis":"public","signature":"Function AddClosedCurve(points() As GpPoint) As GpStatus","returnType":"GpStatus"}, + {"name":"AddClosedCurve","kind":"function","vis":"public","signature":"Function AddClosedCurve(points() As GpPoint, ByVal tension!) As GpStatus","returnType":"GpStatus"}, + {"name":"AddCurve","kind":"function","vis":"public","signature":"Function AddCurve(points() As GpPointF) As GpStatus","returnType":"GpStatus"}, + {"name":"AddCurve","kind":"function","vis":"public","signature":"Function AddCurve(points() As GpPointF, ByVal tension!) As GpStatus","returnType":"GpStatus"}, + {"name":"AddCurve","kind":"function","vis":"public","signature":"Function AddCurve(points() As GpPointF, ByVal offset&, ByVal numberOfSegments&, ByVal tension!) As GpStatus","returnType":"GpStatus"}, + {"name":"AddCurve","kind":"function","vis":"public","signature":"Function AddCurve(points() As GpPoint) As GpStatus","returnType":"GpStatus"}, + {"name":"AddCurve","kind":"function","vis":"public","signature":"Function AddCurve(points() As GpPoint, ByVal tension!) As GpStatus","returnType":"GpStatus"}, + {"name":"AddCurve","kind":"function","vis":"public","signature":"Function AddCurve(points() As GpPoint, ByVal offset&, ByVal numberOfSegments&, ByVal tension!) As GpStatus","returnType":"GpStatus"}, + {"name":"AddEllipse","kind":"function","vis":"public","signature":"Function AddEllipse(rect As GpRectF) As GpStatus","returnType":"GpStatus"}, + {"name":"AddEllipse","kind":"function","vis":"public","signature":"Function AddEllipse(ByVal x!, ByVal y!, ByVal width!, ByVal height!) As GpStatus","returnType":"GpStatus"}, + {"name":"AddEllipse","kind":"function","vis":"public","signature":"Function AddEllipse(rect As GpRect) As GpStatus","returnType":"GpStatus"}, + {"name":"AddEllipseI","kind":"function","vis":"public","signature":"Function AddEllipseI(ByVal x&, ByVal y&, ByVal width&, ByVal height&) As GpStatus","returnType":"GpStatus"}, + {"name":"AddLine","kind":"function","vis":"public","signature":"Function AddLine(ByVal pt1 As GpPointF, ByVal pt2 As GpPointF) As GpStatus","returnType":"GpStatus"}, + {"name":"AddLine","kind":"function","vis":"public","signature":"Function AddLine(ByVal x1!, ByVal y1!, ByVal x2!, ByVal y2!) As GpStatus","returnType":"GpStatus"}, + {"name":"AddLine","kind":"function","vis":"public","signature":"Function AddLine(pt1 As GpPoint, pt2 As GpPoint) As GpStatus","returnType":"GpStatus"}, + {"name":"AddLineI","kind":"function","vis":"public","signature":"Function AddLineI(ByVal x1&, ByVal y1&, ByVal x2&, ByVal y2&) As GpStatus","returnType":"GpStatus"}, + {"name":"AddLines","kind":"function","vis":"public","signature":"Function AddLines(points() As GpPointF) As GpStatus","returnType":"GpStatus"}, + {"name":"AddLines","kind":"function","vis":"public","signature":"Function AddLines(points() As GpPoint) As GpStatus","returnType":"GpStatus"}, + {"name":"AddPath","kind":"function","vis":"public","signature":"Function AddPath(addingPath As GraphicsPath, ByVal connect As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"AddPie","kind":"function","vis":"public","signature":"Function AddPie(rect As GpRectF, ByVal startAngle!, ByVal sweepAngle!) As GpStatus","returnType":"GpStatus"}, + {"name":"AddPie","kind":"function","vis":"public","signature":"Function AddPie(ByVal x!, ByVal y!, ByVal width!, ByVal height!, ByVal startAngle!, ByVal sweepAngle!) As GpStatus","returnType":"GpStatus"}, + {"name":"AddPie","kind":"function","vis":"public","signature":"Function AddPie(rect As GpRect, ByVal startAngle!, ByVal sweepAngle!) As GpStatus","returnType":"GpStatus"}, + {"name":"AddPieI","kind":"function","vis":"public","signature":"Function AddPieI(ByVal x&, ByVal y&, ByVal width&, ByVal height&, ByVal startAngle!, ByVal sweepAngle!) As GpStatus","returnType":"GpStatus"}, + {"name":"AddPolygon","kind":"function","vis":"public","signature":"Function AddPolygon(points() As GpPointF) As GpStatus","returnType":"GpStatus"}, + {"name":"AddPolygon","kind":"function","vis":"public","signature":"Function AddPolygon(points() As GpPoint) As GpStatus","returnType":"GpStatus"}, + {"name":"AddRectangle","kind":"function","vis":"public","signature":"Function AddRectangle(rect As GpRectF) As GpStatus","returnType":"GpStatus"}, + {"name":"AddRectangle","kind":"function","vis":"public","signature":"Function AddRectangle(ByVal x!, ByVal y!, ByVal width!, ByVal height!) As GpStatus","returnType":"GpStatus"}, + {"name":"AddRectangle","kind":"function","vis":"public","signature":"Function AddRectangle(rect As GpRect) As GpStatus","returnType":"GpStatus"}, + {"name":"AddRectangleI","kind":"function","vis":"public","signature":"Function AddRectangleI(ByVal x&, ByVal y&, ByVal width&, ByVal height&) As GpStatus","returnType":"GpStatus"}, + {"name":"AddRectangles","kind":"function","vis":"public","signature":"Function AddRectangles(rects() As GpRectF) As GpStatus","returnType":"GpStatus"}, + {"name":"AddRectangles","kind":"function","vis":"public","signature":"Function AddRectangles(rects() As GpRect) As GpStatus","returnType":"GpStatus"}, + {"name":"AddString","kind":"function","vis":"public","signature":"Function AddString(ByVal string$, family As FontFamily, ByVal style&, ByVal emSize!, origin As GpPointF, format As StringFormat) As GpStatus","returnType":"GpStatus"}, + {"name":"AddString","kind":"function","vis":"public","signature":"Function AddString(ByVal string$, family As FontFamily, ByVal style&, ByVal emSize!, layoutRect As GpRectF, format As StringFormat) As GpStatus","returnType":"GpStatus"}, + {"name":"AddString","kind":"function","vis":"public","signature":"Function AddString(ByVal string$, family As FontFamily, ByVal style&, ByVal emSize!, origin As GpPoint, format As StringFormat) As GpStatus","returnType":"GpStatus"}, + {"name":"AddString","kind":"function","vis":"public","signature":"Function AddString(ByVal string$, family As FontFamily, ByVal style&, ByVal emSize!, layoutRect As GpRect, format As StringFormat) As GpStatus","returnType":"GpStatus"}, + {"name":"Class_Terminate","kind":"sub","vis":"public","signature":"Sub Class_Terminate()"}, + {"name":"ClearMarkers","kind":"function","vis":"public","signature":"Function ClearMarkers() As GpStatus","returnType":"GpStatus"}, + {"name":"Clone","kind":"function","vis":"public","signature":"Function Clone() As GraphicsPath","returnType":"GraphicsPath"}, + {"name":"CloseAllFigures","kind":"function","vis":"public","signature":"Function CloseAllFigures() As GpStatus","returnType":"GpStatus"}, + {"name":"CloseFigure","kind":"function","vis":"public","signature":"Function CloseFigure() As GpStatus","returnType":"GpStatus"}, + {"name":"FillMode","kind":"property","vis":"public","signature":"Property Get FillMode() As GpFillmode","returnType":"GpFillmode","accessor":"Get"}, + {"name":"FillMode","kind":"property","vis":"public","signature":"Property Let FillMode(ByVal fillMode As GpFillmode)","accessor":"Let"}, + {"name":"Flatten","kind":"function","vis":"public","signature":"Function Flatten(Optional matrix As Matrix, Optional flatness! = FlatnessDefault) As GpStatus","returnType":"GpStatus"}, + {"name":"GetPoints","kind":"function","vis":"public","signature":"Function GetPoints(points() As GpPointF) As GpStatus","returnType":"GpStatus"}, + {"name":"GetPoints","kind":"function","vis":"public","signature":"Function GetPoints(points() As GpPoint) As GpStatus","returnType":"GpStatus"}, + {"name":"GetTypes","kind":"function","vis":"public","signature":"Function GetTypes(types() As PathPointType) As GpStatus","returnType":"GpStatus"}, + {"name":"GetWorldBounds","kind":"function","vis":"public","signature":"Function GetWorldBounds(bounds As GpRectF, matrix As Matrix, pen As Pen) As GpStatus","returnType":"GpStatus"}, + {"name":"GetWorldBounds","kind":"function","vis":"public","signature":"Function GetWorldBounds(bounds As GpRect, matrix As Matrix, pen As Pen) As GpStatus","returnType":"GpStatus"}, + {"name":"IsOutlineVisible","kind":"function","vis":"public","signature":"Function IsOutlineVisible(ByVal point As GpPointF, pen As Pen, Optional g As Graphics) As Boolean","returnType":"Boolean"}, + {"name":"IsOutlineVisible","kind":"function","vis":"public","signature":"Function IsOutlineVisible(ByVal x!, ByVal y!, pen As Pen, Optional g As Graphics) As Boolean","returnType":"Boolean"}, + {"name":"IsOutlineVisible","kind":"function","vis":"public","signature":"Function IsOutlineVisible(ByVal point As GpPoint, pen As Pen, Optional g As Graphics) As Boolean","returnType":"Boolean"}, + {"name":"IsOutlineVisibleI","kind":"function","vis":"public","signature":"Function IsOutlineVisibleI(ByVal x&, ByVal y&, pen As Pen, Optional g As Graphics) As Boolean","returnType":"Boolean"}, + {"name":"IsVisible","kind":"function","vis":"public","signature":"Function IsVisible(ByVal point As GpPointF, Optional g As Graphics) As Boolean","returnType":"Boolean"}, + {"name":"IsVisible","kind":"function","vis":"public","signature":"Function IsVisible(ByVal x!, ByVal y!, Optional g As Graphics) As Boolean","returnType":"Boolean"}, + {"name":"IsVisible","kind":"function","vis":"public","signature":"Function IsVisible(ByVal point As GpPoint, Optional g As Graphics) As Boolean","returnType":"Boolean"}, + {"name":"IsVisibleI","kind":"function","vis":"public","signature":"Function IsVisibleI(ByVal x&, ByVal y&, Optional g As Graphics) As Boolean","returnType":"Boolean"}, + {"name":"LastPoint","kind":"property","vis":"public","signature":"Property Get LastPoint() As GpPointF","returnType":"GpPointF","accessor":"Get"}, + {"name":"Native","kind":"property","vis":"protected","signature":"Protected Property Get Native() As GpPath","returnType":"GpPath","accessor":"Get"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(ByVal fillMode As GpFillmode = FillModeAlternate)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(pathData As PathData, ByVal fillMode As GpFillmode = FillModeAlternate)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(typedPoints() As TypedPoint, ByVal fillMode As GpFillmode = FillModeAlternate)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(points() As GpPointF, types() As PathPointType, ByVal fillMode As GpFillmode = FillModeAlternate)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(points() As GpPoint, types() As PathPointType, ByVal fillMode As GpFillmode = FillModeAlternate)"}, + {"name":"New","kind":"sub","vis":"protected","signature":"Protected Sub New(_path As GraphicsPath)","attrs":[{"name":"IgnoreWarnings","args":"TB0025"}]}, + {"name":"New","kind":"sub","vis":"public","signature":"Public Sub New(ByVal nativePath As GpPath)"}, + {"name":"Outline","kind":"function","vis":"public","signature":"Function Outline(Optional matrix As Matrix, Optional flatness! = FlatnessDefault) As GpStatus","returnType":"GpStatus"}, + {"name":"PathData","kind":"property","vis":"public","signature":"Property Get PathData() As PathData","returnType":"PathData","accessor":"Get"}, + {"name":"PointCount","kind":"property","vis":"public","signature":"Property Get PointCount() As Long","returnType":"Long","accessor":"Get"}, + {"name":"Reset","kind":"function","vis":"public","signature":"Function Reset() As GpStatus","returnType":"GpStatus","description":"Reset the path object to empty (and fill mode to FillModeAlternate)"}, + {"name":"Reverse","kind":"function","vis":"public","signature":"Function Reverse() As GpStatus","returnType":"GpStatus"}, + {"name":"SetMarker","kind":"function","vis":"public","signature":"Function SetMarker() As GpStatus","returnType":"GpStatus"}, + {"name":"SetNativePath","kind":"sub","vis":"protected","signature":"Protected Sub SetNativePath(ByVal nativePath As GpPath)"}, + {"name":"StartFigure","kind":"function","vis":"public","signature":"Function StartFigure() As GpStatus","returnType":"GpStatus"}, + {"name":"Transform","kind":"function","vis":"public","signature":"Function Transform(matrix As Matrix) As GpStatus","returnType":"GpStatus"}, + {"name":"Warp","kind":"function","vis":"public","signature":"Function Warp(destPoints() As GpPointF, srcRect As GpRectF, Optional matrix As Matrix, Optional warpMode As GpWarpMode = WarpModePerspective, Optional flatness! = FlatnessDefault) As GpStatus","returnType":"GpStatus"}, + {"name":"Warp","kind":"function","vis":"public","signature":"Function Warp(destPoints() As GpPointF, ByVal srcX!, ByVal srcY!, ByVal srcWidth!, ByVal srcHeight!, Optional matrix As Matrix, Optional warpMode As GpWarpMode = WarpModePerspective, Optional flatness! = FlatnessDefault) As GpStatus","returnType":"GpStatus"}, + {"name":"Widen","kind":"function","vis":"public","signature":"Function Widen(pen As Pen, Optional matrix As Matrix, Optional flatness! = FlatnessDefault) As GpStatus","returnType":"GpStatus"}, + {"name":"pa","kind":"field","vis":"protected","signature":"Protected pa As GpPath"} + ] + }, + { + "name": "HatchBrush", + "kind": "class", + "vis": "public", + "file": "GdiPlus/HatchBrush.twin", + "signature": "Class HatchBrush", + "inherits": ["GdiPlusBase"], + "implements": ["IBrush"], + "attrs": [{"name":"COMCreatable","args":"False"}], + "description": "Hatch Brush Object", + "members": [ + {"name":"BackgroundColor","kind":"property","vis":"public","signature":"Property Get BackgroundColor() As Color","returnType":"Color","accessor":"Get"}, + {"name":"Class_Terminate","kind":"sub","vis":"private","signature":"Private Sub Class_Terminate()"}, + {"name":"Clone","kind":"function","vis":"public","signature":"Public Function Clone() As HatchBrush","returnType":"HatchBrush"}, + {"name":"CloneBrush","kind":"function","vis":"public","signature":"Function CloneBrush() As IBrush Implements IBrush.CloneBrush","returnType":"IBrush"}, + {"name":"ForegroundColor","kind":"property","vis":"public","signature":"Property Get ForegroundColor() As Color","returnType":"Color","accessor":"Get"}, + {"name":"HatchStyle","kind":"property","vis":"public","signature":"Property Get HatchStyle() As GpHatchStyle","returnType":"GpHatchStyle","accessor":"Get"}, + {"name":"Native","kind":"property","vis":"protected","signature":"Protected Property Get Native() As GpHatch","returnType":"GpHatch","accessor":"Get"}, + {"name":"NativeBrush","kind":"property","vis":"public","signature":"Property Get NativeBrush() As GpBrush Implements IBrush.NativeBrush","returnType":"GpBrush","accessor":"Get"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(ByVal hatchStyle As GpHatchStyle, ByVal foreRgb&, ByVal backRgb&)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(ByVal hatchStyle As GpHatchStyle, ByVal foreColor As Color, ByVal backColor As Color)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(ByVal nativeBrush As GpHatch, ByVal status As GpStatus = ok)"}, + {"name":"Type","kind":"property","vis":"public","signature":"Property Get Type() As GpBrushType Implements IBrush.Type","returnType":"GpBrushType","accessor":"Get"}, + {"name":"br","kind":"field","vis":"protected","signature":"Protected br As GpHatch"} + ] + }, + { + "name": "HueSaturationLightness", + "kind": "class", + "vis": "public", + "file": "GdiPlus/Effects.twin", + "signature": "Class HueSaturationLightness", + "inherits": ["Effect"], + "attrs": [{"name":"COMCreatable","args":"False"}], + "members": [ + {"name":"New","kind":"sub","vis":"public","signature":"Sub New()"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(params As HueSaturationLightnessParams)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(ByVal hue&, ByVal saturation&, ByVal brightness&)"}, + {"name":"Parameters","kind":"property","vis":"public","signature":"Property Let Parameters(parameters As HueSaturationLightnessParams)","accessor":"Let"}, + {"name":"Parameters","kind":"property","vis":"public","signature":"Property Get Parameters(Optional size As UINT) As HueSaturationLightnessParams","returnType":"HueSaturationLightnessParams","accessor":"Get"} + ] + }, + { + "name": "IBrush", + "kind": "interface", + "vis": "public", + "file": "GdiPlus/Brush.twin", + "signature": "Interface IBrush Extends IUnknown", + "extends": "IUnknown", + "members": [ + {"name":"CloneBrush","kind":"function","vis":"public","signature":"Function CloneBrush() As IBrush","returnType":"IBrush"}, + {"name":"NativeBrush","kind":"property","vis":"public","signature":"Property Get NativeBrush() As GpBrush","returnType":"GpBrush","accessor":"Get"}, + {"name":"Type","kind":"property","vis":"public","signature":"Property Get Type() As GpBrushType","returnType":"GpBrushType","accessor":"Get"} + ] + }, + { + "name": "IDeviceContext", + "kind": "interface", + "vis": "public", + "file": "GdiPlus/Types.twin", + "signature": "Interface IDeviceContext Extends IUnknown", + "extends": "IUnknown", + "members": [ + {"name":"GetHdc","kind":"function","vis":"public","signature":"Function GetHdc() As LongPtr","returnType":"LongPtr"}, + {"name":"ReleaseHdc","kind":"sub","vis":"public","signature":"Sub ReleaseHdc()"} + ] + }, + { + "name": "IImageBytes", + "kind": "interface", + "vis": "public", + "file": "GdiPlus/Imaging.twin", + "signature": "Interface IImageBytes Extends IUnknown", + "extends": "IUnknown", + "attrs": [{"name":"InterfaceId","args":"\"025D1823-6C7D-447B-BBDB-A3CBC3DFA2FC\""}], + "members": [ + {"name":"CountBytes","kind":"sub","vis":"public","signature":"Sub CountBytes(pcb As UINT)"}, + {"name":"LockBytes","kind":"sub","vis":"public","signature":"Sub LockBytes(ByVal cb As UINT, ByVal ulOffset As ULONG, ppvBytes As any)"}, + {"name":"UnlockBytes","kind":"sub","vis":"public","signature":"Sub UnlockBytes(pvBytes As any, ByVal cb As UINT, ByVal ulOffset As ULONG)"} + ] + }, + { + "name": "ITransformable", + "kind": "interface", + "vis": "public", + "file": "GdiPlus/Types.twin", + "signature": "Interface ITransformable Extends IUnknown", + "extends": "IUnknown", + "members": [ + {"name":"GetTransform","kind":"function","vis":"public","signature":"Function GetTransform(outMatrix As Matrix) As GpStatus","returnType":"GpStatus"}, + {"name":"MultiplyTransform","kind":"function","vis":"public","signature":"Function MultiplyTransform(matrix As Matrix, ByVal order As GpMatrixOrder = MatrixOrderPrepend) As GpStatus","returnType":"GpStatus"}, + {"name":"ResetTransform","kind":"function","vis":"public","signature":"Function ResetTransform() As GpStatus","returnType":"GpStatus","description":"Set the transform to identity matrix"}, + {"name":"RotateTransform","kind":"function","vis":"public","signature":"Function RotateTransform(ByVal angle!, ByVal order As GpMatrixOrder = MatrixOrderPrepend) As GpStatus","returnType":"GpStatus"}, + {"name":"RotateTransformAt","kind":"function","vis":"public","signature":"Function RotateTransformAt(ByVal angle!, ByVal center As GpPointF, ByVal order As GpMatrixOrder = MatrixOrderPrepend) As GpStatus","returnType":"GpStatus"}, + {"name":"ScaleTransform","kind":"function","vis":"public","signature":"Function ScaleTransform(ByVal sx!, ByVal sy!, ByVal order As GpMatrixOrder = MatrixOrderPrepend) As GpStatus","returnType":"GpStatus"}, + {"name":"ShearTransform","kind":"function","vis":"public","signature":"Function ShearTransform(ByVal shearX!, ByVal shearY!, ByVal order As GpMatrixOrder = matrixorderprepend) As GpStatus","returnType":"GpStatus"}, + {"name":"Transform","kind":"property","vis":"public","signature":"Property Get Transform() As Matrix","returnType":"Matrix","accessor":"Get"}, + {"name":"Transform","kind":"property","vis":"public","signature":"Property Let Transform(matrix As Matrix)","accessor":"Let"}, + {"name":"TranslateTransform","kind":"function","vis":"public","signature":"Function TranslateTransform(ByVal delta As GpPointF, ByVal order As GpMatrixOrder = MatrixOrderPrepend) As GpStatus","returnType":"GpStatus"}, + {"name":"TranslateTransform","kind":"function","vis":"public","signature":"Function TranslateTransform(ByVal dx!, ByVal dy!, ByVal order As GpMatrixOrder = MatrixOrderPrepend) As GpStatus","returnType":"GpStatus"} + ] + }, + { + "name": "Image", + "kind": "class", + "vis": "public", + "file": "GdiPlus/Image.twin", + "signature": "Class Image", + "inherits": ["GdiPlusBase"], + "attrs": [{"name":"COMCreatable","args":"False"}], + "description": "Abstract base class for Image and Metafile", + "members": [ + {"name":"Bounds","kind":"property","vis":"public","signature":"Property Get Bounds(srcUnit As GpUnit) As GpRectF","returnType":"GpRectF","accessor":"Get"}, + {"name":"Class_Terminate","kind":"sub","vis":"public","signature":"Sub Class_Terminate()"}, + {"name":"Clone","kind":"function","vis":"public","signature":"Function Clone() As Image","returnType":"Image"}, + {"name":"Dimension","kind":"property","vis":"public","signature":"Property Get Dimension() As GpSizeF","returnType":"GpSizeF","accessor":"Get"}, + {"name":"FindFirstItem","kind":"function","vis":"public","signature":"Function FindFirstItem() As GpImageItemData()","returnType":"GpImageItemData()","description":"Returns the first item wrapped in a length-1 array."}, + {"name":"FindNextItem","kind":"function","vis":"public","signature":"Function FindNextItem() As GpImageItemData()","returnType":"GpImageItemData()","description":"Returns the next item wrapped in a length-1 array."}, + {"name":"Flags","kind":"property","vis":"public","signature":"Property Get Flags() As UINT","returnType":"UINT","accessor":"Get"}, + {"name":"FrameCount","kind":"property","vis":"public","signature":"Property Get FrameCount(ByVal dimensionID As GDIP_UUID) As UINT","returnType":"UINT","accessor":"Get"}, + {"name":"FrameDimensionsCount","kind":"property","vis":"public","signature":"Property Get FrameDimensionsCount() As Long","returnType":"Long","accessor":"Get"}, + {"name":"GetAllPropertyItems","kind":"function","vis":"public","signature":"Function GetAllPropertyItems() As GpPropertyItem()","returnType":"GpPropertyItem()"}, + {"name":"GetEncoderParameterList","kind":"function","vis":"public","signature":"Function GetEncoderParameterList(clsidEncoder As GDIP_UUID) As GpEncoderParameter()","returnType":"GpEncoderParameter()"}, + {"name":"GetFrameDimensionsList","kind":"function","vis":"public","signature":"Function GetFrameDimensionsList() As GDIP_UUID()","returnType":"GDIP_UUID()"}, + {"name":"GetItemData","kind":"function","vis":"public","signature":"Function GetItemData(item() As GpImageItemData) As GpStatus","returnType":"GpStatus","description":"Populates the data of an item wrapped in a length-1 array."}, + {"name":"GetThumbnail","kind":"function","vis":"public","signature":"Function GetThumbnail(ByVal thumbSize As GpSize, Optional callback As GetThumbnailImageAbort, callbackData As LongPtr = 0) As Image","returnType":"Image"}, + {"name":"GetThumbnail","kind":"function","vis":"public","signature":"Function GetThumbnail(ByVal thumbWidth&, ByVal thumbHeight&, Optional callback As GetThumbnailImageAbort, callbackData As LongPtr = 0) As Image","returnType":"Image"}, + {"name":"Height","kind":"property","vis":"public","signature":"Property Get Height() As UINT","returnType":"UINT","accessor":"Get"}, + {"name":"HorizontalResolution","kind":"property","vis":"public","signature":"Property Get HorizontalResolution() As Single","returnType":"Single","accessor":"Get"}, + {"name":"Native","kind":"property","vis":"protected","signature":"Protected Property Get Native() As GpImage","returnType":"GpImage","accessor":"Get"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(ByVal filename$, useEmbeddedColorManagement As Boolean = False)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(stream As GDIP_IStream, useEmbeddedColorManagement As Boolean = False)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(ByVal nativeImage As GpImage, ByVal status As GpStatus = Ok)"}, + {"name":"Palette","kind":"property","vis":"public","signature":"Property Get Palette() As ColorPalette()","returnType":"ColorPalette()","accessor":"Get"}, + {"name":"Palette","kind":"property","vis":"public","signature":"Property Let Palette(palette() As ColorPalette)","accessor":"Let"}, + {"name":"PaletteSize","kind":"property","vis":"public","signature":"Property Get PaletteSize() As Long","returnType":"Long","accessor":"Get"}, + {"name":"PixelFormat","kind":"property","vis":"public","signature":"Property Get PixelFormat() As PixelFormat","returnType":"PixelFormat","accessor":"Get"}, + {"name":"PropertyCount","kind":"property","vis":"public","signature":"Property Get PropertyCount() As UINT","returnType":"UINT","accessor":"Get"}, + {"name":"PropertyIdList","kind":"property","vis":"public","signature":"Property Get PropertyIdList() As PROPID()","returnType":"PROPID()","accessor":"Get"}, + {"name":"PropertyItem","kind":"property","vis":"public","signature":"Property Get PropertyItem(ByVal propid As PROPID) As GpPropertyItem()","returnType":"GpPropertyItem()","accessor":"Get","description":"Returns a single property item at array index 1."}, + {"name":"PropertyItem","kind":"property","vis":"public","signature":"Property Let PropertyItem(item As GpPropertyItem)","accessor":"Let"}, + {"name":"RawFormat","kind":"property","vis":"public","signature":"Property Get RawFormat() As GDIP_UUID","returnType":"GDIP_UUID","accessor":"Get"}, + {"name":"RemovePropertyItem","kind":"function","vis":"public","signature":"Function RemovePropertyItem(ByVal propId As PROPID) As GpStatus","returnType":"GpStatus"}, + {"name":"RotateFlip","kind":"function","vis":"public","signature":"Function RotateFlip(ByVal rotateFlipType As RotateFlipType) As GpStatus","returnType":"GpStatus"}, + {"name":"Save","kind":"function","vis":"public","signature":"Function Save(ByVal filename$, clsidEncoder As GDIP_UUID, encoderParams() As GpEncoderParameter) As GpStatus","returnType":"GpStatus","description":"There should be a dummy encoderParams(0) that's not filled in. It's used internally."}, + {"name":"Save","kind":"function","vis":"public","signature":"Function Save(ByVal stream As GDIP_IStream, clsidEncoder As GDIP_UUID, encoderParams() As GpEncoderParameter) As GpStatus","returnType":"GpStatus","description":"There should be a dummy encoderParams(0) that's not filled in. It's used internally."}, + {"name":"SaveAdd","kind":"function","vis":"public","signature":"Function SaveAdd(encoderParams() As GpEncoderParameter) As GpStatus","returnType":"GpStatus","description":"There should be a dummy encoderParams(0) that's not filled in. It's used internally."}, + {"name":"SaveAddImage","kind":"function","vis":"public","signature":"Function SaveAddImage(newImage As Image, encoderParams() As GpEncoderParameter) As GpStatus","returnType":"GpStatus","description":"There should be a dummy encoderParams(0) that's not filled in. It's used internally."}, + {"name":"SelectActiveFrame","kind":"function","vis":"public","signature":"Function SelectActiveFrame(ByVal dimensionID As GDIP_UUID, ByVal frameIndex As UINT) As GpStatus","returnType":"GpStatus"}, + {"name":"SetAbort","kind":"function","vis":"public","signature":"Function SetAbort(pIAbort As GdiPlusAbort) As GpStatus","returnType":"GpStatus","description":"⛔This API is not implemented in GdiPlus 1.0 nor 1.1."}, + {"name":"Size","kind":"property","vis":"public","signature":"Property Get Size() As GpSize","returnType":"GpSize","accessor":"Get"}, + {"name":"Type","kind":"property","vis":"public","signature":"Property Get Type() As GpImageType","returnType":"GpImageType","accessor":"Get"}, + {"name":"VerticalResolution","kind":"property","vis":"public","signature":"Property Get VerticalResolution() As Single","returnType":"Single","accessor":"Get"}, + {"name":"Width","kind":"property","vis":"public","signature":"Property Get Width() As UINT","returnType":"UINT","accessor":"Get"}, + {"name":"im","kind":"field","vis":"protected","signature":"Protected im As GpImage"}, + {"name":"loadStatus","kind":"field","vis":"protected","signature":"Protected loadStatus As GpStatus"} + ] + }, + { + "name": "ImageAttributes", + "kind": "class", + "vis": "public", + "file": "GdiPlus/ImageAttributes.twin", + "signature": "Class ImageAttributes", + "inherits": ["GdiPlusBase"], + "attrs": [{"name":"COMCreatable","args":"False"}], + "members": [ + {"name":"Class_Terminate","kind":"sub","vis":"public","signature":"Sub Class_Terminate()"}, + {"name":"ClearBrushRemapTable","kind":"function","vis":"public","signature":"Function ClearBrushRemapTable() As GpStatus","returnType":"GpStatus"}, + {"name":"ClearColorKey","kind":"function","vis":"public","signature":"Function ClearColorKey(ByVal type As ColorAdjustType = ColorAdjustTypeDefault) As GpStatus","returnType":"GpStatus"}, + {"name":"ClearColorMatrices","kind":"function","vis":"public","signature":"Function ClearColorMatrices(ByVal type As ColorAdjustType = ColorAdjustTypeDefault) As GpStatus","returnType":"GpStatus"}, + {"name":"ClearColorMatrix","kind":"function","vis":"public","signature":"Function ClearColorMatrix(ByVal type As ColorAdjustType = ColorAdjustTypeDefault) As GpStatus","returnType":"GpStatus"}, + {"name":"ClearGamma","kind":"function","vis":"public","signature":"Function ClearGamma(ByVal type As ColorAdjustType = ColorAdjustTypeDefault) As GpStatus","returnType":"GpStatus"}, + {"name":"ClearNoOp","kind":"function","vis":"public","signature":"Function ClearNoOp(ByVal type As ColorAdjustType = ColorAdjustTypeDefault) As GpStatus","returnType":"GpStatus"}, + {"name":"ClearOutputChannel","kind":"function","vis":"public","signature":"Function ClearOutputChannel(ByVal type As ColorAdjustType = ColorAdjustTypeDefault) As GpStatus","returnType":"GpStatus"}, + {"name":"ClearOutputChannelColorProfile","kind":"function","vis":"public","signature":"Function ClearOutputChannelColorProfile(ByVal type As ColorAdjustType = ColorAdjustTypeDefault) As GpStatus","returnType":"GpStatus"}, + {"name":"ClearRemapTable","kind":"function","vis":"public","signature":"Function ClearRemapTable(ByVal type As ColorAdjustType = ColorAdjustTypeDefault) As GpStatus","returnType":"GpStatus"}, + {"name":"ClearThreshold","kind":"function","vis":"public","signature":"Function ClearThreshold(ByVal type As ColorAdjustType = ColorAdjustTypeDefault) As GpStatus","returnType":"GpStatus"}, + {"name":"Clone","kind":"function","vis":"public","signature":"Function Clone() As ImageAttributes","returnType":"ImageAttributes"}, + {"name":"GetAdjustedPalette","kind":"function","vis":"public","signature":"Function GetAdjustedPalette(colorPalette As ColorPalette, ByVal colorAdjustType As ColorAdjustType) As GpStatus","returnType":"GpStatus"}, + {"name":"Native","kind":"property","vis":"protected","signature":"Protected Property Get Native() As GpImageAttributes","returnType":"GpImageAttributes","accessor":"Get"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New()"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(ByVal imageAttr As GpImageAttributes, ByVal status As GpStatus = ok)"}, + {"name":"Reset","kind":"function","vis":"public","signature":"Function Reset(ByVal type As ColorAdjustType = coloradjusttypedefault) As GpStatus","returnType":"GpStatus"}, + {"name":"SetBrushRemapTable","kind":"function","vis":"public","signature":"Function SetBrushRemapTable(map() As ColorMap) As GpStatus","returnType":"GpStatus"}, + {"name":"SetCachedBackground","kind":"function","vis":"public","signature":"Function SetCachedBackground(ByVal enabled As Boolean) As GpStatus","returnType":"GpStatus"}, + {"name":"SetColorKey","kind":"function","vis":"public","signature":"Function SetColorKey(ByVal rgbLow&, ByVal rgbHigh&, ByVal type As ColorAdjustType = ColorAdjustTypeDefault) As GpStatus","returnType":"GpStatus"}, + {"name":"SetColorKey","kind":"function","vis":"public","signature":"Function SetColorKey(ByVal colorLow As Color, ByVal colorHigh As Color, ByVal type As ColorAdjustType = ColorAdjustTypeDefault) As GpStatus","returnType":"GpStatus"}, + {"name":"SetColorMatrices","kind":"function","vis":"public","signature":"Function SetColorMatrices(colorMatrix As ColorMatrix, grayMatrix As ColorMatrix, ByVal mode As ColorMatrixFlags = ColorMatrixFlagsDefault, ByVal type As ColorAdjustType = ColorAdjustTypeDefault) As GpStatus","returnType":"GpStatus"}, + {"name":"SetColorMatrix","kind":"function","vis":"public","signature":"Function SetColorMatrix(colorMatrix As ColorMatrix, ByVal mode As ColorMatrixFlags = colormatrixflagsdefault, ByVal type As ColorAdjustType = ColorAdjustTypeDefault) As GpStatus","returnType":"GpStatus"}, + {"name":"SetGamma","kind":"function","vis":"public","signature":"Function SetGamma(ByVal gamma!, ByVal type As ColorAdjustType = ColorAdjustTypeDefault) As GpStatus","returnType":"GpStatus"}, + {"name":"SetNoOp","kind":"function","vis":"public","signature":"Function SetNoOp(ByVal type As ColorAdjustType = ColorAdjustTypeDefault) As GpStatus","returnType":"GpStatus"}, + {"name":"SetOutputChannel","kind":"function","vis":"public","signature":"Function SetOutputChannel(ByVal channelFlags As ColorChannelFlags, ByVal type As ColorAdjustType = ColorAdjustTypeDefault) As GpStatus","returnType":"GpStatus"}, + {"name":"SetOutputChannelColorProfile","kind":"function","vis":"public","signature":"Function SetOutputChannelColorProfile(ByVal colorProfileFilename$, ByVal type As ColorAdjustType = ColorAdjustTypeDefault) As GpStatus","returnType":"GpStatus"}, + {"name":"SetRemapTable","kind":"function","vis":"public","signature":"Function SetRemapTable(map() As ColorMap, ByVal type As ColorAdjustType = ColorAdjustTypeDefault) As GpStatus","returnType":"GpStatus"}, + {"name":"SetThreshold","kind":"function","vis":"public","signature":"Function SetThreshold(ByVal threshold!, ByVal type As ColorAdjustType = ColorAdjustTypeDefault) As GpStatus","returnType":"GpStatus"}, + {"name":"SetToIdentity","kind":"function","vis":"public","signature":"Function SetToIdentity(ByVal type As ColorAdjustType = coloradjusttypedefault) As GpStatus","returnType":"GpStatus"}, + {"name":"SetWrapMode","kind":"function","vis":"public","signature":"Function SetWrapMode(ByVal wrap As GpWrapMode, ByVal rgb&, ByVal clamp As Boolean = False) As GpStatus","returnType":"GpStatus"}, + {"name":"SetWrapMode","kind":"function","vis":"public","signature":"Function SetWrapMode(ByVal wrap As GpWrapMode, ByVal color As Color, ByVal clamp As Boolean = False) As GpStatus","returnType":"GpStatus"}, + {"name":"ia","kind":"field","vis":"private","signature":"Dim ia As GpImageAttributes"} + ] + }, + { + "name": "InstalledFontCollection", + "kind": "class", + "vis": "public", + "file": "GdiPlus/InstalledFontCollection.twin", + "signature": "Class InstalledFontCollection", + "inherits": ["FontCollection"], + "attrs": [{"name":"COMCreatable","args":"False"}], + "members": [ + {"name":"Class_Terminate","kind":"sub","vis":"public","signature":"Sub Class_Terminate()"}, + {"name":"Native","kind":"property","vis":"protected","signature":"Protected Property Get Native() As GpInstalledFontCollection","returnType":"GpInstalledFontCollection","accessor":"Get"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New()"}, + {"name":"New","kind":"sub","vis":"protected","signature":"Protected Sub New(ByVal nativeCollection As GpInstalledFontCollection, ByVal status As GpStatus = Ok)"} + ] + }, + { + "name": "Levels", + "kind": "class", + "vis": "public", + "file": "GdiPlus/Effects.twin", + "signature": "Class Levels", + "inherits": ["Effect"], + "attrs": [{"name":"COMCreatable","args":"False"}], + "members": [ + {"name":"New","kind":"sub","vis":"public","signature":"Sub New()"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(params As LevelsParams)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(ByVal highlight&, ByVal midtone&, ByVal shadow&)"}, + {"name":"Parameters","kind":"property","vis":"public","signature":"Property Let Parameters(parameters As LevelsParams)","accessor":"Let"}, + {"name":"Parameters","kind":"property","vis":"public","signature":"Property Get Parameters(Optional size As UINT) As LevelsParams","returnType":"LevelsParams","accessor":"Get"} + ] + }, + { + "name": "LinearGradientBrush", + "kind": "class", + "vis": "public", + "file": "GdiPlus/LinearGradientBrush.twin", + "signature": "Class LinearGradientBrush", + "inherits": ["GdiPlusBase"], + "implements": ["IBrush","ITransformable"], + "attrs": [{"name":"COMCreatable","args":"False"}], + "members": [ + {"name":"BlendCount","kind":"property","vis":"public","signature":"Property Get BlendCount() As Long","returnType":"Long","accessor":"Get"}, + {"name":"Class_Terminate","kind":"sub","vis":"private","signature":"Private Sub Class_Terminate()"}, + {"name":"Clone","kind":"function","vis":"public","signature":"Function Clone() As LinearGradientBrush","returnType":"LinearGradientBrush"}, + {"name":"CloneBrush","kind":"function","vis":"public","signature":"Function CloneBrush() As IBrush Implements IBrush.CloneBrush","returnType":"IBrush"}, + {"name":"GammaCorrection","kind":"property","vis":"public","signature":"Property Let GammaCorrection(ByVal useGammaCorrection As Boolean)","accessor":"Let"}, + {"name":"GammaCorrection","kind":"property","vis":"public","signature":"Property Get GammaCorrection() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"GetBlend","kind":"function","vis":"public","signature":"Function GetBlend(blendFactors!(), blendPositions!()) As GpStatus","returnType":"GpStatus"}, + {"name":"GetBlend","kind":"function","vis":"public","signature":"Function GetBlend(blendFactors!, blendPositions!, ByVal count&) As GpStatus","returnType":"GpStatus"}, + {"name":"GetInterpolationColors","kind":"function","vis":"public","signature":"Function GetInterpolationColors(presetColors() As Color, blendPositions!()) As GpStatus","returnType":"GpStatus"}, + {"name":"GetInterpolationColors","kind":"function","vis":"public","signature":"Function GetInterpolationColors(presetColors As Color, blendPositions!, ByVal count&) As GpStatus","returnType":"GpStatus"}, + {"name":"GetTransform","kind":"function","vis":"public","signature":"Function GetTransform(outMatrix As Matrix) As GpStatus Implements ITransformable.GetTransform","returnType":"GpStatus"}, + {"name":"InterpolationColorCount","kind":"property","vis":"public","signature":"Property Get InterpolationColorCount() As Long","returnType":"Long","accessor":"Get"}, + {"name":"LinearColors","kind":"property","vis":"public","signature":"Property Get LinearColors() As Color()","returnType":"Color()","accessor":"Get"}, + {"name":"LinearRGBs","kind":"property","vis":"public","signature":"Property Get LinearRGBs() As Long()","returnType":"Long()","accessor":"Get"}, + {"name":"MultiplyTransform","kind":"function","vis":"public","signature":"Function MultiplyTransform(matrix As Matrix, ByVal order As GpMatrixOrder = MatrixOrderPrepend) As GpStatus Implements ITransformable.MultiplyTransform","returnType":"GpStatus"}, + {"name":"Native","kind":"property","vis":"protected","signature":"Protected Property Get Native() As GpLineGradient","returnType":"GpLineGradient","accessor":"Get"}, + {"name":"NativeBrush","kind":"property","vis":"public","signature":"Property Get NativeBrush() As GpBrush Implements IBrush.NativeBrush","returnType":"GpBrush","accessor":"Get"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(rect As GpRectF, ByVal rgb1&, ByVal rgb2&)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(rect As GpRectF, ByVal color1 As Color, ByVal color2 As Color)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(rect As GpRect, ByVal rgb1&, ByVal rgb2&)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(rect As GpRect, ByVal color1 As Color, ByVal color2 As Color)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(ByVal point1 As GpPointF, ByVal point2 As GpPointF, ByVal rgb1&, ByVal rgb2&)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(ByVal point1 As GpPointF, ByVal point2 As GpPointF, ByVal color1 As Color, ByVal color2 As Color)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(ByVal point1 As GpPoint, ByVal point2 As GpPoint, ByVal rgb1&, ByVal rgb2&)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(ByVal point1 As GpPoint, ByVal point2 As GpPoint, ByVal color1 As Color, ByVal color2 As Color)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(rect As GpRectF, ByVal rgb1&, ByVal rgb2&, ByVal mode As GpLinearGradientMode)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(rect As GpRectF, ByVal color1 As Color, ByVal color2 As Color, ByVal mode As GpLinearGradientMode)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(rect As GpRect, ByVal rgb1&, ByVal rgb2&, ByVal mode As GpLinearGradientMode)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(rect As GpRect, ByVal color1 As Color, ByVal color2 As Color, ByVal mode As GpLinearGradientMode)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(rect As GpRectF, ByVal rgb1&, ByVal rgb2&, ByVal angle!, ByVal isAngleScalable As Boolean = False)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(rect As GpRectF, ByVal color1 As Color, ByVal color2 As Color, ByVal angle!, ByVal isAngleScalable As Boolean = False)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(rect As GpRect, ByVal rgb1&, ByVal rgb2&, ByVal angle!, ByVal isAngleScalable As Boolean = False)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(rect As GpRect, ByVal color1 As Color, ByVal color2 As Color, ByVal angle!, ByVal isAngleScalable As Boolean = False)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(ByVal nativeBrush As GpLineGradient, ByVal status As GpStatus = ok)"}, + {"name":"Rectangle","kind":"property","vis":"public","signature":"Property Get Rectangle() As GpRectF","returnType":"GpRectF","accessor":"Get"}, + {"name":"RectangleI","kind":"property","vis":"public","signature":"Property Get RectangleI() As GpRect","returnType":"GpRect","accessor":"Get"}, + {"name":"ResetTransform","kind":"function","vis":"public","signature":"Function ResetTransform() As GpStatus Implements ITransformable.ResetTransform","returnType":"GpStatus"}, + {"name":"RotateTransform","kind":"function","vis":"public","signature":"Function RotateTransform(ByVal angle!, ByVal order As GpMatrixOrder = MatrixOrderPrepend) As GpStatus Implements ITransformable.RotateTransform","returnType":"GpStatus"}, + {"name":"RotateTransformAt","kind":"function","vis":"public","signature":"Function RotateTransformAt(ByVal angle!, ByVal center As GpPointF, ByVal order As GpMatrixOrder = MatrixOrderPrepend) As GpStatus Implements ITransformable.RotateTransformAt","returnType":"GpStatus"}, + {"name":"ScaleTransform","kind":"function","vis":"public","signature":"Function ScaleTransform(ByVal sx!, ByVal sy!, ByVal order As GpMatrixOrder = MatrixOrderPrepend) As GpStatus Implements ITransformable.ScaleTransform","returnType":"GpStatus"}, + {"name":"SetBlend","kind":"function","vis":"public","signature":"Function SetBlend(blendFactors!(), blendPositions!()) As GpStatus","returnType":"GpStatus"}, + {"name":"SetBlend","kind":"function","vis":"public","signature":"Function SetBlend(blendFactors!, blendPositions!, ByVal count&) As GpStatus","returnType":"GpStatus"}, + {"name":"SetBlendBellShape","kind":"function","vis":"public","signature":"Function SetBlendBellShape(ByVal focus!, ByVal scale! = 1.0!) As GpStatus","returnType":"GpStatus"}, + {"name":"SetBlendTriangularShape","kind":"function","vis":"public","signature":"Function SetBlendTriangularShape(ByVal focus!, ByVal scale! = 1.0!) As GpStatus","returnType":"GpStatus"}, + {"name":"SetInterpolationColors","kind":"function","vis":"public","signature":"Function SetInterpolationColors(presetColors() As Color, blendPositions!()) As GpStatus","returnType":"GpStatus"}, + {"name":"SetInterpolationColors","kind":"function","vis":"public","signature":"Function SetInterpolationColors(presetColors As Color, blendPositions!, ByVal count&) As GpStatus","returnType":"GpStatus"}, + {"name":"SetLinearColors","kind":"function","vis":"public","signature":"Function SetLinearColors(ByVal rgb1&, ByVal rgb2&) As GpStatus","returnType":"GpStatus"}, + {"name":"SetLinearColors","kind":"function","vis":"public","signature":"Function SetLinearColors(ByVal color1 As Color, ByVal color2 As Color) As GpStatus","returnType":"GpStatus"}, + {"name":"ShearTransform","kind":"function","vis":"public","signature":"Function ShearTransform(ByVal shearX!, ByVal shearY!, ByVal order As GpMatrixOrder = MatrixOrderPrepend) As GpStatus Implements ITransformable.ShearTransform","returnType":"GpStatus"}, + {"name":"Transform","kind":"property","vis":"public","signature":"Property Let Transform(matrix As Matrix) Implements ITransformable.Transform","accessor":"Let"}, + {"name":"Transform","kind":"property","vis":"public","signature":"Property Get Transform() As Matrix Implements ITransformable.Transform","returnType":"Matrix","accessor":"Get"}, + {"name":"TranslateTransform","kind":"function","vis":"public","signature":"Function TranslateTransform(ByVal delta As GpPointF, ByVal order As GpMatrixOrder = MatrixOrderPrepend) As GpStatus Implements ITransformable.TranslateTransform","returnType":"GpStatus"}, + {"name":"TranslateTransform","kind":"function","vis":"public","signature":"Function TranslateTransform(ByVal dx!, ByVal dy!, ByVal order As GpMatrixOrder = MatrixOrderPrepend) As GpStatus Implements ITransformable.TranslateTransform","returnType":"GpStatus"}, + {"name":"Type","kind":"property","vis":"public","signature":"Property Get Type() As GpBrushType Implements IBrush.Type","returnType":"GpBrushType","accessor":"Get"}, + {"name":"WrapMode","kind":"property","vis":"public","signature":"Property Let WrapMode(ByVal wrapMode As GpWrapMode)","accessor":"Let"}, + {"name":"WrapMode","kind":"property","vis":"public","signature":"Property Get WrapMode() As GpWrapMode","returnType":"GpWrapMode","accessor":"Get"}, + {"name":"br","kind":"field","vis":"protected","signature":"Protected br As GpLineGradient"} + ] + }, + { + "name": "Matrix", + "kind": "class", + "vis": "public", + "file": "GdiPlus/Matrix.twin", + "signature": "Class Matrix", + "inherits": ["GdiPlusBase"], + "implements": ["ITransformable"], + "attrs": [{"name":"COMCreatable","args":"False"}], + "members": [ + {"name":"Class_Terminate","kind":"sub","vis":"public","signature":"Sub Class_Terminate()"}, + {"name":"Clone","kind":"function","vis":"public","signature":"Function Clone() As Matrix","returnType":"Matrix"}, + {"name":"Elements","kind":"property","vis":"public","signature":"Property Get Elements() As Single()","returnType":"Single()","accessor":"Get"}, + {"name":"Elements","kind":"property","vis":"public","signature":"Property Let Elements(elts() As Single)","accessor":"Let"}, + {"name":"GetElements","kind":"function","vis":"public","signature":"Function GetElements(elts() As Single) As GpStatus","returnType":"GpStatus"}, + {"name":"GetElements","kind":"function","vis":"public","signature":"Function GetElements(Optional m11!, Optional m12!, Optional m21!, Optional m22!, Optional dx!, Optional dy!) As GpStatus","returnType":"GpStatus"}, + {"name":"GetTo","kind":"function","vis":"public","signature":"Function GetTo(output As Matrix) As GpStatus Implements ITransformable.GetTransform","returnType":"GpStatus"}, + {"name":"Invert","kind":"function","vis":"public","signature":"Function Invert() As GpStatus","returnType":"GpStatus"}, + {"name":"IsEqualTo","kind":"function","vis":"public","signature":"Function IsEqualTo(matrix As Matrix) As Boolean","returnType":"Boolean"}, + {"name":"IsIdentity","kind":"property","vis":"public","signature":"Property Get IsIdentity() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"IsInvertible","kind":"property","vis":"public","signature":"Property Get IsInvertible() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"Me","kind":"property","vis":"public","signature":"Property Get Me() As Matrix Implements ITransformable.Transform","returnType":"Matrix","accessor":"Get"}, + {"name":"Me","kind":"property","vis":"public","signature":"Property Let Me(newValue As Matrix) Implements ITransformable.Transform","accessor":"Let"}, + {"name":"Multiply","kind":"function","vis":"public","signature":"Function Multiply(matrix As Matrix, ByVal order As GpMatrixOrder = MatrixOrderPrepend) As GpStatus Implements ITransformable.MultiplyTransform","returnType":"GpStatus"}, + {"name":"Native","kind":"property","vis":"protected","signature":"Protected Property Get Native() As GpMatrix","returnType":"GpMatrix","accessor":"Get"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New()","description":"Become an identity matrix by default."}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(ByVal m11!, ByVal m12!, ByVal m21!, ByVal m22!, ByVal dx!, ByVal dy!)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(rect As GpRectF, ByVal dstplg As GpPointF)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(rect As GpRect, ByVal dstplg As GpPoint)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(ByVal nativeMatrix As GpMatrix, ByVal status As GpStatus = ok)"}, + {"name":"Offset","kind":"property","vis":"public","signature":"Property Get Offset() As GpPointF","returnType":"GpPointF","accessor":"Get"}, + {"name":"Offset","kind":"property","vis":"public","signature":"Property Let Offset(ByVal ofs As GpPointF)","accessor":"Let"}, + {"name":"OffsetX","kind":"property","vis":"public","signature":"Property Get OffsetX() As Single","returnType":"Single","accessor":"Get"}, + {"name":"OffsetX","kind":"property","vis":"public","signature":"Property Let OffsetX(ByVal ofsX!)","accessor":"Let"}, + {"name":"OffsetY","kind":"property","vis":"public","signature":"Property Get OffsetY() As Single","returnType":"Single","accessor":"Get"}, + {"name":"OffsetY","kind":"property","vis":"public","signature":"Property Let OffsetY(ByVal ofsX!)","accessor":"Let"}, + {"name":"Reset","kind":"function","vis":"public","signature":"Function Reset() As GpStatus Implements ITransformable.ResetTransform","returnType":"GpStatus"}, + {"name":"Rotate","kind":"function","vis":"public","signature":"Function Rotate(ByVal angle!, ByVal order As GpMatrixOrder = MatrixOrderPrepend) As GpStatus Implements ITransformable.RotateTransform","returnType":"GpStatus"}, + {"name":"RotateAt","kind":"function","vis":"public","signature":"Function RotateAt(ByVal angle!, ByVal center As GpPointF, ByVal order As GpMatrixOrder = MatrixOrderPrepend) As GpStatus Implements ITransformable.RotateTransformAt","returnType":"GpStatus"}, + {"name":"Scale","kind":"function","vis":"public","signature":"Function Scale(ByVal scaleX!, ByVal scaleY!, ByVal order As GpMatrixOrder = MatrixOrderPrepend) As GpStatus Implements ITransformable.ScaleTransform","returnType":"GpStatus"}, + {"name":"SetElements","kind":"function","vis":"public","signature":"Function SetElements(ByVal m11!, ByVal m12!, ByVal m21!, ByVal m22!, ByVal dx!, ByVal dy!) As GpStatus","returnType":"GpStatus"}, + {"name":"SetFrom","kind":"function","vis":"public","signature":"Function SetFrom(input As Matrix) As GpStatus","returnType":"GpStatus"}, + {"name":"Shear","kind":"function","vis":"public","signature":"Function Shear(ByVal shearX!, ByVal shearY!, ByVal order As GpMatrixOrder = MatrixOrderPrepend) As GpStatus Implements ITransformable.ShearTransform","returnType":"GpStatus"}, + {"name":"TransformPoint","kind":"function","vis":"public","signature":"Function TransformPoint(pt As GpPointF) As GpStatus","returnType":"GpStatus"}, + {"name":"TransformPoint","kind":"function","vis":"public","signature":"Function TransformPoint(pt As GpPoint) As GpStatus","returnType":"GpStatus"}, + {"name":"TransformPoints","kind":"function","vis":"public","signature":"Function TransformPoints(pts() As GpPointF) As GpStatus","returnType":"GpStatus"}, + {"name":"TransformPoints","kind":"function","vis":"public","signature":"Function TransformPoints(pts() As GpPoint) As GpStatus","returnType":"GpStatus"}, + {"name":"Translate","kind":"function","vis":"public","signature":"Function Translate(ByVal offsetX!, ByVal offsety!, ByVal order As GpMatrixOrder = MatrixOrderPrepend) As GpStatus Implements ITransformable.TranslateTransform","returnType":"GpStatus"}, + {"name":"Translate","kind":"function","vis":"public","signature":"Function Translate(ByVal offset As GpPointF, ByVal order As GpMatrixOrder = MatrixOrderPrepend) As GpStatus Implements ITransformable.TranslateTransform","returnType":"GpStatus"}, + {"name":"VectorTransformPoint","kind":"function","vis":"public","signature":"Function VectorTransformPoint(pt As GpPointF) As GpStatus","returnType":"GpStatus"}, + {"name":"VectorTransformPoint","kind":"function","vis":"public","signature":"Function VectorTransformPoint(pt As GpPoint) As GpStatus","returnType":"GpStatus"}, + {"name":"VectorTransformPoints","kind":"function","vis":"public","signature":"Function VectorTransformPoints(pts() As GpPointF) As GpStatus","returnType":"GpStatus"}, + {"name":"VectorTransformPoints","kind":"function","vis":"public","signature":"Function VectorTransformPoints(pts() As GpPoint) As GpStatus","returnType":"GpStatus"}, + {"name":"mx","kind":"field","vis":"protected","signature":"Protected mx As GpMatrix"} + ] + }, + { + "name": "Metafile", + "kind": "class", + "vis": "public", + "file": "GdiPlus/Metafile.twin", + "signature": "Class Metafile", + "inherits": ["Image"], + "attrs": [{"name":"COMCreatable","args":"False"}], + "members": [ + {"name":"Clone","kind":"function","vis":"public","signature":"Function Clone() As Metafile","returnType":"Metafile"}, + {"name":"ConvertToEmfPlus","kind":"function","vis":"public","signature":"Function ConvertToEmfPlus(refGraphics As Graphics, Optional conversionFailureFlag&, ByVal emfType As GpEmfType = EmfTypeEmfPlusOnly, Optional ByVal description$) As GpStatus","returnType":"GpStatus"}, + {"name":"ConvertToEmfPlus","kind":"function","vis":"public","signature":"Function ConvertToEmfPlus(refGraphics As Graphics, ByVal filename$, Optional conversionFailureFlag&, ByVal emfType As GpEmfType = EmfTypeEmfPlusOnly, Optional ByVal description$) As GpStatus","returnType":"GpStatus"}, + {"name":"ConvertToEmfPlus","kind":"function","vis":"public","signature":"Function ConvertToEmfPlus(refGraphics As Graphics, stream As GDIP_IStream, Optional conversionFailureFlag&, ByVal emfType As GpEmfType = EmfTypeEmfPlusOnly, Optional ByVal description$) As GpStatus","returnType":"GpStatus"}, + {"name":"DownLevelRasterizationLimit","kind":"property","vis":"public","signature":"Property Let DownLevelRasterizationLimit(ByVal metafileRasterizationLimitDpi As UINT)","accessor":"Let"}, + {"name":"DownLevelRasterizationLimit","kind":"property","vis":"public","signature":"Property Get DownLevelRasterizationLimit() As UINT","returnType":"UINT","accessor":"Get"}, + {"name":"GetHENHMETAFILE","kind":"function","vis":"public","signature":"Function GetHENHMETAFILE() As LongPtr","returnType":"LongPtr"}, + {"name":"MetafileHeader","kind":"property","vis":"public","signature":"Property Get MetafileHeader() As MetafileHeader","returnType":"MetafileHeader","accessor":"Get"}, + {"name":"Native","kind":"property","vis":"protected","signature":"Protected Property Get Native() As GpMetafile","returnType":"GpMetafile","accessor":"Get"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(ByVal hWmf As LongPtr, wmfPlaceableFileHeader As WmfPlaceableFileHeader, ByVal deleteWmf As Boolean = False)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(ByVal hEmf As LongPtr, ByVal deleteWmf As Boolean = False)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(ByVal filename$)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(ByVal filename$, wmfPlaceableFileHeader As WmfPlaceableFileHeader)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(stream As GDIP_IStream)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(ByVal referenceHdc As LongPtr, ByVal type As GpEmfType = EmfTypeEmfPlusDual, Optional ByVal description$)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(ByVal referenceHdc As LongPtr, frameRect As GpRectF, ByVal frameUnit As GpMetafileFrameUnit = MetaFileFrameUnitGdi, ByVal type As GpEmfType = EmfTypeEmfPlusDual, Optional ByVal description$)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(ByVal referenceHdc As LongPtr, frameRect As GpRect, ByVal frameUnit As GpMetafileFrameUnit = MetaFileFrameUnitGdi, ByVal type As GpEmfType = EmfTypeEmfPlusDual, Optional ByVal description$)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(ByVal fileName$, ByVal referenceHdc As LongPtr, ByVal type As GpEmfType = EmfTypeEmfPlusDual, Optional ByVal description$)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(ByVal fileName$, ByVal referenceHdc As LongPtr, frameRect As GpRectF, ByVal frameUnit As GpMetafileFrameUnit = MetaFileFrameUnitGdi, ByVal type As GpEmfType = EmfTypeEmfPlusDual, Optional ByVal description$)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(ByVal fileName$, ByVal referenceHdc As LongPtr, frameRect As GpRect, ByVal frameUnit As GpMetafileFrameUnit = MetaFileFrameUnitGdi, ByVal type As GpEmfType = EmfTypeEmfPlusDual, Optional ByVal description$)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(stream As GDIP_IStream, ByVal referenceHdc As LongPtr, ByVal type As GpEmfType = EmfTypeEmfPlusDual, Optional ByVal description$)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(stream As GDIP_IStream, ByVal referenceHdc As LongPtr, frameRect As GpRectF, ByVal frameUnit As GpMetafileFrameUnit = MetaFileFrameUnitGdi, ByVal type As GpEmfType = EmfTypeEmfPlusDual, Optional ByVal description$)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(stream As GDIP_IStream, ByVal referenceHdc As LongPtr, frameRect As GpRect, ByVal frameUnit As GpMetafileFrameUnit = MetaFileFrameUnitGdi, ByVal type As GpEmfType = EmfTypeEmfPlusDual, Optional ByVal description$)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(ByVal nativeMetafile As GpMetafile, ByVal status As GpStatus = ok)"}, + {"name":"PlayRecord","kind":"function","vis":"public","signature":"Function PlayRecord(ByVal recordType As GpEmfPlusRecordType, ByVal flags As UINT, ByVal dataSize As UINT, data As Byte) As GpStatus","returnType":"GpStatus"}, + {"name":"ReplaceNative","kind":"sub","vis":"protected","signature":"Protected Sub ReplaceNative(ByVal metafile As GpMetafile, ByVal status As GpStatus)"} + ] + }, + { + "name": "ModMain", + "kind": "module", + "vis": "public", + "file": "GdiPlusTest.twin", + "signature": "Module ModMain", + "members": [ + {"name":"BufferedPaintInit","kind":"function","vis":"private","declare":true,"signature":"Private Declare PtrSafe Function BufferedPaintInit Lib \"uxtheme\" () As Long","returnType":"Long"}, + {"name":"BufferedPaintUnInit","kind":"function","vis":"private","declare":true,"signature":"Private Declare PtrSafe Function BufferedPaintUnInit Lib \"uxtheme\" () As Long","returnType":"Long"}, + {"name":"CW_USEDEFAULT","kind":"const","vis":"private","signature":"Private Const CW_USEDEFAULT = &H80000000&"}, + {"name":"ClientRect","kind":"function","vis":"public","signature":"Function ClientRect(hWnd As LongPtr) As GpRect","returnType":"GpRect"}, + {"name":"CreateWindowEx","kind":"function","vis":"private","declare":true,"signature":"Private DeclareWide PtrSafe Function CreateWindowEx Lib \"user32\" Alias \"CreateWindowExW\" (ByVal dwExStyle As WindowStylesEx, ByVal lpClassName As String, ByVal lpWindowName As String, ByVal dwStyle As WindowStyles, ByVal X As Long, ByVal Y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hWndParent As LongPtr, ByVal hMenu As LongPtr, ByVal hInstance As LongPtr, lpParam As Any) As LongPtr","returnType":"LongPtr"}, + {"name":"DefWindowProc","kind":"function","vis":"private","declare":true,"signature":"Private DeclareWide PtrSafe Function DefWindowProc Lib \"user32\" Alias \"DefWindowProcW\" (ByVal hWnd As LongPtr, ByVal Msg As Long, ByVal wParam As LongPtr, ByVal lParam As LongPtr) As LongPtr","returnType":"LongPtr"}, + {"name":"DispatchMessage","kind":"function","vis":"private","declare":true,"signature":"Private DeclareWide PtrSafe Function DispatchMessage Lib \"user32\" Alias \"DispatchMessageW\" (ByRef lpmsg As MSG) As LongPtr","returnType":"LongPtr"}, + {"name":"Draw","kind":"sub","vis":"public","signature":"Sub Draw(gr As Graphics, rect As GpRectF)"}, + {"name":"GetClientRect","kind":"function","vis":"private","declare":true,"signature":"Private Declare PtrSafe Function GetClientRect Lib \"user32\" (ByVal hWnd As LongPtr, lpRect As GDIP_RECT) As GDIP_BOOL","returnType":"GDIP_BOOL"}, + {"name":"GetLocalTime","kind":"sub","vis":"private","declare":true,"signature":"Private Declare PtrSafe Sub GetLocalTime Lib \"kernel32\" (lpSystemTime As SYSTEMTIME)"}, + {"name":"GetMessage","kind":"function","vis":"private","declare":true,"signature":"Private DeclareWide PtrSafe Function GetMessage Lib \"user32\" Alias \"GetMessageW\" (lpMsg As MSG, ByVal hWnd As LongPtr, ByVal wMsgFilterMin As Long, ByVal wMsgFilterMax As Long) As Long","returnType":"Long"}, + {"name":"GetModuleHandle","kind":"function","vis":"private","declare":true,"signature":"Private DeclareWide PtrSafe Function GetModuleHandle Lib \"kernel32\" Alias \"GetModuleHandleW\" (Optional ByVal lpModuleName As String) As LongPtr","returnType":"LongPtr"}, + {"name":"InvalidateRect","kind":"function","vis":"private","declare":true,"signature":"Private Declare PtrSafe Function InvalidateRect Lib \"user32\" (ByVal hWnd As LongPtr, lpRect As GDIP_RECT, ByVal bErase As GDIP_BOOL) As GDIP_BOOL","returnType":"GDIP_BOOL"}, + {"name":"LoadCursor","kind":"function","vis":"private","declare":true,"signature":"Private DeclareWide PtrSafe Function LoadCursor Lib \"user32\" Alias \"LoadCursorW\" (ByVal hInstance As LongPtr, [TypeHint(DefCursors)] ByVal lpCursorName As Any) As LongPtr","returnType":"LongPtr"}, + {"name":"Main","kind":"sub","vis":"public","signature":"Sub Main()"}, + {"name":"Paint","kind":"sub","vis":"public","signature":"Sub Paint(ByVal hWnd As LongPtr, wndRect As GDIP_RECT)"}, + {"name":"PostQuitMessage","kind":"sub","vis":"private","declare":true,"signature":"Private Declare PtrSafe Sub PostQuitMessage Lib \"user32\" (ByVal nExitCode As Long)"}, + {"name":"RegisterClass","kind":"function","vis":"private","declare":true,"signature":"Private DeclareWide PtrSafe Function RegisterClass Lib \"user32\" Alias \"RegisterClassW\" (lpWndClass As WNDCLASS) As Integer","returnType":"Integer"}, + {"name":"SetTimer","kind":"function","vis":"private","declare":true,"signature":"Private Declare PtrSafe Function SetTimer Lib \"user32\" (ByVal hwnd As LongPtr, ByVal nIDEvent As LongPtr, ByVal uElapse As Long, ByVal lpTimerFunc As LongPtr) As LongPtr","returnType":"LongPtr"}, + {"name":"ShowWindow","kind":"function","vis":"private","declare":true,"signature":"Private Declare PtrSafe Function ShowWindow Lib \"user32\" (ByVal hWnd As LongPtr, ByVal nCmdShow As eSHOWWINDOW) As GDIP_BOOL","returnType":"GDIP_BOOL"}, + {"name":"Timer","kind":"function","vis":"public","signature":"Function Timer() As Single","returnType":"Single"}, + {"name":"TranslateMessage","kind":"function","vis":"private","declare":true,"signature":"Private Declare PtrSafe Function TranslateMessage Lib \"user32\" (ByRef lpmsg As MSG) As GDIP_BOOL","returnType":"GDIP_BOOL"}, + {"name":"UnregisterClass","kind":"function","vis":"private","declare":true,"signature":"Private DeclareWide PtrSafe Function UnregisterClass Lib \"user32\" Alias \"UnregisterClassW\" (ByVal lpClassName As String, Optional ByVal hInstance As LongPtr) As Long","returnType":"Long"}, + {"name":"UpdateWindow","kind":"function","vis":"private","declare":true,"signature":"Private Declare PtrSafe Function UpdateWindow Lib \"user32\" (ByVal hWnd As LongPtr) As GDIP_BOOL","returnType":"GDIP_BOOL"}, + {"name":"WndProc","kind":"function","vis":"public","signature":"Function WndProc(ByVal hWnd&, ByVal message&, ByVal wParam As LongPtr, ByVal lParam As LongPtr) As LongPtr","returnType":"LongPtr"}, + {"name":"pBrush","kind":"field","vis":"private","signature":"Dim pBrush As SolidBrush"}, + {"name":"pFont","kind":"field","vis":"private","signature":"Dim pFont As Font"}, + {"name":"pFormat","kind":"field","vis":"private","signature":"Dim pFormat As StringFormat"}, + {"name":"pPen","kind":"field","vis":"private","signature":"Dim pPen As Pen"}, + {"name":"tickMS","kind":"const","vis":"private","signature":"Const tickMS% = 5"}, + {"name":"timeBeginPeriod","kind":"function","vis":"private","declare":true,"signature":"Private Declare PtrSafe Function timeBeginPeriod Lib \"winmm\" (ByVal uPeriod As Long) As Long","returnType":"Long"}, + {"name":"timeEndPeriod","kind":"function","vis":"private","declare":true,"signature":"Private Declare PtrSafe Function timeEndPeriod Lib \"winmm\" (ByVal uPeriod As Long) As Long","returnType":"Long"} + ] + }, + { + "name": "ClassStyles", + "kind": "enum", + "in": "ModMain", + "vis": "private", + "public": false, + "file": "GdiPlusTest.twin", + "signature": "Private Enum ClassStyles", + "values": [ + {"name":"CS_VREDRAW","value":"&H0001"}, + {"name":"CS_HREDRAW","value":"&H0002"}, + {"name":"CS_DBLCLKS","value":"&H0008"}, + {"name":"CS_OWNDC","value":"&H0020"}, + {"name":"CS_CLASSDC","value":"&H0040"}, + {"name":"CS_PARENTDC","value":"&H0080"}, + {"name":"CS_NOCLOSE","value":"&H0200"}, + {"name":"CS_SAVEBITS","value":"&H0800"}, + {"name":"CS_BYTEALIGNCLIENT","value":"&H1000"}, + {"name":"CS_BYTEALIGNWINDOW","value":"&H2000"}, + {"name":"CS_GLOBALCLASS","value":"&H4000"}, + {"name":"CS_IME","value":"&H00010000"}, + {"name":"CS_DROPSHADOW","value":"&H00020000"} + ] + }, + { + "name": "DefCursors", + "kind": "enum", + "in": "ModMain", + "vis": "private", + "public": false, + "file": "GdiPlusTest.twin", + "signature": "Private Enum DefCursors", + "values": [ + {"name":"IDC_ARROW","value":"32512&"}, + {"name":"IDC_IBEAM","value":"32513&"}, + {"name":"IDC_WAIT","value":"32514&"}, + {"name":"IDC_CROSS","value":"32515&"}, + {"name":"IDC_UPARROW","value":"32516&"}, + {"name":"IDC_SIZE","value":"32640&"}, + {"name":"IDC_ICON","value":"32641&"}, + {"name":"IDC_SIZENWSE","value":"32642&"}, + {"name":"IDC_SIZENESW","value":"32643&"}, + {"name":"IDC_SIZEWE","value":"32644&"}, + {"name":"IDC_SIZENS","value":"32645&"}, + {"name":"IDC_SIZEALL","value":"32646&"}, + {"name":"IDC_NO","value":"32648&"}, + {"name":"IDC_HAND","value":"32649&"}, + {"name":"IDC_APPSTARTING","value":"32650&"}, + {"name":"IDC_HELP","value":"32651&"}, + {"name":"IDC_WAITCD","value":"32663&"}, + {"name":"IDC_PIN","value":"32671&"}, + {"name":"IDC_PERSON","value":"32672&"}, + {"name":"IDC_PEN","value":"32631&"}, + {"name":"IDC_SCROLLNS","value":"32652&"}, + {"name":"IDC_SCROLLWE","value":"32653&"}, + {"name":"IDC_SCROLLALL","value":"32654&"}, + {"name":"IDC_SCROLLN","value":"32655&"}, + {"name":"IDC_SCROLLS","value":"32656&"}, + {"name":"IDC_SCROLLW","value":"32657&"}, + {"name":"IDC_SCROLLE","value":"32658&"}, + {"name":"IDC_SCROLLNW","value":"32659&"}, + {"name":"IDC_SCROLLNE","value":"32660&"}, + {"name":"IDC_SCROLLSW","value":"32661&"}, + {"name":"IDC_SCROLLSE","value":"32662&"} + ] + }, + { + "name": "MSG", + "kind": "type", + "in": "ModMain", + "vis": "private", + "public": false, + "file": "GdiPlusTest.twin", + "signature": "Private Type MSG", + "fields": [ + {"name":"hWnd","vis":"public","signature":"hWnd As LongPtr"}, + {"name":"message","vis":"public","signature":"message As Long"}, + {"name":"wParam","vis":"public","signature":"wParam As LongPtr"}, + {"name":"lParam","vis":"public","signature":"lParam As LongPtr"}, + {"name":"Time","vis":"public","signature":"Time As Long"}, + {"name":"PT","vis":"public","signature":"PT As GDIP_POINT"} + ], + "members": [] + }, + { + "name": "SYSTEMTIME", + "kind": "type", + "in": "ModMain", + "vis": "private", + "public": false, + "file": "GdiPlusTest.twin", + "signature": "Private Type SYSTEMTIME", + "fields": [ + {"name":"wYear","vis":"public","signature":"wYear%"}, + {"name":"wMonth","vis":"public","signature":"wMonth%"}, + {"name":"wDayOfWeek","vis":"public","signature":"wDayOfWeek%"}, + {"name":"wDay","vis":"public","signature":"wDay%"}, + {"name":"wHour","vis":"public","signature":"wHour%"}, + {"name":"wMinute","vis":"public","signature":"wMinute%"}, + {"name":"wSecond","vis":"public","signature":"wSecond%"}, + {"name":"wMilliseconds","vis":"public","signature":"wMilliseconds%"} + ], + "members": [] + }, + { + "name": "WNDCLASS", + "kind": "type", + "in": "ModMain", + "vis": "private", + "public": false, + "file": "GdiPlusTest.twin", + "signature": "Private Type WNDCLASS", + "fields": [ + {"name":"style","vis":"public","signature":"style As ClassStyles"}, + {"name":"lpfnWndProc","vis":"public","signature":"lpfnWndProc As LongPtr"}, + {"name":"cbClsExtra","vis":"public","signature":"cbClsExtra As Long"}, + {"name":"cbWndExtra","vis":"public","signature":"cbWndExtra As Long"}, + {"name":"hInstance","vis":"public","signature":"hInstance As LongPtr"}, + {"name":"hIcon","vis":"public","signature":"hIcon As LongPtr"}, + {"name":"hCursor","vis":"public","signature":"hCursor As LongPtr"}, + {"name":"hbrBackground","vis":"public","signature":"hbrBackground As LongPtr"}, + {"name":"lpszMenuName","vis":"public","signature":"lpszMenuName As LongPtr"}, + {"name":"lpszClassName","vis":"public","signature":"lpszClassName As LongPtr"} + ], + "members": [] + }, + { + "name": "WindowMessages", + "kind": "enum", + "in": "ModMain", + "vis": "private", + "public": false, + "file": "GdiPlusTest.twin", + "signature": "Private Enum WindowMessages", + "values": [ + {"name":"WM_CREATE","value":"&H0001"}, + {"name":"WM_DESTROY","value":"&H0002"}, + {"name":"WM_ERASEBKGND","value":"&H0014"}, + {"name":"WM_PAINT","value":"&H000F"}, + {"name":"WM_SIZE","value":"&H0005"}, + {"name":"WM_TIMER","value":"&H0113"} + ] + }, + { + "name": "WindowStyles", + "kind": "enum", + "in": "ModMain", + "vis": "private", + "public": false, + "file": "GdiPlusTest.twin", + "signature": "Private Enum WindowStyles", + "values": [ + {"name":"WS_OVERLAPPED","value":"&H00000000"}, + {"name":"WS_POPUP","value":"&H80000000"}, + {"name":"WS_CHILD","value":"&H40000000"}, + {"name":"WS_MINIMIZE","value":"&H20000000"}, + {"name":"WS_VISIBLE","value":"&H10000000"}, + {"name":"WS_DISABLED","value":"&H08000000"}, + {"name":"WS_CLIPSIBLINGS","value":"&H04000000"}, + {"name":"WS_CLIPCHILDREN","value":"&H02000000"}, + {"name":"WS_MAXIMIZE","value":"&H01000000"}, + {"name":"WS_BORDER","value":"&H00800000"}, + {"name":"WS_DLGFRAME","value":"&H00400000"}, + {"name":"WS_VSCROLL","value":"&H00200000"}, + {"name":"WS_HSCROLL","value":"&H00100000"}, + {"name":"WS_SYSMENU","value":"&H00080000"}, + {"name":"WS_THICKFRAME","value":"&H00040000"}, + {"name":"WS_GROUP","value":"&H00020000"}, + {"name":"WS_TABSTOP","value":"&H00010000"}, + {"name":"WS_MINIMIZEBOX","value":"&H00020000"}, + {"name":"WS_MAXIMIZEBOX","value":"&H00010000"}, + {"name":"WS_CAPTION","value":"(WS_BORDER Or WS_DLGFRAME)"}, + {"name":"WS_TILED","value":"WS_OVERLAPPED"}, + {"name":"WS_ICONIC","value":"WS_MINIMIZE"}, + {"name":"WS_SIZEBOX","value":"WS_THICKFRAME"}, + {"name":"WS_OVERLAPPEDWINDOW","value":"WS_OVERLAPPED Or WS_CAPTION Or WS_SYSMENU Or WS_THICKFRAME Or WS_MINIMIZEBOX Or WS_MAXIMIZEBOX"}, + {"name":"WS_TILEDWINDOW","value":"WS_OVERLAPPEDWINDOW"}, + {"name":"WS_POPUPWINDOW","value":"WS_POPUP Or WS_BORDER Or WS_SYSMENU"}, + {"name":"WS_CHILDWINDOW","value":"WS_CHILD"}, + {"name":"WS_GT","value":"(WS_GROUP Or WS_TABSTOP)"} + ] + }, + { + "name": "WindowStylesEx", + "kind": "enum", + "in": "ModMain", + "vis": "private", + "public": false, + "file": "GdiPlusTest.twin", + "signature": "Private Enum WindowStylesEx", + "values": [ + {"name":"WS_EX_DLGMODALFRAME","value":"&H00000001"}, + {"name":"WS_EX_NOPARENTNOTIFY","value":"&H00000004"}, + {"name":"WS_EX_TOPMOST","value":"&H00000008"}, + {"name":"WS_EX_ACCEPTFILES","value":"&H00000010"}, + {"name":"WS_EX_TRANSPARENT","value":"&H00000020"}, + {"name":"WS_EX_MDICHILD","value":"&H00000040"}, + {"name":"WS_EX_TOOLWINDOW","value":"&H00000080"}, + {"name":"WS_EX_WINDOWEDGE","value":"&H00000100"}, + {"name":"WS_EX_CLIENTEDGE","value":"&H00000200"}, + {"name":"WS_EX_CONTEXTHELP","value":"&H00000400"}, + {"name":"WS_EX_RIGHT","value":"&H00001000"}, + {"name":"WS_EX_LEFT","value":"&H00000000"}, + {"name":"WS_EX_RTLREADING","value":"&H00002000"}, + {"name":"WS_EX_LTRREADING","value":"&H00000000"}, + {"name":"WS_EX_LEFTSCROLLBAR","value":"&H00004000"}, + {"name":"WS_EX_RIGHTSCROLLBAR","value":"&H00000000"}, + {"name":"WS_EX_CONTROLPARENT","value":"&H00010000"}, + {"name":"WS_EX_STATICEDGE","value":"&H00020000"}, + {"name":"WS_EX_APPWINDOW","value":"&H00040000"}, + {"name":"WS_EX_OVERLAPPEDWINDOW","value":"(WS_EX_WINDOWEDGE Or WS_EX_CLIENTEDGE)"}, + {"name":"WS_EX_PALETTEWINDOW","value":"(WS_EX_WINDOWEDGE Or WS_EX_TOOLWINDOW Or WS_EX_TOPMOST)"}, + {"name":"WS_EX_LAYERED","value":"&H00080000"}, + {"name":"WS_EX_NOINHERITLAYOUT","value":"&H00100000"}, + {"name":"WS_EX_NOREDIRECTIONBITMAP","value":"&H00200000"}, + {"name":"WS_EX_LAYOUTRTL","value":"&H00400000"}, + {"name":"WS_EX_COMPOSITED","value":"&H02000000"}, + {"name":"WS_EX_NOACTIVATE","value":"&H08000000"} + ] + }, + { + "name": "eSHOWWINDOW", + "kind": "enum", + "in": "ModMain", + "vis": "private", + "public": false, + "file": "GdiPlusTest.twin", + "signature": "Private Enum eSHOWWINDOW", + "values": [ + {"name":"SW_HIDE","value":"0"}, + {"name":"SW_SHOWNORMAL","value":"1"}, + {"name":"SW_NORMAL","value":"1"}, + {"name":"SW_SHOWMINIMIZED","value":"2"}, + {"name":"SW_SHOWMAXIMIZED","value":"3"}, + {"name":"SW_MAXIMIZE","value":"3"}, + {"name":"SW_SHOWNOACTIVATE","value":"4"}, + {"name":"SW_SHOW","value":"5"}, + {"name":"SW_MINIMIZE","value":"6"}, + {"name":"SW_SHOWMINNOACTIVE","value":"7"}, + {"name":"SW_SHOWNA","value":"8"}, + {"name":"SW_RESTORE","value":"9"}, + {"name":"SW_SHOWDEFAULT","value":"10"}, + {"name":"SW_FORCEMINIMIZE","value":"11"}, + {"name":"SW_MAX","value":"11"} + ] + }, + { + "name": "Native", + "kind": "module", + "vis": "public", + "file": "GdiPlus/Native.twin", + "signature": "Module Native", + "members": [ + {"name":"GetNative","kind":"function","vis":"public","signature":"Function GetNative(for As GraphicsPath) As GpPath","returnType":"GpPath"}, + {"name":"GetNative","kind":"function","vis":"public","signature":"Function GetNative(for As Graphics) As GpGraphics","returnType":"GpGraphics"}, + {"name":"GetNative","kind":"function","vis":"public","signature":"Public Function GetNative(for As Region) As GpRegion","returnType":"GpRegion"}, + {"name":"GetNative","kind":"function","vis":"public","signature":"Function GetNative(for As Matrix) As GpMatrix","returnType":"GpMatrix"}, + {"name":"GetNative","kind":"function","vis":"public","signature":"Function GetNative(for As Effect) As GpEffect","returnType":"GpEffect"}, + {"name":"GetNative","kind":"function","vis":"public","signature":"Function GetNative(for As Metafile) As GpMetafile","returnType":"GpMetafile"}, + {"name":"GetNative","kind":"function","vis":"public","signature":"Function GetNative(for As Brush) As GpBrush","returnType":"GpBrush"}, + {"name":"GetNative","kind":"function","vis":"public","signature":"Public Function GetNative(for As Font) As GpFont","returnType":"GpFont"}, + {"name":"GetNative","kind":"function","vis":"public","signature":"Public Function GetNative(for As TextureBrush) As GpTexture","returnType":"GpTexture"}, + {"name":"GetNative","kind":"function","vis":"public","signature":"Public Function GetNative(for As SolidBrush) As GpSolidFill","returnType":"GpSolidFill"}, + {"name":"GetNative","kind":"function","vis":"public","signature":"Public Function GetNative(for As LinearGradientBrush) As GpLineGradient","returnType":"GpLineGradient"}, + {"name":"GetNative","kind":"function","vis":"public","signature":"Public Function GetNative(for As PathGradientBrush) As GpPathGradient","returnType":"GpPathGradient"}, + {"name":"GetNative","kind":"function","vis":"public","signature":"Public Function GetNative(for As HatchBrush) As GpHatch","returnType":"GpHatch"}, + {"name":"GetNative","kind":"function","vis":"public","signature":"Public Function GetNative(for As CustomLineCap) As GpCustomLineCap","returnType":"GpCustomLineCap"}, + {"name":"GetNative","kind":"function","vis":"public","signature":"Public Function GetNative(for As ArrowCap) As GpArrowCap","returnType":"GpArrowCap"}, + {"name":"GetNative","kind":"function","vis":"public","signature":"Public Function GetNative(for As Bitmap) As GpBitmap","returnType":"GpBitmap"}, + {"name":"GetNative","kind":"function","vis":"public","signature":"Public Function GetNative(for As PathIterator) As GpPathIterator","returnType":"GpPathIterator"}, + {"name":"GetNative","kind":"function","vis":"public","signature":"Public Function GetNative(for As FontCollection) As GpFontCollection","returnType":"GpFontCollection"}, + {"name":"GetNative","kind":"function","vis":"public","signature":"Public Function GetNative(for As InstalledFontCollection) As GpInstalledFontCollection","returnType":"GpInstalledFontCollection"}, + {"name":"GetNative","kind":"function","vis":"public","signature":"Public Function GetNative(for As PrivateFontCollection) As GpPrivateFontCollection","returnType":"GpPrivateFontCollection"}, + {"name":"GetNative","kind":"function","vis":"public","signature":"Public Function GetNative(for As FontFamily) As GpFontFamily","returnType":"GpFontFamily"}, + {"name":"GetNative","kind":"function","vis":"public","signature":"Public Function GetNative(for As StringFormat) As GpStringFormat","returnType":"GpStringFormat"}, + {"name":"GetNative","kind":"function","vis":"public","signature":"Function GetNative(image As Image) As GpImage","returnType":"GpImage"}, + {"name":"GetNative","kind":"function","vis":"public","signature":"Public Function GetNative(for As ImageAttributes) As GpImageAttributes","returnType":"GpImageAttributes"}, + {"name":"GetNative","kind":"function","vis":"public","signature":"Public Function GetNative(for As Pen) As GpPen","returnType":"GpPen"}, + {"name":"GetNative","kind":"function","vis":"public","signature":"Public Function GetNative(for As CachedBitmap) As GpCachedBitmap","returnType":"GpCachedBitmap"} + ] + }, + { + "name": "PathData", + "kind": "class", + "vis": "public", + "file": "GdiPlus/PathData.twin", + "signature": "Class PathData", + "inherits": ["GdiPlusBase"], + "attrs": [{"name":"COMCreatable","args":"False"}], + "members": [ + {"name":"Allocate","kind":"function","vis":"public","signature":"Function Allocate(ByVal Count&) As GpStatus","returnType":"GpStatus"}, + {"name":"Class_Terminate","kind":"sub","vis":"public","signature":"Sub Class_Terminate()"}, + {"name":"Count","kind":"property","vis":"public","signature":"Property Get Count() As Long","returnType":"Long","accessor":"Get"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New()"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(ByVal count&)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(points() As TypedPoint)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(pathData As GpPathData)"}, + {"name":"Point","kind":"property","vis":"public","signature":"Property Get Point(ByVal index&) As GpPointF","returnType":"GpPointF","accessor":"Get"}, + {"name":"Point","kind":"property","vis":"public","signature":"Property Let Point(ByVal index&, ByVal point As GpPointF)","accessor":"Let"}, + {"name":"Points","kind":"function","vis":"public","signature":"Function Points() As GpPointF()","returnType":"GpPointF()","description":"Returns a view into the points array.\nThe view is valid only as long as the PathData exists."}, + {"name":"PointsPtr","kind":"property","vis":"public","signature":"Property Get PointsPtr() As LongPtr","returnType":"LongPtr","accessor":"Get"}, + {"name":"Type","kind":"property","vis":"public","signature":"Property Get Type(ByVal index&) As PathPointType","returnType":"PathPointType","accessor":"Get"}, + {"name":"Type","kind":"property","vis":"public","signature":"Property Let Type(ByVal index&, ByVal type As PathPointType)","accessor":"Let"}, + {"name":"TypedPoint","kind":"property","vis":"public","signature":"Property Get TypedPoint(ByVal index&) As TypedPoint","returnType":"TypedPoint","accessor":"Get"}, + {"name":"TypedPoint","kind":"property","vis":"public","signature":"Property Let TypedPoint(ByVal index&, point As TypedPoint)","accessor":"Let"}, + {"name":"TypedPoints","kind":"function","vis":"public","signature":"Function TypedPoints() As TypedPoint()","returnType":"TypedPoint()"}, + {"name":"Types","kind":"function","vis":"public","signature":"Function Types() As PathPointType()","returnType":"PathPointType()","description":"Returns a view into the types array.\nThe view is valid only as long as the PathData exists"}, + {"name":"TypesPtr","kind":"property","vis":"public","signature":"Property Get TypesPtr() As LongPtr","returnType":"LongPtr","accessor":"Get"}, + {"name":"pd","kind":"field","vis":"public","signature":"Public pd As GpPathData"} + ] + }, + { + "name": "PathGradientBrush", + "kind": "class", + "vis": "public", + "file": "GdiPlus/PathGradientBrush.twin", + "signature": "Class PathGradientBrush", + "inherits": ["GdiPlusBase"], + "implements": ["IBrush","ITransformable"], + "attrs": [{"name":"COMCreatable","args":"False"}], + "members": [ + {"name":"BlendCount","kind":"property","vis":"public","signature":"Property Get BlendCount() As Long","returnType":"Long","accessor":"Get"}, + {"name":"CenterColor","kind":"property","vis":"public","signature":"Property Get CenterColor() As Color","returnType":"Color","accessor":"Get"}, + {"name":"CenterColor","kind":"property","vis":"public","signature":"Property Let CenterColor(ByVal color As Color)","accessor":"Let"}, + {"name":"CenterPoint","kind":"property","vis":"public","signature":"Property Get CenterPoint() As GpPointF","returnType":"GpPointF","accessor":"Get"}, + {"name":"CenterPoint","kind":"property","vis":"public","signature":"Property Let CenterPoint(point As GpPointF)","accessor":"Let"}, + {"name":"CenterPointI","kind":"property","vis":"public","signature":"Property Get CenterPointI() As GpPoint","returnType":"GpPoint","accessor":"Get"}, + {"name":"CenterPointI","kind":"property","vis":"public","signature":"Property Let CenterPointI(point As GpPoint)","accessor":"Let"}, + {"name":"CenterRGB","kind":"property","vis":"public","signature":"Property Let CenterRGB(ByVal rgb&)","accessor":"Let"}, + {"name":"Class_Terminate","kind":"sub","vis":"private","signature":"Private Sub Class_Terminate()"}, + {"name":"Clone","kind":"function","vis":"public","signature":"Function Clone() As PathGradientBrush","returnType":"PathGradientBrush"}, + {"name":"CloneBrush","kind":"function","vis":"public","signature":"Function CloneBrush() As IBrush Implements IBrush.CloneBrush","returnType":"IBrush"}, + {"name":"GammaCorrection","kind":"property","vis":"public","signature":"Property Let GammaCorrection(ByVal useGammaCorrection As Boolean)","accessor":"Let"}, + {"name":"GammaCorrection","kind":"property","vis":"public","signature":"Property Get GammaCorrection() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"GetBlend","kind":"function","vis":"public","signature":"Function GetBlend(blendFactors() As Single, blendPositions() As Single) As GpStatus","returnType":"GpStatus"}, + {"name":"GetFocusScales","kind":"function","vis":"public","signature":"Function GetFocusScales(xScale!, yScale!) As GpStatus","returnType":"GpStatus"}, + {"name":"GetInterpolationColors","kind":"function","vis":"public","signature":"Function GetInterpolationColors(presetColors() As Color, blendPositions!()) As GpStatus","returnType":"GpStatus"}, + {"name":"GetTransform","kind":"function","vis":"public","signature":"Function GetTransform(outMatrix As Matrix) As GpStatus Implements ITransformable.GetTransform","returnType":"GpStatus"}, + {"name":"GraphicsPath","kind":"property","vis":"public","signature":"Property Get GraphicsPath() As GraphicsPath","returnType":"GraphicsPath","accessor":"Get"}, + {"name":"GraphicsPath","kind":"property","vis":"public","signature":"Property Let GraphicsPath(path As GraphicsPath)","accessor":"Let"}, + {"name":"InterpolationColorCount","kind":"property","vis":"public","signature":"Property Get InterpolationColorCount() As Long","returnType":"Long","accessor":"Get"}, + {"name":"MultiplyTransform","kind":"function","vis":"public","signature":"Function MultiplyTransform(matrix As Matrix, ByVal order As GpMatrixOrder = matrixorderprepend) As GpStatus Implements ITransformable.MultiplyTransform","returnType":"GpStatus"}, + {"name":"Native","kind":"property","vis":"protected","signature":"Protected Property Get Native() As GpPathGradient","returnType":"GpPathGradient","accessor":"Get"}, + {"name":"NativeBrush","kind":"property","vis":"public","signature":"Property Get NativeBrush() As GpBrush Implements IBrush.NativeBrush","returnType":"GpBrush","accessor":"Get"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(points() As GpPointF, ByVal wrapMode As GpWrapMode = WrapModeClamp)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(points() As GpPoint, ByVal wrapMode As GpWrapMode = WrapModeClamp)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(path As GraphicsPath)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(ByVal nativeBrush As GpPathGradient, ByVal status As GpStatus = ok)"}, + {"name":"PointCount","kind":"property","vis":"public","signature":"Property Get PointCount() As Long","returnType":"Long","accessor":"Get"}, + {"name":"Rectangle","kind":"property","vis":"public","signature":"Property Get Rectangle() As GpRectF","returnType":"GpRectF","accessor":"Get"}, + {"name":"RectangleI","kind":"property","vis":"public","signature":"Property Get RectangleI() As GpRect","returnType":"GpRect","accessor":"Get"}, + {"name":"ResetTransform","kind":"function","vis":"public","signature":"Function ResetTransform() As GpStatus Implements ITransformable.ResetTransform","returnType":"GpStatus"}, + {"name":"RotateTransform","kind":"function","vis":"public","signature":"Function RotateTransform(ByVal angle!, ByVal order As GpMatrixOrder = matrixorderprepend) As GpStatus Implements ITransformable.RotateTransform","returnType":"GpStatus"}, + {"name":"RotateTransformAt","kind":"function","vis":"public","signature":"Function RotateTransformAt(ByVal angle!, ByVal center As GpPointF, ByVal order As GpMatrixOrder = MatrixOrderPrepend) As GpStatus Implements ITransformable.RotateTransformAt","returnType":"GpStatus"}, + {"name":"ScaleTransform","kind":"function","vis":"public","signature":"Function ScaleTransform(ByVal sx!, ByVal sy!, ByVal order As GpMatrixOrder = matrixorderprepend) As GpStatus Implements ITransformable.ScaleTransform","returnType":"GpStatus"}, + {"name":"SetBlend","kind":"function","vis":"public","signature":"Function SetBlend(blendFactors() As Single, blendPositions() As Single) As GpStatus","returnType":"GpStatus"}, + {"name":"SetBlendBellShape","kind":"function","vis":"public","signature":"Function SetBlendBellShape(ByVal focus!, scale! = 1.0) As GpStatus","returnType":"GpStatus"}, + {"name":"SetBlendTriangularShape","kind":"function","vis":"public","signature":"Function SetBlendTriangularShape(ByVal focus!, scale! = 1.0) As GpStatus","returnType":"GpStatus"}, + {"name":"SetFocusScales","kind":"function","vis":"public","signature":"Function SetFocusScales(ByVal xScale!, ByVal yScale!) As GpStatus","returnType":"GpStatus"}, + {"name":"SetInterpolationColors","kind":"function","vis":"public","signature":"Function SetInterpolationColors(presetColors() As Color, blendPositions!()) As GpStatus","returnType":"GpStatus"}, + {"name":"ShearTransform","kind":"function","vis":"public","signature":"Function ShearTransform(ByVal shearX!, ByVal shearY!, ByVal order As GpMatrixOrder = MatrixOrderPrepend) As GpStatus Implements ITransformable.ShearTransform","returnType":"GpStatus"}, + {"name":"SurroundColorCount","kind":"property","vis":"public","signature":"Property Get SurroundColorCount() As Long","returnType":"Long","accessor":"Get"}, + {"name":"SurroundColors","kind":"property","vis":"public","signature":"Property Get SurroundColors() As Color()","returnType":"Color()","accessor":"Get"}, + {"name":"SurroundColors","kind":"property","vis":"public","signature":"Property Let SurroundColors(colors() As Color)","accessor":"Let"}, + {"name":"Transform","kind":"property","vis":"public","signature":"Property Get Transform() As Matrix Implements ITransformable.Transform","returnType":"Matrix","accessor":"Get"}, + {"name":"Transform","kind":"property","vis":"public","signature":"Property Let Transform(matrix As Matrix) Implements ITransformable.Transform","accessor":"Let"}, + {"name":"TranslateTransform","kind":"function","vis":"public","signature":"Function TranslateTransform(ByVal delta As GpPointF, ByVal order As GpMatrixOrder = MatrixOrderPrepend) As GpStatus Implements ITransformable.TranslateTransform","returnType":"GpStatus"}, + {"name":"TranslateTransform","kind":"function","vis":"public","signature":"Function TranslateTransform(ByVal dx!, ByVal dy!, ByVal order As GpMatrixOrder = matrixorderprepend) As GpStatus Implements ITransformable.TranslateTransform","returnType":"GpStatus"}, + {"name":"Type","kind":"property","vis":"public","signature":"Property Get Type() As GpBrushType Implements IBrush.Type","returnType":"GpBrushType","accessor":"Get"}, + {"name":"WrapMode","kind":"property","vis":"public","signature":"Property Get WrapMode() As GpWrapMode","returnType":"GpWrapMode","accessor":"Get"}, + {"name":"WrapMode","kind":"property","vis":"public","signature":"Property Let WrapMode(ByVal wrapmode As GpWrapMode)","accessor":"Let"}, + {"name":"br","kind":"field","vis":"protected","signature":"Protected br As GpPathGradient"} + ] + }, + { + "name": "PathIterator", + "kind": "class", + "vis": "public", + "file": "GdiPlus/PathIterator.twin", + "signature": "Class PathIterator", + "inherits": ["GdiPlusBase"], + "attrs": [{"name":"COMCreatable","args":"False"}], + "members": [ + {"name":"Class_Terminate","kind":"sub","vis":"public","signature":"Sub Class_Terminate()"}, + {"name":"CopyData","kind":"function","vis":"public","signature":"Function CopyData(ByVal startIndex&, ByVal endIndex&) As TypedPoints","returnType":"TypedPoints","description":"⛔ Deprecated. Use Enumerate with startIndex and endIndex arguments instead."}, + {"name":"CopyData","kind":"function","vis":"public","signature":"Function CopyData(points() As GpPointF, types() As PathPointType, ByVal startIndex&, ByVal endIndex&) As Long","returnType":"Long","description":"⛔ Deprecated. Use Enumerate with startIndex and endIndex arguments instead."}, + {"name":"Count","kind":"property","vis":"public","signature":"Property Get Count() As Long","returnType":"Long","accessor":"Get"}, + {"name":"Enumerate","kind":"function","vis":"public","signature":"Function Enumerate(ByVal startIndex& = -1, ByVal endIndex& = -1) As TypedPoints","returnType":"TypedPoints"}, + {"name":"Enumerate","kind":"function","vis":"public","signature":"Function Enumerate(points() As GpPointF, types() As PathPointType, ByVal startIndex& = -1, ByVal endIndex& = -1) As Long","returnType":"Long"}, + {"name":"HasCurve","kind":"property","vis":"public","signature":"Property Get HasCurve() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"Native","kind":"property","vis":"protected","signature":"Protected Property Get Native() As GpPathIterator","returnType":"GpPathIterator","accessor":"Get"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(path As GraphicsPath)"}, + {"name":"New","kind":"sub","vis":"protected","signature":"Protected Sub New(ByVal nativeIterator As GpPathIterator)"}, + {"name":"NextMarker","kind":"function","vis":"public","signature":"Function NextMarker() As Marker","returnType":"Marker"}, + {"name":"NextMarker","kind":"function","vis":"public","signature":"Function NextMarker(startIndex&, endIndex&) As Long","returnType":"Long"}, + {"name":"NextMarkerPath","kind":"function","vis":"public","signature":"Function NextMarkerPath() As MarkerPath","returnType":"MarkerPath"}, + {"name":"NextMarkerPath","kind":"function","vis":"public","signature":"Function NextMarkerPath(path As GraphicsPath) As Long","returnType":"Long"}, + {"name":"NextPathType","kind":"function","vis":"public","signature":"Function NextPathType() As PathType","returnType":"PathType"}, + {"name":"NextPathType","kind":"function","vis":"public","signature":"Function NextPathType(pathType As PathPointType, startIndex&, endIndex&) As Long","returnType":"Long"}, + {"name":"NextSubpath","kind":"function","vis":"public","signature":"Function NextSubpath() As SubPath","returnType":"SubPath"}, + {"name":"NextSubpath","kind":"function","vis":"public","signature":"Function NextSubpath(startIndex&, endIndex&, isClosed As Boolean) As Long","returnType":"Long"}, + {"name":"NextSubpathPath","kind":"function","vis":"public","signature":"Function NextSubpathPath() As SubPathPath","returnType":"SubPathPath"}, + {"name":"NextSubpathPath","kind":"function","vis":"public","signature":"Function NextSubpathPath(path As GraphicsPath, isClosed As Boolean) As Long","returnType":"Long"}, + {"name":"Rewind","kind":"function","vis":"public","signature":"Function Rewind() As GpStatus","returnType":"GpStatus"}, + {"name":"SubpathCount","kind":"property","vis":"public","signature":"Property Get SubpathCount() As Long","returnType":"Long","accessor":"Get"}, + {"name":"pi","kind":"field","vis":"private","signature":"Dim pi As GpPathIterator"} + ] + }, + { + "name": "Pen", + "kind": "class", + "vis": "public", + "file": "GdiPlus/Pen.twin", + "signature": "Class Pen", + "inherits": ["GdiPlusBase"], + "attrs": [{"name":"COMCreatable","args":"False"}], + "members": [ + {"name":"Alignment","kind":"property","vis":"public","signature":"Property Let Alignment(ByVal penAlignment As GpPenAlignment)","accessor":"Let"}, + {"name":"Alignment","kind":"property","vis":"public","signature":"Property Get Alignment() As GpPenAlignment","returnType":"GpPenAlignment","accessor":"Get"}, + {"name":"Brush","kind":"property","vis":"public","signature":"Property Let Brush(brush As Brush)","accessor":"Let"}, + {"name":"Brush","kind":"property","vis":"public","signature":"Property Get Brush() As Brush","returnType":"Brush","accessor":"Get"}, + {"name":"Caps","kind":"property","vis":"public","signature":"Property Let Caps(ByVal bothCaps As GpLineCap)","accessor":"Let"}, + {"name":"Class_Terminate","kind":"sub","vis":"private","signature":"Private Sub Class_Terminate()"}, + {"name":"Clone","kind":"function","vis":"public","signature":"Function Clone() As Pen","returnType":"Pen"}, + {"name":"Color","kind":"property","vis":"public","signature":"Property Let Color(ByVal color As Color)","accessor":"Let"}, + {"name":"Color","kind":"property","vis":"public","signature":"Property Get Color() As Color","returnType":"Color","accessor":"Get"}, + {"name":"CompoundArray","kind":"property","vis":"public","signature":"Property Get CompoundArray() As Single()","returnType":"Single()","accessor":"Get"}, + {"name":"CompoundArray","kind":"property","vis":"public","signature":"Property Let CompoundArray(compoundArray() As Single)","accessor":"Let"}, + {"name":"CompoundArrayCount","kind":"property","vis":"public","signature":"Property Get CompoundArrayCount() As Long","returnType":"Long","accessor":"Get"}, + {"name":"CustomEndCap","kind":"property","vis":"public","signature":"Property Let CustomEndCap(customCap As CustomLineCap)","accessor":"Let"}, + {"name":"CustomEndCap","kind":"property","vis":"public","signature":"Property Get CustomEndCap() As CustomLineCap","returnType":"CustomLineCap","accessor":"Get"}, + {"name":"CustomStartCap","kind":"property","vis":"public","signature":"Property Let CustomStartCap(customCap As CustomLineCap)","accessor":"Let"}, + {"name":"CustomStartCap","kind":"property","vis":"public","signature":"Property Get CustomStartCap() As CustomLineCap","returnType":"CustomLineCap","accessor":"Get"}, + {"name":"DashCap","kind":"property","vis":"public","signature":"Property Let DashCap(ByVal dashCap As GpLineCap)","accessor":"Let"}, + {"name":"DashCap","kind":"property","vis":"public","signature":"Property Get DashCap() As GpLineCap","returnType":"GpLineCap","accessor":"Get"}, + {"name":"DashOffset","kind":"property","vis":"public","signature":"Property Get DashOffset() As Single","returnType":"Single","accessor":"Get"}, + {"name":"DashOffset","kind":"property","vis":"public","signature":"Property Let DashOffset(ByVal offset!)","accessor":"Let"}, + {"name":"DashPattern","kind":"property","vis":"public","signature":"Property Let DashPattern(dashArray!())","accessor":"Let"}, + {"name":"DashPattern","kind":"property","vis":"public","signature":"Property Get DashPattern() As Single()","returnType":"Single()","accessor":"Get"}, + {"name":"DashPatternCount","kind":"property","vis":"public","signature":"Property Get DashPatternCount() As Long","returnType":"Long","accessor":"Get"}, + {"name":"DashStyle","kind":"property","vis":"public","signature":"Property Get DashStyle() As GpDashStyle","returnType":"GpDashStyle","accessor":"Get"}, + {"name":"DashStyle","kind":"property","vis":"public","signature":"Property Let DashStyle(ByVal dashStyle As GpDashStyle)","accessor":"Let"}, + {"name":"EndCap","kind":"property","vis":"public","signature":"Property Let EndCap(ByVal endCap As GpLineCap)","accessor":"Let"}, + {"name":"EndCap","kind":"property","vis":"public","signature":"Property Get EndCap() As GpLineCap","returnType":"GpLineCap","accessor":"Get"}, + {"name":"LineJoin","kind":"property","vis":"public","signature":"Property Let LineJoin(ByVal lineJoin As GpLineJoin)","accessor":"Let"}, + {"name":"LineJoin","kind":"property","vis":"public","signature":"Property Get LineJoin() As GpLineJoin","returnType":"GpLineJoin","accessor":"Get"}, + {"name":"MiterLimit","kind":"property","vis":"public","signature":"Property Let MiterLimit(ByVal miterLimit!)","accessor":"Let"}, + {"name":"MiterLimit","kind":"property","vis":"public","signature":"Property Get MiterLimit() As Single","returnType":"Single","accessor":"Get"}, + {"name":"MultiplyTransform","kind":"function","vis":"public","signature":"Function MultiplyTransform(matrix As Matrix, ByVal order As GpMatrixOrder = MatrixOrderPrepend) As GpStatus","returnType":"GpStatus"}, + {"name":"Native","kind":"property","vis":"protected","signature":"Protected Property Get Native() As GpPen","returnType":"GpPen","accessor":"Get"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(ByVal rgb As Long, ByVal width! = 1.0!, ByVal unit As GpUnit = UnitWorld)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(ByVal color As Color, ByVal width! = 1.0!, ByVal unit As GpUnit = UnitWorld)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(brush As Brush, ByVal width! = 1.0!)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(ByVal nativePen As GpPen, status As GpStatus = Ok)"}, + {"name":"PenType","kind":"property","vis":"public","signature":"Property Get PenType() As GpPenType","returnType":"GpPenType","accessor":"Get"}, + {"name":"RGB","kind":"property","vis":"public","signature":"Property Let RGB(ByVal rgb&)","accessor":"Let"}, + {"name":"RGB","kind":"property","vis":"public","signature":"Property Get RGB() As Long","returnType":"Long","accessor":"Get"}, + {"name":"ResetTransform","kind":"function","vis":"public","signature":"Function ResetTransform() As GpStatus","returnType":"GpStatus"}, + {"name":"RotateTransform","kind":"function","vis":"public","signature":"Function RotateTransform(ByVal angle!, ByVal order As GpMatrixOrder = MatrixOrderPrepend) As GpStatus","returnType":"GpStatus"}, + {"name":"ScaleTransform","kind":"function","vis":"public","signature":"Function ScaleTransform(ByVal sx!, ByVal sy!, ByVal order As GpMatrixOrder = MatrixOrderPrepend) As GpStatus","returnType":"GpStatus"}, + {"name":"Set","kind":"sub","vis":"public","signature":"Sub Set(ByVal color As Color, ByVal width!)"}, + {"name":"Set","kind":"sub","vis":"public","signature":"Sub Set(ByVal rgb&, ByVal width!)"}, + {"name":"SetLineCap","kind":"function","vis":"public","signature":"Function SetLineCap(ByVal startCap As GpLineCap, ByVal endCap As GpLineCap, ByVal dashCap As GpDashCap) As GpStatus","returnType":"GpStatus"}, + {"name":"SetNativePen","kind":"sub","vis":"protected","signature":"Protected Sub SetNativePen(ByVal nativePen As GpPen)"}, + {"name":"StartCap","kind":"property","vis":"public","signature":"Property Let StartCap(ByVal startCap As GpLineCap)","accessor":"Let"}, + {"name":"StartCap","kind":"property","vis":"public","signature":"Property Get StartCap() As GpLineCap","returnType":"GpLineCap","accessor":"Get"}, + {"name":"Transform","kind":"property","vis":"public","signature":"Property Let Transform(matrix As Matrix)","accessor":"Let"}, + {"name":"Transform","kind":"property","vis":"public","signature":"Property Get Transform() As Matrix","returnType":"Matrix","accessor":"Get"}, + {"name":"TranslateTransform","kind":"function","vis":"public","signature":"Function TranslateTransform(ByVal delta As GpPointF, ByVal order As GpMatrixOrder = MatrixOrderPrepend) As GpStatus","returnType":"GpStatus"}, + {"name":"TranslateTransform","kind":"function","vis":"public","signature":"Function TranslateTransform(ByVal dx!, ByVal dy!, ByVal order As GpMatrixOrder = MatrixOrderPrepend) As GpStatus","returnType":"GpStatus"}, + {"name":"Width","kind":"property","vis":"public","signature":"Property Let Width(ByVal width!)","accessor":"Let"}, + {"name":"Width","kind":"property","vis":"public","signature":"Property Get Width() As Single","returnType":"Single","accessor":"Get"}, + {"name":"pn","kind":"field","vis":"private","signature":"Dim pn As GpPen"} + ] + }, + { + "name": "PrivateFontCollection", + "kind": "class", + "vis": "public", + "file": "GdiPlus/PrivateFontCollection.twin", + "signature": "Class PrivateFontCollection", + "inherits": ["FontCollection"], + "attrs": [{"name":"COMCreatable","args":"False"}], + "members": [ + {"name":"AddFontFile","kind":"function","vis":"public","signature":"Function AddFontFile(ByVal filename As String) As GpStatus","returnType":"GpStatus"}, + {"name":"AddMemoryFont","kind":"function","vis":"public","signature":"Function AddMemoryFont(ByVal memAddress As LongPtr, ByVal length&) As GpStatus","returnType":"GpStatus"}, + {"name":"Class_Terminate","kind":"sub","vis":"public","signature":"Sub Class_Terminate()"}, + {"name":"Native","kind":"property","vis":"protected","signature":"Protected Property Get Native() As GpPrivateFontCollection","returnType":"GpPrivateFontCollection","accessor":"Get"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New()"}, + {"name":"New","kind":"sub","vis":"protected","signature":"Protected Sub New(ByVal nativeCollection As GpPrivateFontCollection, ByVal status As GpStatus = Ok)"} + ] + }, + { + "name": "RedEyeCorrection", + "kind": "class", + "vis": "public", + "file": "GdiPlus/Effects.twin", + "signature": "Class RedEyeCorrection", + "inherits": ["Effect"], + "attrs": [{"name":"COMCreatable","args":"False"}], + "members": [ + {"name":"New","kind":"sub","vis":"public","signature":"Sub New()"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(params As RedEyeCorrectionParams)"}, + {"name":"Parameters","kind":"property","vis":"public","signature":"Property Let Parameters(parameters As RedEyeCorrectionParams)","accessor":"Let"}, + {"name":"Parameters","kind":"property","vis":"public","signature":"Property Get Parameters(Optional size As UINT) As RedEyeCorrectionParams","returnType":"RedEyeCorrectionParams","accessor":"Get"} + ] + }, + { + "name": "Region", + "kind": "class", + "vis": "public", + "file": "GdiPlus/Region.twin", + "signature": "Class Region", + "inherits": ["GdiPlusBase"], + "members": [ + {"name":"Bounds","kind":"property","vis":"public","signature":"Property Get Bounds(g As Graphics) As GpRectF","returnType":"GpRectF","accessor":"Get"}, + {"name":"BoundsI","kind":"property","vis":"public","signature":"Property Get BoundsI(g As Graphics) As GpRect","returnType":"GpRect","accessor":"Get"}, + {"name":"Class_Terminate","kind":"sub","vis":"public","signature":"Sub Class_Terminate()"}, + {"name":"Clone","kind":"function","vis":"public","signature":"Function Clone() As Region","returnType":"Region"}, + {"name":"Complement","kind":"function","vis":"public","signature":"Function Complement(rect As GpRect) As GpStatus","returnType":"GpStatus"}, + {"name":"Complement","kind":"function","vis":"public","signature":"Function Complement(rect As GpRectF) As GpStatus","returnType":"GpStatus"}, + {"name":"Complement","kind":"function","vis":"public","signature":"Function Complement(path As GraphicsPath) As GpStatus","returnType":"GpStatus"}, + {"name":"Complement","kind":"function","vis":"public","signature":"Function Complement(region As Region) As GpStatus","returnType":"GpStatus"}, + {"name":"Exclude","kind":"function","vis":"public","signature":"Function Exclude(rect As GpRect) As GpStatus","returnType":"GpStatus"}, + {"name":"Exclude","kind":"function","vis":"public","signature":"Function Exclude(rect As GpRectF) As GpStatus","returnType":"GpStatus"}, + {"name":"Exclude","kind":"function","vis":"public","signature":"Function Exclude(path As GraphicsPath) As GpStatus","returnType":"GpStatus"}, + {"name":"Exclude","kind":"function","vis":"public","signature":"Function Exclude(region As Region) As GpStatus","returnType":"GpStatus"}, + {"name":"GetData","kind":"function","vis":"public","signature":"Function GetData(buffer As Byte, ByVal bufferSize As UINT, Optional sizeFilled&) As GpStatus","returnType":"GpStatus"}, + {"name":"GetDataSize","kind":"function","vis":"public","signature":"Function GetDataSize() As UINT","returnType":"UINT"}, + {"name":"GetHRGN","kind":"function","vis":"public","signature":"Function GetHRGN(g As Graphics) As LongPtr","returnType":"LongPtr"}, + {"name":"GetRegionScans","kind":"function","vis":"public","signature":"Function GetRegionScans(matrix As Matrix) As GpRectF()","returnType":"GpRectF()"}, + {"name":"GetRegionScans","kind":"function","vis":"public","signature":"Function GetRegionScans(matrix As Matrix, rects As GpRectF, ByRef count&) As GpStatus","returnType":"GpStatus"}, + {"name":"GetRegionScans","kind":"function","vis":"public","signature":"Function GetRegionScans(matrix As Matrix, rects As GpRect, ByRef count&) As GpStatus","returnType":"GpStatus"}, + {"name":"GetRegionScansCount","kind":"function","vis":"public","signature":"Function GetRegionScansCount(matrix As Matrix) As UINT","returnType":"UINT"}, + {"name":"GetRegionScansI","kind":"function","vis":"public","signature":"Function GetRegionScansI(matrix As Matrix) As GpRect()","returnType":"GpRect()"}, + {"name":"Intersect","kind":"function","vis":"public","signature":"Function Intersect(rect As GpRect) As GpStatus","returnType":"GpStatus"}, + {"name":"Intersect","kind":"function","vis":"public","signature":"Function Intersect(rect As GpRectF) As GpStatus","returnType":"GpStatus"}, + {"name":"Intersect","kind":"function","vis":"public","signature":"Function Intersect(path As GraphicsPath) As GpStatus","returnType":"GpStatus"}, + {"name":"Intersect","kind":"function","vis":"public","signature":"Function Intersect(region As Region) As GpStatus","returnType":"GpStatus"}, + {"name":"IsEmpty","kind":"function","vis":"public","signature":"Function IsEmpty(g As Graphics) As Boolean","returnType":"Boolean"}, + {"name":"IsEqualTo","kind":"function","vis":"public","signature":"Function IsEqualTo(other As Region, g As Graphics) As Boolean","returnType":"Boolean"}, + {"name":"IsInfinite","kind":"function","vis":"public","signature":"Function IsInfinite(g As Graphics) As Boolean","returnType":"Boolean"}, + {"name":"IsVisible","kind":"function","vis":"public","signature":"Function IsVisible(ByVal point As GpPoint, g As Graphics) As Boolean","returnType":"Boolean"}, + {"name":"IsVisible","kind":"function","vis":"public","signature":"Function IsVisible(ByVal x!, ByVal y!, g As Graphics) As Boolean","returnType":"Boolean"}, + {"name":"IsVisible","kind":"function","vis":"public","signature":"Function IsVisible(ByVal point As GpPointF, g As Graphics) As Boolean","returnType":"Boolean"}, + {"name":"IsVisible","kind":"function","vis":"public","signature":"Function IsVisible(rect As GpRect, g As Graphics) As Boolean","returnType":"Boolean"}, + {"name":"IsVisible","kind":"function","vis":"public","signature":"Function IsVisible(ByVal x!, ByVal y!, ByVal width!, ByVal height!, g As Graphics) As Boolean","returnType":"Boolean"}, + {"name":"IsVisible","kind":"function","vis":"public","signature":"Function IsVisible(rect As GpRectF, g As Graphics) As Boolean","returnType":"Boolean"}, + {"name":"IsVisibleI","kind":"function","vis":"public","signature":"Function IsVisibleI(ByVal x&, ByVal y&, g As Graphics) As Boolean","returnType":"Boolean"}, + {"name":"IsVisibleI","kind":"function","vis":"public","signature":"Function IsVisibleI(ByVal x&, ByVal y&, ByVal width&, ByVal height&, g As Graphics) As Boolean","returnType":"Boolean"}, + {"name":"MakeEmpty","kind":"function","vis":"public","signature":"Function MakeEmpty() As GpStatus","returnType":"GpStatus"}, + {"name":"MakeInfinite","kind":"function","vis":"public","signature":"Function MakeInfinite() As GpStatus","returnType":"GpStatus"}, + {"name":"Native","kind":"property","vis":"protected","signature":"Protected Property Get Native() As GpRegion","returnType":"GpRegion","accessor":"Get"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New()"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(rect As GpRectF)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(rect As GpRect)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(path As GraphicsPath)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(regionData As Byte, ByVal size&)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(ByVal hRgn As LongPtr)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(ByVal nativeRegion As GpRegion)"}, + {"name":"Transform","kind":"function","vis":"public","signature":"Function Transform(matrix As Matrix) As GpStatus","returnType":"GpStatus"}, + {"name":"Translate","kind":"function","vis":"public","signature":"Function Translate(ByVal pt As GpPointF) As GpStatus","returnType":"GpStatus"}, + {"name":"Translate","kind":"function","vis":"public","signature":"Function Translate(ByVal dx!, ByVal dy!) As GpStatus","returnType":"GpStatus"}, + {"name":"Translate","kind":"function","vis":"public","signature":"Function Translate(ByVal pt As GpPoint) As GpStatus","returnType":"GpStatus"}, + {"name":"TranslateI","kind":"function","vis":"public","signature":"Function TranslateI(ByVal dx&, ByVal dy&) As GpStatus","returnType":"GpStatus"}, + {"name":"Union","kind":"function","vis":"public","signature":"Function Union(rect As GpRect) As GpStatus","returnType":"GpStatus"}, + {"name":"Union","kind":"function","vis":"public","signature":"Function Union(rect As GpRectF) As GpStatus","returnType":"GpStatus"}, + {"name":"Union","kind":"function","vis":"public","signature":"Function Union(path As GraphicsPath) As GpStatus","returnType":"GpStatus"}, + {"name":"Union","kind":"function","vis":"public","signature":"Function Union(region As Region) As GpStatus","returnType":"GpStatus"}, + {"name":"Xor","kind":"function","vis":"public","signature":"Function Xor(rect As GpRect) As GpStatus","returnType":"GpStatus"}, + {"name":"Xor","kind":"function","vis":"public","signature":"Function Xor(rect As GpRectF) As GpStatus","returnType":"GpStatus"}, + {"name":"Xor","kind":"function","vis":"public","signature":"Function Xor(path As GraphicsPath) As GpStatus","returnType":"GpStatus"}, + {"name":"Xor","kind":"function","vis":"public","signature":"Function Xor(region As Region) As GpStatus","returnType":"GpStatus"}, + {"name":"rg","kind":"field","vis":"private","signature":"Dim rg As GpRegion"} + ] + }, + { + "name": "Sharpen", + "kind": "class", + "vis": "public", + "file": "GdiPlus/Effects.twin", + "signature": "Class Sharpen", + "inherits": ["Effect"], + "attrs": [{"name":"COMCreatable","args":"False"}], + "members": [ + {"name":"New","kind":"sub","vis":"public","signature":"Sub New()"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(params As SharpenParams)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(ByVal radius!, ByVal amount!)"}, + {"name":"Parameters","kind":"property","vis":"public","signature":"Property Let Parameters(parameters As SharpenParams)","accessor":"Let"}, + {"name":"Parameters","kind":"property","vis":"public","signature":"Property Get Parameters(Optional size As UINT) As SharpenParams","returnType":"SharpenParams","accessor":"Get"} + ] + }, + { + "name": "SolidBrush", + "kind": "class", + "vis": "public", + "file": "GdiPlus/SolidBrush.twin", + "signature": "Class SolidBrush", + "inherits": ["GdiPlusBase"], + "implements": ["IBrush"], + "attrs": [{"name":"COMCreatable","args":"False"}], + "description": "Solid Fill Brush Object", + "members": [ + {"name":"Class_Terminate","kind":"sub","vis":"private","signature":"Private Sub Class_Terminate()"}, + {"name":"Clone","kind":"function","vis":"public","signature":"Function Clone() As SolidBrush","returnType":"SolidBrush"}, + {"name":"CloneBrush","kind":"function","vis":"public","signature":"Function CloneBrush() As IBrush Implements IBrush.CloneBrush","returnType":"IBrush"}, + {"name":"Color","kind":"property","vis":"public","signature":"Property Get Color() As Color","returnType":"Color","accessor":"Get"}, + {"name":"Color","kind":"property","vis":"public","signature":"Property Let Color(ByVal color As Color)","accessor":"Let"}, + {"name":"Native","kind":"property","vis":"protected","signature":"Protected Property Get Native() As GpSolidFill","returnType":"GpSolidFill","accessor":"Get"}, + {"name":"NativeBrush","kind":"property","vis":"public","signature":"Property Get NativeBrush() As GpBrush Implements IBrush.NativeBrush","returnType":"GpBrush","accessor":"Get"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(ByVal rgb&)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(ByVal color As Color)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(ByVal nativeBrush As GpSolidFill, ByVal status As GpStatus = Ok)"}, + {"name":"RGB","kind":"property","vis":"public","signature":"Property Let RGB(ByVal rgb&)","accessor":"Let"}, + {"name":"RGB","kind":"property","vis":"public","signature":"Property Get RGB() As Long","returnType":"Long","accessor":"Get"}, + {"name":"Type","kind":"property","vis":"public","signature":"Property Get Type() As GpBrushType Implements IBrush.Type","returnType":"GpBrushType","accessor":"Get"}, + {"name":"br","kind":"field","vis":"protected","signature":"Protected br As GpSolidFill"} + ] + }, + { + "name": "StringFormat", + "kind": "class", + "vis": "public", + "file": "GdiPlus/StringFormat.twin", + "signature": "Class StringFormat", + "inherits": ["GdiPlusBase"], + "attrs": [{"name":"COMCreatable","args":"False"}], + "members": [ + {"name":"Alignment","kind":"property","vis":"public","signature":"Property Let Alignment(ByVal align As GpStringAlignment)","accessor":"Let"}, + {"name":"Alignment","kind":"property","vis":"public","signature":"Property Get Alignment() As GpStringAlignment","returnType":"GpStringAlignment","accessor":"Get"}, + {"name":"Assign","kind":"sub","vis":"protected","signature":"Protected Sub Assign(source As StringFormat)"}, + {"name":"BypassGDI","kind":"property","vis":"public","signature":"Property Get BypassGDI() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"BypassGDI","kind":"property","vis":"public","signature":"Property Let BypassGDI(ByVal value As Boolean)","accessor":"Let"}, + {"name":"Class_Terminate","kind":"sub","vis":"public","signature":"Sub Class_Terminate()"}, + {"name":"Clone","kind":"function","vis":"public","signature":"Function Clone() As StringFormat","returnType":"StringFormat"}, + {"name":"DigitSubstitutionLanguage","kind":"property","vis":"public","signature":"Property Let DigitSubstitutionLanguage(ByVal language As LANGID)","accessor":"Let"}, + {"name":"DigitSubstitutionLanguage","kind":"property","vis":"public","signature":"Property Get DigitSubstitutionLanguage() As LANGID","returnType":"LANGID","accessor":"Get"}, + {"name":"DigitSubstitutionMethod","kind":"property","vis":"public","signature":"Property Let DigitSubstitutionMethod(ByVal method As GpStringDigitSubstitute)","accessor":"Let"}, + {"name":"DigitSubstitutionMethod","kind":"property","vis":"public","signature":"Property Get DigitSubstitutionMethod() As GpStringDigitSubstitute","returnType":"GpStringDigitSubstitute","accessor":"Get"}, + {"name":"DirectionRightToLeft","kind":"property","vis":"public","signature":"Property Get DirectionRightToLeft() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"DirectionRightToLeft","kind":"property","vis":"public","signature":"Property Let DirectionRightToLeft(ByVal value As Boolean)","accessor":"Let"}, + {"name":"DirectionVertical","kind":"property","vis":"public","signature":"Property Get DirectionVertical() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"DirectionVertical","kind":"property","vis":"public","signature":"Property Let DirectionVertical(ByVal value As Boolean)","accessor":"Let"}, + {"name":"DisplayFormatControl","kind":"property","vis":"public","signature":"Property Get DisplayFormatControl() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"DisplayFormatControl","kind":"property","vis":"public","signature":"Property Let DisplayFormatControl(ByVal value As Boolean)","accessor":"Let"}, + {"name":"Flags","kind":"property","vis":"public","signature":"Property Let Flags(ByVal flags As GpStringFormatFlags)","accessor":"Let"}, + {"name":"Flags","kind":"property","vis":"public","signature":"Property Get Flags() As GpStringFormatFlags","returnType":"GpStringFormatFlags","accessor":"Get"}, + {"name":"FormatFlags","kind":"property","vis":"public","signature":"Property Let FormatFlags(ByVal flags As GpStringFormatFlags)","accessor":"Let","description":"Use Flags instead"}, + {"name":"FormatFlags","kind":"property","vis":"public","signature":"Property Get FormatFlags() As GpStringFormatFlags","returnType":"GpStringFormatFlags","accessor":"Get","description":"Use Flags instead"}, + {"name":"GetTabStops","kind":"function","vis":"public","signature":"Function GetTabStops(firstTabOffset!) As Single()","returnType":"Single()"}, + {"name":"GetTabStops","kind":"function","vis":"public","signature":"Function GetTabStops(ByVal count&, firstTabOffset!, tabStops!) As GpStatus","returnType":"GpStatus"}, + {"name":"HotkeyPrefix","kind":"property","vis":"public","signature":"Property Let HotkeyPrefix(ByVal hotkeyPrefix As GpHotkeyPrefix)","accessor":"Let"}, + {"name":"HotkeyPrefix","kind":"property","vis":"public","signature":"Property Get HotkeyPrefix() As GpHotkeyPrefix","returnType":"GpHotkeyPrefix","accessor":"Get"}, + {"name":"IsAlignmentCenter","kind":"property","vis":"public","signature":"Property Get IsAlignmentCenter() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"IsAlignmentFar","kind":"property","vis":"public","signature":"Property Get IsAlignmentFar() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"IsAlignmentNear","kind":"property","vis":"public","signature":"Property Get IsAlignmentNear() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"IsDigitSubstitutionNational","kind":"function","vis":"public","signature":"Function IsDigitSubstitutionNational() As Boolean","returnType":"Boolean"}, + {"name":"IsDigitSubstitutionNone","kind":"function","vis":"public","signature":"Function IsDigitSubstitutionNone() As Boolean","returnType":"Boolean"}, + {"name":"IsDigitSubstitutionTraditional","kind":"function","vis":"public","signature":"Function IsDigitSubstitutionTraditional() As Boolean","returnType":"Boolean"}, + {"name":"IsDigitSubstitutionUser","kind":"function","vis":"public","signature":"Function IsDigitSubstitutionUser() As Boolean","returnType":"Boolean"}, + {"name":"IsHotkeyPrefixHide","kind":"property","vis":"public","signature":"Property Get IsHotkeyPrefixHide() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"IsHotkeyPrefixNone","kind":"property","vis":"public","signature":"Property Get IsHotkeyPrefixNone() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"IsHotkeyPrefixShow","kind":"property","vis":"public","signature":"Property Get IsHotkeyPrefixShow() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"IsLineAlignmentCenter","kind":"property","vis":"public","signature":"Property Get IsLineAlignmentCenter() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"IsLineAlignmentFar","kind":"property","vis":"public","signature":"Property Get IsLineAlignmentFar() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"IsLineAlignmentNear","kind":"property","vis":"public","signature":"Property Get IsLineAlignmentNear() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"IsTrimmingCharacter","kind":"property","vis":"public","signature":"Property Get IsTrimmingCharacter() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"IsTrimmingEllipsisCharacter","kind":"property","vis":"public","signature":"Property Get IsTrimmingEllipsisCharacter() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"IsTrimmingEllipsisPath","kind":"property","vis":"public","signature":"Property Get IsTrimmingEllipsisPath() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"IsTrimmingEllipsisWord","kind":"property","vis":"public","signature":"Property Get IsTrimmingEllipsisWord() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"IsTrimmingNone","kind":"property","vis":"public","signature":"Property Get IsTrimmingNone() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"IsTrimmingWord","kind":"property","vis":"public","signature":"Property Get IsTrimmingWord() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"LANG_NEUTRAL","kind":"const","vis":"private","signature":"Private Const LANG_NEUTRAL = &H00"}, + {"name":"LineAlignment","kind":"property","vis":"public","signature":"Property Let LineAlignment(ByVal align As GpStringAlignment)","accessor":"Let"}, + {"name":"LineAlignment","kind":"property","vis":"public","signature":"Property Get LineAlignment() As GpStringAlignment","returnType":"GpStringAlignment","accessor":"Get"}, + {"name":"LineLimit","kind":"property","vis":"public","signature":"Property Get LineLimit() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"LineLimit","kind":"property","vis":"public","signature":"Property Let LineLimit(ByVal value As Boolean)","accessor":"Let"}, + {"name":"MeasurableCharacterRangeCount","kind":"property","vis":"public","signature":"Property Get MeasurableCharacterRangeCount() As Long","returnType":"Long","accessor":"Get"}, + {"name":"MeasurableCharacterRanges","kind":"property","vis":"public","signature":"Property Let MeasurableCharacterRanges(ranges() As CharacterRange)","accessor":"Let"}, + {"name":"MeasureTrailingSpaces","kind":"property","vis":"public","signature":"Property Get MeasureTrailingSpaces() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"MeasureTrailingSpaces","kind":"property","vis":"public","signature":"Property Let MeasureTrailingSpaces(ByVal value As Boolean)","accessor":"Let"}, + {"name":"Native","kind":"property","vis":"protected","signature":"Protected Property Get Native() As GpStringFormat","returnType":"GpStringFormat","accessor":"Get"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(ByVal flags As GpStringFormatFlags = 0, ByVal language As LANGID = LANG_NEUTRAL)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(ByVal newSf As GpStringFormat, ByVal status As GpStatus = ok)"}, + {"name":"NoClip","kind":"property","vis":"public","signature":"Property Get NoClip() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"NoClip","kind":"property","vis":"public","signature":"Property Let NoClip(ByVal value As Boolean)","accessor":"Let"}, + {"name":"NoFitBlackBox","kind":"property","vis":"public","signature":"Property Get NoFitBlackBox() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"NoFitBlackBox","kind":"property","vis":"public","signature":"Property Let NoFitBlackBox(ByVal value As Boolean)","accessor":"Let"}, + {"name":"NoFontFallback","kind":"property","vis":"public","signature":"Property Get NoFontFallback() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"NoFontFallback","kind":"property","vis":"public","signature":"Property Let NoFontFallback(ByVal value As Boolean)","accessor":"Let"}, + {"name":"NoWrap","kind":"property","vis":"public","signature":"Property Get NoWrap() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"NoWrap","kind":"property","vis":"public","signature":"Property Let NoWrap(ByVal value As Boolean)","accessor":"Let"}, + {"name":"SetAlignmentCenter","kind":"sub","vis":"public","signature":"Sub SetAlignmentCenter()"}, + {"name":"SetAlignmentFar","kind":"sub","vis":"public","signature":"Sub SetAlignmentFar()"}, + {"name":"SetAlignmentNear","kind":"sub","vis":"public","signature":"Sub SetAlignmentNear()"}, + {"name":"SetDigitSubstitution","kind":"function","vis":"public","signature":"Function SetDigitSubstitution(ByVal language As LANGID, ByVal substitute As GpStringDigitSubstitute) As GpStatus","returnType":"GpStatus"}, + {"name":"SetDigitSubstitutionNational","kind":"sub","vis":"public","signature":"Sub SetDigitSubstitutionNational()"}, + {"name":"SetDigitSubstitutionNone","kind":"sub","vis":"public","signature":"Sub SetDigitSubstitutionNone()"}, + {"name":"SetDigitSubstitutionTraditional","kind":"sub","vis":"public","signature":"Sub SetDigitSubstitutionTraditional()"}, + {"name":"SetDigitSubstitutionUser","kind":"sub","vis":"public","signature":"Sub SetDigitSubstitutionUser()"}, + {"name":"SetHotkeyPrefixHide","kind":"sub","vis":"public","signature":"Sub SetHotkeyPrefixHide()"}, + {"name":"SetHotkeyPrefixNone","kind":"sub","vis":"public","signature":"Sub SetHotkeyPrefixNone()"}, + {"name":"SetHotkeyPrefixShow","kind":"sub","vis":"public","signature":"Sub SetHotkeyPrefixShow()"}, + {"name":"SetLineAlignmentCenter","kind":"sub","vis":"public","signature":"Sub SetLineAlignmentCenter()"}, + {"name":"SetLineAlignmentFar","kind":"sub","vis":"public","signature":"Sub SetLineAlignmentFar()"}, + {"name":"SetLineAlignmentNear","kind":"sub","vis":"public","signature":"Sub SetLineAlignmentNear()"}, + {"name":"SetMeasurableCharacterRanges","kind":"function","vis":"public","signature":"Function SetMeasurableCharacterRanges(ByVal rangeCount&, ranges As CharacterRange) As GpStatus","returnType":"GpStatus"}, + {"name":"SetTabStops","kind":"function","vis":"public","signature":"Function SetTabStops(ByVal firstTabOffset!, tabStops!()) As GpStatus","returnType":"GpStatus"}, + {"name":"SetTabStops","kind":"function","vis":"public","signature":"Function SetTabStops(ByVal firstTabOffset!, ByVal count&, tabStops!) As GpStatus","returnType":"GpStatus"}, + {"name":"SetTrimmingCharacter","kind":"sub","vis":"public","signature":"Sub SetTrimmingCharacter()"}, + {"name":"SetTrimmingEllipsisCharacter","kind":"sub","vis":"public","signature":"Sub SetTrimmingEllipsisCharacter()"}, + {"name":"SetTrimmingEllipsisPath","kind":"sub","vis":"public","signature":"Sub SetTrimmingEllipsisPath()"}, + {"name":"SetTrimmingEllipsisWord","kind":"sub","vis":"public","signature":"Sub SetTrimmingEllipsisWord()"}, + {"name":"SetTrimmingNone","kind":"sub","vis":"public","signature":"Sub SetTrimmingNone()"}, + {"name":"SetTrimmingWord","kind":"sub","vis":"public","signature":"Sub SetTrimmingWord()"}, + {"name":"TabStopCount","kind":"property","vis":"public","signature":"Property Get TabStopCount() As Long","returnType":"Long","accessor":"Get"}, + {"name":"Trimming","kind":"property","vis":"public","signature":"Property Get Trimming() As GpStringTrimming","returnType":"GpStringTrimming","accessor":"Get"}, + {"name":"Trimming","kind":"property","vis":"public","signature":"Property Let Trimming(ByVal trimming As GpStringTrimming)","accessor":"Let"}, + {"name":"sf","kind":"field","vis":"private","signature":"Dim sf As GpStringFormat"} + ] + }, + { + "name": "TextureBrush", + "kind": "class", + "vis": "public", + "file": "GdiPlus/TextureBrush.twin", + "signature": "Class TextureBrush", + "inherits": ["GdiPlusBase"], + "implements": ["IBrush","ITransformable"], + "attrs": [{"name":"COMCreatable","args":"False"}], + "description": "Texture Brush Fill Object", + "members": [ + {"name":"Class_Terminate","kind":"sub","vis":"private","signature":"Private Sub Class_Terminate()"}, + {"name":"Clone","kind":"function","vis":"public","signature":"Function Clone() As TextureBrush","returnType":"TextureBrush"}, + {"name":"CloneBrush","kind":"function","vis":"public","signature":"Function CloneBrush() As IBrush Implements IBrush.CloneBrush","returnType":"IBrush"}, + {"name":"GetTransform","kind":"function","vis":"public","signature":"Function GetTransform(outMatrix As Matrix) As GpStatus Implements ITransformable.GetTransform","returnType":"GpStatus"}, + {"name":"Image","kind":"property","vis":"public","signature":"Property Get Image() As Image","returnType":"Image","accessor":"Get"}, + {"name":"MultiplyTransform","kind":"function","vis":"public","signature":"Function MultiplyTransform(matrix As Matrix, ByVal order As GpMatrixOrder = MatrixOrderPrepend) As GpStatus Implements ITransformable.MultiplyTransform","returnType":"GpStatus"}, + {"name":"Native","kind":"property","vis":"protected","signature":"Protected Property Get Native() As GpTexture","returnType":"GpTexture","accessor":"Get"}, + {"name":"NativeBrush","kind":"property","vis":"public","signature":"Property Get NativeBrush() As GpBrush Implements IBrush.NativeBrush","returnType":"GpBrush","accessor":"Get"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(image As Image, ByVal wrapMode As GpWrapMode = WrapModeTile)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(image As Image, ByVal wrapmode As GpWrapMode, dstRect As GpRectF)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(image As Image, dstRect As GpRectF, Optional imageAttributes As ImageAttributes)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(image As Image, dstRect As GpRect, Optional imageAttributes As ImageAttributes)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(image As Image, ByVal wrapmode As GpWrapMode, dstRect As GpRect)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(image As Image, ByVal wrapmode As GpWrapMode, ByVal dstX!, ByVal dstY!, ByVal dstWidth!, ByVal dstHeight!)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(image As Image, ByVal wrapmode As GpWrapMode, ByVal dstX&, ByVal dstY&, ByVal dstWidth&, ByVal dstHeight&, ByVal dummy&)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Public Sub New(ByVal nativeBrush As GpTexture, ByVal status As GpStatus = Ok)"}, + {"name":"ResetTransform","kind":"function","vis":"public","signature":"Function ResetTransform() As GpStatus Implements ITransformable.ResetTransform","returnType":"GpStatus"}, + {"name":"RotateTransform","kind":"function","vis":"public","signature":"Function RotateTransform(ByVal angle!, ByVal order As GpMatrixOrder = MatrixOrderPrepend) As GpStatus Implements ITransformable.RotateTransform","returnType":"GpStatus"}, + {"name":"RotateTransformAt","kind":"function","vis":"public","signature":"Function RotateTransformAt(ByVal angle!, ByVal center As GpPointF, ByVal order As GpMatrixOrder = MatrixOrderPrepend) As GpStatus Implements ITransformable.RotateTransformAt","returnType":"GpStatus"}, + {"name":"ScaleTransform","kind":"function","vis":"public","signature":"Function ScaleTransform(ByVal sx!, ByVal sy!, ByVal order As GpMatrixOrder = MatrixOrderPrepend) As GpStatus Implements ITransformable.ScaleTransform","returnType":"GpStatus"}, + {"name":"ShearTransform","kind":"function","vis":"public","signature":"Function ShearTransform(ByVal shearX!, ByVal shearY!, ByVal order As GpMatrixOrder = MatrixOrderPrepend) As GpStatus Implements ITransformable.ShearTransform","returnType":"GpStatus"}, + {"name":"Transform","kind":"property","vis":"public","signature":"Property Let Transform(matrix As Matrix) Implements ITransformable.Transform","accessor":"Let"}, + {"name":"Transform","kind":"property","vis":"public","signature":"Property Get Transform() As Matrix Implements ITransformable.Transform","returnType":"Matrix","accessor":"Get"}, + {"name":"TranslateTransform","kind":"function","vis":"public","signature":"Function TranslateTransform(ByVal delta As GpPointF, ByVal order As GpMatrixOrder = MatrixOrderPrepend) As GpStatus Implements ITransformable.TranslateTransform","returnType":"GpStatus"}, + {"name":"TranslateTransform","kind":"function","vis":"public","signature":"Function TranslateTransform(ByVal dx!, ByVal dy!, ByVal order As GpMatrixOrder = MatrixOrderPrepend) As GpStatus Implements ITransformable.TranslateTransform","returnType":"GpStatus"}, + {"name":"Type","kind":"property","vis":"public","signature":"Property Get Type() As GpBrushType Implements IBrush.Type","returnType":"GpBrushType","accessor":"Get"}, + {"name":"WrapMode","kind":"property","vis":"public","signature":"Property Let WrapMode(ByVal wrapMode As GpWrapMode)","accessor":"Let"}, + {"name":"WrapMode","kind":"property","vis":"public","signature":"Property Get WrapMode() As GpWrapMode","returnType":"GpWrapMode","accessor":"Get"}, + {"name":"br","kind":"field","vis":"protected","signature":"Protected br As GpTexture"} + ] + }, + { + "name": "Tint", + "kind": "class", + "vis": "public", + "file": "GdiPlus/Effects.twin", + "signature": "Class Tint", + "inherits": ["Effect"], + "attrs": [{"name":"COMCreatable","args":"False"}], + "members": [ + {"name":"New","kind":"sub","vis":"public","signature":"Sub New()"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(params As TintParams)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(ByVal hue&, ByVal amount&)"}, + {"name":"Parameters","kind":"property","vis":"public","signature":"Property Let Parameters(parameters As TintParams)","accessor":"Let"}, + {"name":"Parameters","kind":"property","vis":"public","signature":"Property Get Parameters(Optional size As UINT) As TintParams","returnType":"TintParams","accessor":"Get"} + ] + }, + { + "name": "Types", + "kind": "module", + "vis": "public", + "file": "GdiPlus/Types.twin", + "signature": "Module Types", + "members": [ + {"name":"AsText","kind":"function","vis":"public","signature":"Function AsText(ByVal status As GpStatus) As String","returnType":"String"}, + {"name":"CharacterRange","kind":"function","vis":"public","signature":"Function CharacterRange() As CharacterRange","returnType":"CharacterRange"}, + {"name":"CharacterRange","kind":"function","vis":"public","signature":"Function CharacterRange(ByVal first&, ByVal length&) As CharacterRange","returnType":"CharacterRange"}, + {"name":"ColorMap","kind":"function","vis":"public","signature":"Function ColorMap(ByVal oldColor As Color, ByVal newColor As Color) As ColorMap","returnType":"ColorMap"}, + {"name":"ColorPalette","kind":"function","vis":"public","signature":"Function ColorPalette(ByVal flags As PaletteFlags, entries() As Long) As ColorPalette","returnType":"ColorPalette"}, + {"name":"DrawImageAbort","kind":"delegate","vis":"public","signature":"Public Delegate Function DrawImageAbort (ByVal pv As LongPtr) As GDIP_BOOL","returnType":"GDIP_BOOL"}, + {"name":"EnumerateMetafileProc","kind":"delegate","vis":"public","signature":"Public Delegate Function EnumerateMetafileProc (ByVal nType As GpEmfPlusRecordType, ByVal dwFlags As Long, ByVal cbData As Long, ByVal data As LongPtr, ByVal callbackData As LongPtr)"}, + {"name":"GetThumbnailImageAbort","kind":"delegate","vis":"public","signature":"Public Delegate Function GetThumbnailImageAbort (ByVal pv As LongPtr) As GDIP_BOOL","returnType":"GDIP_BOOL"}, + {"name":"GpPoint","kind":"function","vis":"public","signature":"Function GpPoint() As GpPoint","returnType":"GpPoint"}, + {"name":"GpPoint","kind":"function","vis":"public","signature":"Function GpPoint(ByVal x&, ByVal y&) As GpPoint","returnType":"GpPoint"}, + {"name":"GpPoint","kind":"function","vis":"public","signature":"Function GpPoint(ByVal point As GpPointF) As GpPoint","returnType":"GpPoint"}, + {"name":"GpPoint","kind":"function","vis":"public","signature":"Function GpPoint(ByVal size As GpSize) As GpPoint","returnType":"GpPoint"}, + {"name":"GpPointF","kind":"function","vis":"public","signature":"Function GpPointF() As GpPointF","returnType":"GpPointF"}, + {"name":"GpPointF","kind":"function","vis":"public","signature":"Function GpPointF(ByVal x!, ByVal y!) As GpPointF","returnType":"GpPointF"}, + {"name":"GpPointF","kind":"function","vis":"public","signature":"Function GpPointF(ByVal point As GpPoint) As GpPointF","returnType":"GpPointF"}, + {"name":"GpPointF","kind":"function","vis":"public","signature":"Function GpPointF(ByVal size As GpSizeF) As GpPointF","returnType":"GpPointF"}, + {"name":"GpRect","kind":"function","vis":"public","signature":"Function GpRect() As GpRect","returnType":"GpRect"}, + {"name":"GpRect","kind":"function","vis":"public","signature":"Function GpRect(ByVal x&, ByVal y&) As GpRect","returnType":"GpRect"}, + {"name":"GpRect","kind":"function","vis":"public","signature":"Function GpRect(ByVal x&, ByVal y&, ByVal width&, ByVal height&) As GpRect","returnType":"GpRect"}, + {"name":"GpRect","kind":"function","vis":"public","signature":"Function GpRect(ByVal location As GpPoint) As GpRect","returnType":"GpRect"}, + {"name":"GpRect","kind":"function","vis":"public","signature":"Function GpRect(ByVal location As GpPoint, ByVal size As GpSize) As GpRect","returnType":"GpRect"}, + {"name":"GpRect","kind":"function","vis":"public","signature":"Function GpRect(rect As GDIP_RECT) As GpRect","returnType":"GpRect"}, + {"name":"GpRect","kind":"function","vis":"public","signature":"Function GpRect(rect As GpRectF) As GpRect","returnType":"GpRect"}, + {"name":"GpRectF","kind":"function","vis":"public","signature":"Function GpRectF() As GpRectF","returnType":"GpRectF"}, + {"name":"GpRectF","kind":"function","vis":"public","signature":"Function GpRectF(ByVal x!, ByVal y!) As GpRectF","returnType":"GpRectF"}, + {"name":"GpRectF","kind":"function","vis":"public","signature":"Function GpRectF(ByVal x!, ByVal y!, ByVal width!, ByVal height!) As GpRectF","returnType":"GpRectF"}, + {"name":"GpRectF","kind":"function","vis":"public","signature":"Function GpRectF(ByVal location As GpPointF) As GpRectF","returnType":"GpRectF"}, + {"name":"GpRectF","kind":"function","vis":"public","signature":"Function GpRectF(ByVal location As GpPointF, ByVal size As GpSizeF) As GpRectF","returnType":"GpRectF"}, + {"name":"GpRectF","kind":"function","vis":"public","signature":"Function GpRectF(rect As GDIP_RECTF) As GpRectF","returnType":"GpRectF"}, + {"name":"GpRectF","kind":"function","vis":"public","signature":"Function GpRectF(rect As GpRect) As GpRectF","returnType":"GpRectF"}, + {"name":"GpRectFFrom","kind":"function","vis":"public","signature":"Function GpRectFFrom(rect As GDIP_RECT) As GpRectF","returnType":"GpRectF"}, + {"name":"GpRectFrom","kind":"function","vis":"public","signature":"Function GpRectFrom(rect As GDIP_RECTF) As GpRect","returnType":"GpRect"}, + {"name":"GpSize","kind":"function","vis":"public","signature":"Function GpSize() As GpSize","returnType":"GpSize"}, + {"name":"GpSize","kind":"function","vis":"public","signature":"Function GpSize(ByVal width&, ByVal height&) As GpSize","returnType":"GpSize"}, + {"name":"GpSize","kind":"function","vis":"public","signature":"Function GpSize(ByVal size As GpSizeF) As GpSize","returnType":"GpSize"}, + {"name":"GpSizeF","kind":"function","vis":"public","signature":"Function GpSizeF() As GpSizeF","returnType":"GpSizeF"}, + {"name":"GpSizeF","kind":"function","vis":"public","signature":"Function GpSizeF(ByVal width!, ByVal height!) As GpSizeF","returnType":"GpSizeF"}, + {"name":"GpSizeF","kind":"function","vis":"public","signature":"Function GpSizeF(ByVal size As GpSize) As GpSizeF","returnType":"GpSizeF"}, + {"name":"GpSizeFFrom","kind":"function","vis":"public","signature":"Function GpSizeFFrom(ByVal size As GDIP_SIZE) As GpSizeF","returnType":"GpSizeF"}, + {"name":"GpSizeFrom","kind":"function","vis":"public","signature":"Function GpSizeFrom(ByVal size As GDIP_SIZE) As GpSize","returnType":"GpSize"}, + {"name":"ImageAbort","kind":"delegate","vis":"public","signature":"Public Delegate Function ImageAbort (ByVal pv As LongPtr) As GDIP_BOOL","returnType":"GDIP_BOOL"}, + {"name":"Intersection","kind":"function","vis":"private","signature":"Private Function Intersection(c As GpRectF, a As GpRectF, b As GpRectF) As Boolean","returnType":"Boolean"}, + {"name":"Intersection","kind":"function","vis":"public","signature":"Function Intersection(c As GpRect, a As GpRect, b As GpRect) As Boolean","returnType":"Boolean"}, + {"name":"REAL_EPSILON","kind":"const","vis":"public","signature":"Public Const REAL_EPSILON! = 1.192092896E-07!"}, + {"name":"REAL_MAX","kind":"const","vis":"public","signature":"Public Const REAL_MAX = 3.402823466E+38!"}, + {"name":"REAL_MIN","kind":"const","vis":"public","signature":"Public Const REAL_MIN = 1.175494351E-38!"}, + {"name":"REAL_TOLERANCE","kind":"const","vis":"public","signature":"Public Const REAL_TOLERANCE = (REAL_MIN * 100!)"}, + {"name":"Union","kind":"function","vis":"private","signature":"Private Function Union(c As GpRectF, a As GpRectF, b As GpRectF) As Boolean","returnType":"Boolean"}, + {"name":"Union","kind":"function","vis":"public","signature":"Function Union(c As GpRect, a As GpRect, b As GpRect) As Boolean","returnType":"Boolean"} + ] + }, + { + "name": "CharacterRange", + "kind": "type", + "in": "Types", + "vis": "public", + "file": "GdiPlus/Types.twin", + "signature": "Type CharacterRange", + "fields": [ + {"name":"First","vis":"public","signature":"First&"}, + {"name":"Length","vis":"public","signature":"Length&"} + ], + "members": [] + }, + { + "name": "ColorMap", + "kind": "type", + "in": "Types", + "vis": "public", + "file": "GdiPlus/Types.twin", + "signature": "Public Type ColorMap", + "fields": [ + {"name":"oldColor","vis":"public","signature":"oldColor As Color"}, + {"name":"newColor","vis":"public","signature":"newColor As Color"} + ], + "members": [] + }, + { + "name": "ColorPalette", + "kind": "type", + "in": "Types", + "vis": "public", + "file": "GdiPlus/Types.twin", + "signature": "Public Type ColorPalette", + "fields": [ + {"name":"flags","vis":"public","signature":"flags As PaletteFlags"}, + {"name":"count","vis":"public","signature":"count As Long"}, + {"name":"entries","vis":"public","signature":"entries(0 To 255) As Long"} + ], + "members": [] + }, + { + "name": "GpPoint", + "kind": "type", + "in": "Types", + "vis": "public", + "file": "GdiPlus/Types.twin", + "signature": "Type GpPoint", + "description": "Represents a location in a 2D coordinate system (integer coordinates)", + "fields": [ + {"name":"X","vis":"public","signature":"X&"}, + {"name":"Y","vis":"public","signature":"Y&"} + ], + "members": [ + {"name":"Add","kind":"sub","vis":"public","signature":"Sub Add(ByVal pt As GpPoint)"}, + {"name":"AsGpPointF","kind":"function","vis":"public","signature":"Function AsGpPointF() As GpPointF","returnType":"GpPointF"}, + {"name":"AsPOINT","kind":"function","vis":"public","signature":"Function AsPOINT() As GDIP_POINT","returnType":"GDIP_POINT"}, + {"name":"Diff","kind":"function","vis":"public","signature":"Function Diff(ByVal pt As GpPoint) As GpPoint","returnType":"GpPoint"}, + {"name":"DotProd","kind":"function","vis":"public","signature":"Function DotProd(ByVal pt As GpPoint) As LongLong","returnType":"LongLong"}, + {"name":"Equals","kind":"function","vis":"public","signature":"Function Equals(ByVal pt As GpPoint) As Boolean","returnType":"Boolean"}, + {"name":"SetFrom","kind":"sub","vis":"public","signature":"Sub SetFrom(ByVal pt As GpPointF)"}, + {"name":"SetFromPOINT","kind":"sub","vis":"public","signature":"Sub SetFromPOINT(ByVal pt As GDIP_POINT)"}, + {"name":"Sub","kind":"sub","vis":"public","signature":"Sub Sub(ByVal pt As GpPoint)"}, + {"name":"Sum","kind":"function","vis":"public","signature":"Function Sum(ByVal pt As GpPoint) As GpPoint","returnType":"GpPoint"}, + {"name":"Transpose","kind":"sub","vis":"public","signature":"Sub Transpose()"}, + {"name":"Transposed","kind":"property","vis":"public","signature":"Property Get Transposed() As GpPoint","returnType":"GpPoint","accessor":"Get"}, + {"name":"Zero","kind":"property","vis":"public","signature":"Property Get Zero() As Boolean","returnType":"Boolean","accessor":"Get"} + ] + }, + { + "name": "GpPointF", + "kind": "type", + "in": "Types", + "vis": "public", + "file": "GdiPlus/Types.twin", + "signature": "Type GpPointF", + "description": "Represents a location in a 2D coordinate system (floating-point coordinates)", + "fields": [ + {"name":"X","vis":"public","signature":"X!"}, + {"name":"Y","vis":"public","signature":"Y!"} + ], + "members": [ + {"name":"Add","kind":"sub","vis":"public","signature":"Sub Add(ByVal pt As GpPointF)"}, + {"name":"AsGpPoint","kind":"function","vis":"public","signature":"Function AsGpPoint() As GpPoint","returnType":"GpPoint"}, + {"name":"AsPOINT","kind":"function","vis":"public","signature":"Function AsPOINT() As GDIP_POINT","returnType":"GDIP_POINT"}, + {"name":"Diff","kind":"function","vis":"public","signature":"Function Diff(ByVal pt As GpPointF) As GpPointF","returnType":"GpPointF"}, + {"name":"DotProd","kind":"function","vis":"public","signature":"Function DotProd(ByVal pt As GpPointF) As Single","returnType":"Single"}, + {"name":"Equals","kind":"function","vis":"public","signature":"Function Equals(ByVal pt As GpPointF) As Boolean","returnType":"Boolean"}, + {"name":"InvScale","kind":"sub","vis":"public","signature":"Sub InvScale(ByVal invs!)"}, + {"name":"InvScale2","kind":"sub","vis":"public","signature":"Sub InvScale2(ByVal isx!, ByVal isy!)"}, + {"name":"Length","kind":"property","vis":"public","signature":"Property Let Length(ByVal newLen!)","accessor":"Let"}, + {"name":"Length","kind":"property","vis":"public","signature":"Property Get Length() As Single","returnType":"Single","accessor":"Get"}, + {"name":"Normalize","kind":"sub","vis":"public","signature":"Sub Normalize()"}, + {"name":"Normalized","kind":"property","vis":"public","signature":"Property Get Normalized() As GpPointF","returnType":"GpPointF","accessor":"Get"}, + {"name":"Prod","kind":"function","vis":"public","signature":"Function Prod(ByVal s!) As GpPointF","returnType":"GpPointF"}, + {"name":"Prod2","kind":"function","vis":"public","signature":"Function Prod2(ByVal sx!, ByVal sy!) As GpPointF","returnType":"GpPointF"}, + {"name":"Quot","kind":"function","vis":"public","signature":"Function Quot(ByVal invs!) As GpPointF","returnType":"GpPointF"}, + {"name":"Quot2","kind":"function","vis":"public","signature":"Function Quot2(ByVal isx!, ByVal isy!) As GpPointF","returnType":"GpPointF"}, + {"name":"Scale","kind":"sub","vis":"public","signature":"Sub Scale(ByVal s!)"}, + {"name":"Scale2","kind":"sub","vis":"public","signature":"Sub Scale2(ByVal sx!, ByVal sy!)"}, + {"name":"SetFrom","kind":"sub","vis":"public","signature":"Sub SetFrom(ByVal pt As GpPoint)"}, + {"name":"SetFromPOINT","kind":"sub","vis":"public","signature":"Sub SetFromPOINT(ByVal pt As GDIP_POINT)"}, + {"name":"Sub","kind":"sub","vis":"public","signature":"Sub Sub(ByVal pt As GpPointF)"}, + {"name":"Sum","kind":"function","vis":"public","signature":"Function Sum(ByVal pt As GpPointF) As GpPointF","returnType":"GpPointF"}, + {"name":"Transpose","kind":"sub","vis":"public","signature":"Sub Transpose()"}, + {"name":"Transposed","kind":"property","vis":"public","signature":"Property Get Transposed() As GpPointF","returnType":"GpPointF","accessor":"Get"}, + {"name":"Zero","kind":"property","vis":"public","signature":"Property Get Zero() As Boolean","returnType":"Boolean","accessor":"Get"} + ] + }, + { + "name": "GpRect", + "kind": "type", + "in": "Types", + "vis": "public", + "file": "GdiPlus/Types.twin", + "signature": "Type GpRect", + "description": "Represents a rectangle in a 2D coordinate system (integer coordinates)", + "fields": [ + {"name":"X","vis":"public","signature":"X&"}, + {"name":"Y","vis":"public","signature":"Y&"}, + {"name":"Width","vis":"public","signature":"Width&"}, + {"name":"Height","vis":"public","signature":"Height&"} + ], + "members": [ + {"name":"AsGpRectF","kind":"function","vis":"public","signature":"Function AsGpRectF() As GpRectF","returnType":"GpRectF"}, + {"name":"AsRECT","kind":"function","vis":"public","signature":"Function AsRECT() As GDIP_RECT","returnType":"GDIP_RECT"}, + {"name":"AsRECTF","kind":"function","vis":"public","signature":"Function AsRECTF() As GDIP_RECTF","returnType":"GDIP_RECTF"}, + {"name":"Bottom","kind":"property","vis":"public","signature":"Property Get Bottom() As Long","returnType":"Long","accessor":"Get"}, + {"name":"BottomLeft","kind":"property","vis":"public","signature":"Property Get BottomLeft() As GpPoint","returnType":"GpPoint","accessor":"Get"}, + {"name":"BottomRight","kind":"property","vis":"public","signature":"Property Get BottomRight() As GpPoint","returnType":"GpPoint","accessor":"Get"}, + {"name":"Contains","kind":"function","vis":"public","signature":"Function Contains(rect As GpRect) As Boolean","returnType":"Boolean"}, + {"name":"Contains2","kind":"function","vis":"public","signature":"Function Contains2(ByVal x&, ByVal y&) As Boolean","returnType":"Boolean"}, + {"name":"ContainsPt","kind":"function","vis":"public","signature":"Function ContainsPt(ByVal pt As GpPoint) As Boolean","returnType":"Boolean"}, + {"name":"Equals","kind":"function","vis":"public","signature":"Function Equals(rect As GpRect) As Boolean","returnType":"Boolean"}, + {"name":"Inflate","kind":"sub","vis":"public","signature":"Sub Inflate(ByVal dx&, ByVal dy&)"}, + {"name":"InflatePt","kind":"sub","vis":"public","signature":"Sub InflatePt(ByVal point As GpPoint)"}, + {"name":"InflatedBy","kind":"function","vis":"public","signature":"Function InflatedBy(ByVal dx&, ByVal dy&) As GpRect","returnType":"GpRect"}, + {"name":"InflatedByPt","kind":"function","vis":"public","signature":"Function InflatedByPt(ByVal pt As GpPoint) As GpRect","returnType":"GpRect"}, + {"name":"Intersect","kind":"function","vis":"public","signature":"Function Intersect(rect As GpRect) As Boolean","returnType":"Boolean"}, + {"name":"IntersectedWith","kind":"function","vis":"public","signature":"Function IntersectedWith(rect As GpRect) As GpRect","returnType":"GpRect"}, + {"name":"IntersectsWith","kind":"function","vis":"public","signature":"Function IntersectsWith(rect As GpRect) As Boolean","returnType":"Boolean"}, + {"name":"IsEmptyArea","kind":"property","vis":"public","signature":"Property Get IsEmptyArea() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"Left","kind":"property","vis":"public","signature":"Property Get Left() As Long","returnType":"Long","accessor":"Get"}, + {"name":"Location","kind":"property","vis":"public","signature":"Property Let Location(ByVal loc As GpPoint)","accessor":"Let"}, + {"name":"Location","kind":"property","vis":"public","signature":"Property Get Location() As GpPoint","returnType":"GpPoint","accessor":"Get"}, + {"name":"Offset","kind":"sub","vis":"public","signature":"Sub Offset(ByVal dx&, ByVal dy&)"}, + {"name":"OffsetBy","kind":"function","vis":"public","signature":"Function OffsetBy(ByVal dx&, ByVal dy&) As GpRect","returnType":"GpRect"}, + {"name":"OffsetByPt","kind":"function","vis":"public","signature":"Function OffsetByPt(ByVal pt As GpPoint) As GpRect","returnType":"GpRect"}, + {"name":"OffsetPt","kind":"sub","vis":"public","signature":"Sub OffsetPt(ByVal point As GpPoint)"}, + {"name":"Right","kind":"property","vis":"public","signature":"Property Get Right() As Long","returnType":"Long","accessor":"Get"}, + {"name":"SetFrom","kind":"sub","vis":"public","signature":"Sub SetFrom(src As GpRectF)"}, + {"name":"SetFromRECT","kind":"sub","vis":"public","signature":"Sub SetFromRECT(src As GDIP_RECT)"}, + {"name":"SetFromRECTF","kind":"sub","vis":"public","signature":"Sub SetFromRECTF(src As GDIP_RECTF)"}, + {"name":"Size","kind":"property","vis":"public","signature":"Property Let Size(ByVal sz As GpSize)","accessor":"Let"}, + {"name":"Size","kind":"property","vis":"public","signature":"Property Get Size() As GpSize","returnType":"GpSize","accessor":"Get"}, + {"name":"ToRECT","kind":"sub","vis":"public","signature":"Sub ToRECT(dst As GDIP_RECT)"}, + {"name":"Top","kind":"property","vis":"public","signature":"Property Get Top() As Long","returnType":"Long","accessor":"Get"}, + {"name":"TopLeft","kind":"property","vis":"public","signature":"Property Get TopLeft() As GpPoint","returnType":"GpPoint","accessor":"Get"}, + {"name":"TopRight","kind":"property","vis":"public","signature":"Property Get TopRight() As GpPoint","returnType":"GpPoint","accessor":"Get"}, + {"name":"Unite","kind":"function","vis":"public","signature":"Function Unite(rect As GpRect) As Boolean","returnType":"Boolean"}, + {"name":"UnitedWith","kind":"function","vis":"public","signature":"Function UnitedWith(rect As GpRect) As GpRect","returnType":"GpRect"} + ] + }, + { + "name": "GpRectF", + "kind": "type", + "in": "Types", + "vis": "public", + "file": "GdiPlus/Types.twin", + "signature": "Type GpRectF", + "description": "Represents a rectangle in a 2D coordinate system (floating-point coordinates)", + "fields": [ + {"name":"X","vis":"public","signature":"X!"}, + {"name":"Y","vis":"public","signature":"Y!"}, + {"name":"Width","vis":"public","signature":"Width!"}, + {"name":"Height","vis":"public","signature":"Height!"} + ], + "members": [ + {"name":"AsGpRect","kind":"function","vis":"public","signature":"Function AsGpRect() As GpRect","returnType":"GpRect"}, + {"name":"AsRECT","kind":"function","vis":"public","signature":"Function AsRECT() As GDIP_RECT","returnType":"GDIP_RECT"}, + {"name":"AsRECTF","kind":"function","vis":"public","signature":"Function AsRECTF() As GDIP_RECTF","returnType":"GDIP_RECTF"}, + {"name":"Bottom","kind":"property","vis":"public","signature":"Property Get Bottom() As Single","returnType":"Single","accessor":"Get"}, + {"name":"BottomLeft","kind":"property","vis":"public","signature":"Property Get BottomLeft() As GpPointF","returnType":"GpPointF","accessor":"Get"}, + {"name":"BottomRight","kind":"property","vis":"public","signature":"Property Get BottomRight() As GpPointF","returnType":"GpPointF","accessor":"Get"}, + {"name":"Contains","kind":"function","vis":"public","signature":"Function Contains(rect As GpRectF) As Boolean","returnType":"Boolean"}, + {"name":"Contains2","kind":"function","vis":"public","signature":"Function Contains2(ByVal x!, ByVal y!) As Boolean","returnType":"Boolean"}, + {"name":"ContainsPt","kind":"function","vis":"public","signature":"Function ContainsPt(ByVal pt As GpPointF) As Boolean","returnType":"Boolean"}, + {"name":"Diagonal","kind":"property","vis":"public","signature":"Property Let Diagonal(ByVal diag!)","accessor":"Let"}, + {"name":"Diagonal","kind":"property","vis":"public","signature":"Property Get Diagonal() As Single","returnType":"Single","accessor":"Get"}, + {"name":"Equals","kind":"function","vis":"public","signature":"Function Equals(rect As GpRectF) As Boolean","returnType":"Boolean"}, + {"name":"Inflate","kind":"sub","vis":"public","signature":"Sub Inflate(ByVal dx!, ByVal dy!)"}, + {"name":"InflatePt","kind":"sub","vis":"public","signature":"Sub InflatePt(ByVal point As GpPointF)"}, + {"name":"InflatedBy","kind":"function","vis":"public","signature":"Function InflatedBy(ByVal dx!, ByVal dy!) As GpRectF","returnType":"GpRectF"}, + {"name":"InflatedByPt","kind":"function","vis":"public","signature":"Function InflatedByPt(ByVal pt As GpPointF) As GpRectF","returnType":"GpRectF"}, + {"name":"Intersect","kind":"function","vis":"public","signature":"Function Intersect(rect As GpRectF) As Boolean","returnType":"Boolean"}, + {"name":"IntersectedWith","kind":"function","vis":"public","signature":"Function IntersectedWith(rect As GpRectF) As GpRectF","returnType":"GpRectF"}, + {"name":"IntersectsWith","kind":"function","vis":"public","signature":"Function IntersectsWith(rect As GpRectF) As Boolean","returnType":"Boolean"}, + {"name":"IsEmptyArea","kind":"property","vis":"public","signature":"Property Get IsEmptyArea() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"Left","kind":"property","vis":"public","signature":"Property Get Left() As Single","returnType":"Single","accessor":"Get"}, + {"name":"Location","kind":"property","vis":"public","signature":"Property Let Location(ByVal loc As GpPointF)","accessor":"Let"}, + {"name":"Location","kind":"property","vis":"public","signature":"Property Get Location() As GpPointF","returnType":"GpPointF","accessor":"Get"}, + {"name":"Offset","kind":"sub","vis":"public","signature":"Sub Offset(ByVal dx!, ByVal dy!)"}, + {"name":"OffsetBy","kind":"function","vis":"public","signature":"Function OffsetBy(ByVal dx!, ByVal dy!) As GpRectF","returnType":"GpRectF"}, + {"name":"OffsetByPt","kind":"function","vis":"public","signature":"Function OffsetByPt(ByVal pt As GpPointF) As GpRectF","returnType":"GpRectF"}, + {"name":"OffsetPt","kind":"sub","vis":"public","signature":"Sub OffsetPt(ByVal point As GpPointF)"}, + {"name":"Right","kind":"property","vis":"public","signature":"Property Get Right() As Single","returnType":"Single","accessor":"Get"}, + {"name":"SetFrom","kind":"sub","vis":"public","signature":"Sub SetFrom(src As GpRect)"}, + {"name":"SetFromRECT","kind":"sub","vis":"public","signature":"Sub SetFromRECT(src As GDIP_RECT)"}, + {"name":"SetFromRECTF","kind":"sub","vis":"public","signature":"Sub SetFromRECTF(src As GDIP_RECTF)"}, + {"name":"Size","kind":"property","vis":"public","signature":"Property Let Size(ByVal sz As GpSizeF)","accessor":"Let"}, + {"name":"Size","kind":"property","vis":"public","signature":"Property Get Size() As GpSizeF","returnType":"GpSizeF","accessor":"Get"}, + {"name":"ToRECTF","kind":"sub","vis":"public","signature":"Sub ToRECTF(dst As GDIP_RECTF)"}, + {"name":"Top","kind":"property","vis":"public","signature":"Property Get Top() As Single","returnType":"Single","accessor":"Get"}, + {"name":"TopLeft","kind":"property","vis":"public","signature":"Property Get TopLeft() As GpPointF","returnType":"GpPointF","accessor":"Get"}, + {"name":"TopRight","kind":"property","vis":"public","signature":"Property Get TopRight() As GpPointF","returnType":"GpPointF","accessor":"Get"}, + {"name":"Unite","kind":"function","vis":"public","signature":"Function Unite(rect As GpRectF) As Boolean","returnType":"Boolean"}, + {"name":"UnitedWith","kind":"function","vis":"public","signature":"Function UnitedWith(rect As GpRectF) As GpRectF","returnType":"GpRectF"} + ] + }, + { + "name": "GpSize", + "kind": "type", + "in": "Types", + "vis": "public", + "file": "GdiPlus/Types.twin", + "signature": "Type GpSize", + "description": "Represents a dimension in a 2D coordinate system (integer coordinates)", + "fields": [ + {"name":"Width","vis":"public","signature":"Width&"}, + {"name":"Height","vis":"public","signature":"Height&"} + ], + "members": [ + {"name":"Add","kind":"sub","vis":"public","signature":"Sub Add(ByVal sz As GpSize)"}, + {"name":"AsGpRect","kind":"function","vis":"public","signature":"Function AsGpRect() As GpRect","returnType":"GpRect"}, + {"name":"AsGpRectF","kind":"function","vis":"public","signature":"Function AsGpRectF() As GpRectF","returnType":"GpRectF"}, + {"name":"AsGpSizeF","kind":"function","vis":"public","signature":"Function AsGpSizeF() As GpSizeF","returnType":"GpSizeF"}, + {"name":"AsRECT","kind":"function","vis":"public","signature":"Function AsRECT() As GDIP_RECT","returnType":"GDIP_RECT"}, + {"name":"AsSIZE","kind":"function","vis":"public","signature":"Function AsSIZE() As GDIP_SIZE","returnType":"GDIP_SIZE"}, + {"name":"Diff","kind":"function","vis":"public","signature":"Function Diff(ByVal sz As GpSize) As GpSize","returnType":"GpSize"}, + {"name":"Empty","kind":"property","vis":"public","signature":"Property Get Empty() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"Equals","kind":"function","vis":"public","signature":"Function Equals(ByVal sz As GpSize) As Boolean","returnType":"Boolean"}, + {"name":"SetFrom","kind":"sub","vis":"public","signature":"Sub SetFrom(ByVal other As GpSizeF)"}, + {"name":"SetFromSIZE","kind":"sub","vis":"public","signature":"Sub SetFromSIZE(ByVal other As GDIP_SIZE)"}, + {"name":"Sub","kind":"sub","vis":"public","signature":"Sub Sub(ByVal sz As GpSize)"}, + {"name":"Sum","kind":"function","vis":"public","signature":"Function Sum(ByVal sz As GpSize) As GpSize","returnType":"GpSize"} + ] + }, + { + "name": "GpSizeF", + "kind": "type", + "in": "Types", + "vis": "public", + "file": "GdiPlus/Types.twin", + "signature": "Type GpSizeF", + "description": "Represents a dimension in a 2D coordinate system (floating-point coordinates)", + "fields": [ + {"name":"Width","vis":"public","signature":"Width!"}, + {"name":"Height","vis":"public","signature":"Height!"} + ], + "members": [ + {"name":"Add","kind":"sub","vis":"public","signature":"Sub Add(ByVal sz As GpSizeF)"}, + {"name":"AsGpRect","kind":"function","vis":"public","signature":"Function AsGpRect() As GpRect","returnType":"GpRect"}, + {"name":"AsGpRectF","kind":"function","vis":"public","signature":"Function AsGpRectF() As GpRectF","returnType":"GpRectF"}, + {"name":"AsGpSize","kind":"function","vis":"public","signature":"Function AsGpSize() As GpSize","returnType":"GpSize"}, + {"name":"AsRECT","kind":"function","vis":"public","signature":"Function AsRECT() As GDIP_RECT","returnType":"GDIP_RECT"}, + {"name":"AsSIZE","kind":"function","vis":"public","signature":"Function AsSIZE() As GDIP_SIZE","returnType":"GDIP_SIZE"}, + {"name":"Diagonal","kind":"property","vis":"public","signature":"Property Let Diagonal(ByVal diag!)","accessor":"Let"}, + {"name":"Diagonal","kind":"property","vis":"public","signature":"Property Get Diagonal() As Single","returnType":"Single","accessor":"Get"}, + {"name":"Diff","kind":"function","vis":"public","signature":"Function Diff(ByVal sz As GpSizeF) As GpSizeF","returnType":"GpSizeF"}, + {"name":"Empty","kind":"property","vis":"public","signature":"Property Get Empty() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"Equals","kind":"function","vis":"public","signature":"Function Equals(ByVal sz As GpSizeF) As Boolean","returnType":"Boolean"}, + {"name":"InvScale","kind":"sub","vis":"public","signature":"Sub InvScale(ByVal invs!)"}, + {"name":"InvScale2","kind":"sub","vis":"public","signature":"Sub InvScale2(ByVal isx!, ByVal isy!)"}, + {"name":"Prod","kind":"function","vis":"public","signature":"Function Prod(ByVal s!) As GpSizeF","returnType":"GpSizeF"}, + {"name":"Prod2","kind":"function","vis":"public","signature":"Function Prod2(ByVal sx!, ByVal sy!) As GpSizeF","returnType":"GpSizeF"}, + {"name":"Quot","kind":"function","vis":"public","signature":"Function Quot(ByVal invs!) As GpSizeF","returnType":"GpSizeF"}, + {"name":"Quot2","kind":"function","vis":"public","signature":"Function Quot2(ByVal isx!, ByVal isy!) As GpSizeF","returnType":"GpSizeF"}, + {"name":"Scale","kind":"sub","vis":"public","signature":"Sub Scale(ByVal s!)"}, + {"name":"Scale2","kind":"sub","vis":"public","signature":"Sub Scale2(ByVal sx!, ByVal sy!)"}, + {"name":"SetFrom","kind":"sub","vis":"public","signature":"Sub SetFrom(ByVal other As GpSize)"}, + {"name":"SetFromSIZE","kind":"sub","vis":"public","signature":"Sub SetFromSIZE(ByVal other As GDIP_SIZE)"}, + {"name":"Sub","kind":"sub","vis":"public","signature":"Sub Sub(ByVal sz As GpSizeF)"}, + {"name":"Sum","kind":"function","vis":"public","signature":"Function Sum(ByVal sz As GpSizeF) As GpSizeF","returnType":"GpSizeF"} + ] + }, + { + "name": "GpStatus", + "kind": "enum", + "in": "Types", + "vis": "public", + "file": "GdiPlus/Types.twin", + "signature": "Public Enum GpStatus", + "values": [ + {"name":"Ok","value":"0"}, + {"name":"GenericError","value":"1"}, + {"name":"InvalidParameter","value":"2"}, + {"name":"OutOfMemory","value":"3"}, + {"name":"ObjectBusy","value":"4"}, + {"name":"InsufficientBuffer","value":"5"}, + {"name":"NotImplemented","value":"6"}, + {"name":"Win32Error","value":"7"}, + {"name":"WrongState","value":"8"}, + {"name":"Aborted","value":"9"}, + {"name":"FileNotFound","value":"10"}, + {"name":"ValueOverflow","value":"11"}, + {"name":"AccessDenied","value":"12"}, + {"name":"UnknownImageFormat","value":"13"}, + {"name":"FontFamilyNotFound","value":"14"}, + {"name":"FontStyleNotFound","value":"15"}, + {"name":"NotTrueTypeFont","value":"16"}, + {"name":"UnsupportedGdiplusVersion","value":"17"}, + {"name":"GdiplusNotInitialized","value":"18"}, + {"name":"PropertyNotFound","value":"19"}, + {"name":"PropertyNotSupported","value":"20"}, + {"name":"ProfileNotFound","value":"21"}, + {"name":"LastGpStatus","value":"21"} + ] + }, + { + "name": "TypesTest", + "kind": "module", + "vis": "private", + "public": false, + "file": "Tests/Types.twin", + "signature": "Private Module TypesTest", + "members": [ + {"name":"Point","kind":"sub","vis":"public","signature":"Sub Point()","attrs":[{"name":"DebugOnly"}]}, + {"name":"PointF","kind":"sub","vis":"public","signature":"Sub PointF()","attrs":[{"name":"DebugOnly"}]}, + {"name":"Rect","kind":"sub","vis":"public","signature":"Sub Rect()","attrs":[{"name":"DebugOnly"}]}, + {"name":"RectF","kind":"sub","vis":"public","signature":"Sub RectF()","attrs":[{"name":"DebugOnly"}]}, + {"name":"Size","kind":"sub","vis":"public","signature":"Sub Size()","attrs":[{"name":"DebugOnly"}]}, + {"name":"SizeF","kind":"sub","vis":"public","signature":"Sub SizeF()","attrs":[{"name":"DebugOnly"}]} + ] + }, + { + "name": "VBGraphics", + "kind": "class", + "vis": "public", + "file": "GdiPlus/VBGraphics.twin", + "signature": "Class VBGraphics", + "inherits": ["Graphics"], + "attrs": [{"name":"COMCreatable","args":"False"}], + "members": [ + {"name":"BaseBrush","kind":"property","vis":"protected","signature":"Protected Property Get BaseBrush() As GpBrush","returnType":"GpBrush","accessor":"Get"}, + {"name":"Circle","kind":"sub","vis":"public","signature":"Public Sub Circle(ByVal Flags As VBPaintFlags, ByVal X!, ByVal Y!, ByVal Radius!, ByVal Clr&, ByVal Start!, ByVal _End!, ByVal Aspect!)","description":"Draws a circle or an ellipse.\n[For details, see this page](https://learn.microsoft.com/en-us/previous-versions/visualstudio/visual-basic-6/aa230478(v=vs.60)"}, + {"name":"Class_Terminate","kind":"sub","vis":"public","signature":"Sub Class_Terminate()"}, + {"name":"Current","kind":"property","vis":"public","signature":"Property Get Current() As GpPointF","returnType":"GpPointF","accessor":"Get","description":"Gets the current position used for Line and Print, in world units."}, + {"name":"Current","kind":"property","vis":"public","signature":"Property Let Current(ByVal pt As GpPointF)","accessor":"Let","description":"Sets the current position, in world units. It is used for Print,\nand for Line when the starting coordinates are not given."}, + {"name":"CurrentX","kind":"property","vis":"public","signature":"Property Get CurrentX() As Single","returnType":"Single","accessor":"Get","description":"Gets the current X position used for Line and Print, in world units."}, + {"name":"CurrentX","kind":"property","vis":"public","signature":"Property Let CurrentX(ByVal x!)","accessor":"Let","description":"Sets the current X position, in world units. It is used for Print,\nand for Line when the starting coordinates are not given."}, + {"name":"CurrentY","kind":"property","vis":"public","signature":"Property Get CurrentY() As Single","returnType":"Single","accessor":"Get","description":"Gets the current Y position used for Line and Print, in world units."}, + {"name":"CurrentY","kind":"property","vis":"public","signature":"Property Let CurrentY(ByVal y!)","accessor":"Let","description":"Sets the current Y position, in world units. It is used for Print,\nand for Line when the starting coordinates are not given."}, + {"name":"DrawWidth","kind":"property","vis":"public","signature":"Property Get DrawWidth() As Single","returnType":"Single","accessor":"Get","description":"Retrieves the width of the pen used by Line, in world units"}, + {"name":"DrawWidth","kind":"property","vis":"public","signature":"Property Let DrawWidth(ByVal width As Single)","accessor":"Let","description":"Sets the width of the pen used by Line, in world units."}, + {"name":"FillColor","kind":"property","vis":"public","signature":"Property Get FillColor() As Color","returnType":"Color","accessor":"Get"}, + {"name":"FillColor","kind":"property","vis":"public","signature":"Property Let FillColor(ByVal color As Color)","accessor":"Let"}, + {"name":"FillStyle","kind":"property","vis":"public","signature":"Property Get FillStyle() As FillStyleConstants","returnType":"FillStyleConstants","accessor":"Get"}, + {"name":"FillStyle","kind":"property","vis":"public","signature":"Property Let FillStyle(ByVal style As FillStyleConstants)","accessor":"Let"}, + {"name":"ForeColor","kind":"property","vis":"public","signature":"Property Get ForeColor() As Color","returnType":"Color","accessor":"Get"}, + {"name":"ForeColor","kind":"property","vis":"public","signature":"Property Let ForeColor(ByVal color As Color)","accessor":"Let"}, + {"name":"Init","kind":"sub","vis":"private","signature":"Private Sub Init()"}, + {"name":"InitPenBrush","kind":"function","vis":"protected","signature":"Protected Function InitPenBrush(ByVal flags As VBPaintFlags, ByVal clr&) As Color","returnType":"Color"}, + {"name":"Line","kind":"sub","vis":"public","signature":"Sub Line(ByVal Flags As VBPaintFlags, ByVal X1!, ByVal Y1!, ByVal X2!, ByVal Y2!, ByVal Clr&)","description":"Draws a line, rectangle outline, or a filled rectangle.\n[For details, see this page.](https://learn.microsoft.com/en-us/previous-versions/visualstudio/visual-basic-6/aa230480(v=vs.60))"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(ByVal options As GraphicsCreationOptions, ByVal h1 As LongPtr, ByVal h2 As LongPtr = 0)"}, + {"name":"New","kind":"sub","vis":"public","signature":"Sub New(image As Image)"}, + {"name":"PSet","kind":"sub","vis":"public","signature":"Public Sub PSet(ByVal Flags As VBPaintFlags, ByVal X!, ByVal Y!, ByVal Clr&)","description":"Draws a single point.\n[For details, see this page](https://learn.microsoft.com/en-us/previous-versions/visualstudio/visual-basic-6/aa230482(v=vs.60))"}, + {"name":"UseTransparentAlpha","kind":"property","vis":"public","signature":"Property Get UseTransparentAlpha() As Boolean","returnType":"Boolean","accessor":"Get","description":"Returns whether the transparent alpha color channel is used, otherwise it is assumed to be 255"}, + {"name":"UseTransparentAlpha","kind":"property","vis":"public","signature":"Property Let UseTransparentAlpha(ByVal choice As Boolean)","accessor":"Let","description":"Sets whether the transparent alphas color channel will be used, otherwise it'll be assumed to be 255"}, + {"name":"_fillColor","kind":"field","vis":"private","signature":"Dim _fillColor As Color"}, + {"name":"_fillStyle","kind":"field","vis":"private","signature":"Dim _fillStyle As FillStyleConstants"}, + {"name":"_foreColor","kind":"field","vis":"private","signature":"Dim _foreColor As Color"}, + {"name":"brush","kind":"field","vis":"private","signature":"Dim brush As GpSolidFill"}, + {"name":"flags","kind":"field","vis":"private","signature":"Dim flags As GraphicsFlags = LegacyTransparentDrawing"}, + {"name":"pen","kind":"field","vis":"private","signature":"Dim pen As GpPen"}, + {"name":"pos","kind":"field","vis":"private","signature":"Dim pos As GpPointF"} + ] + }, + { + "name": "FillStyleConstants", + "kind": "enum", + "in": "VBGraphics", + "vis": "public", + "file": "GdiPlus/VBGraphics.twin", + "signature": "Public Enum FillStyleConstants", + "values": [ + {"name":"vbFSSolid","value":"0"}, + {"name":"vbFSTransparent","value":"1"} + ] + }, + { + "name": "VBPaintFlags", + "kind": "enum", + "in": "VBGraphics", + "vis": "private", + "public": false, + "file": "GdiPlus/VBGraphics.twin", + "signature": "Private Enum VBPaintFlags", + "values": [ + {"name":"StepOnFirstCoords","value":"1"}, + {"name":"ColorSpecified","value":"2"}, + {"name":"FirstCoordsSpecified","value":"4"}, + {"name":"StepOnSecondCoords","value":"8"}, + {"name":"Box","value":"16"}, + {"name":"BoxFilled","value":"32"}, + {"name":"StartSpecified","value":"64"}, + {"name":"EndSpecified","value":"128"}, + {"name":"AspectSpecified","value":"256"} + ] + } + ], + "aliases": [ + {"name":"ARGB","target":"Long","vis":"public","file":"GdiPlus/Types.twin","signature":"Alias ARGB As Long"}, + {"name":"ARGB64","target":"LongLong","vis":"public","file":"GdiPlus/Types.twin","signature":"Alias ARGB64 As LongLong"}, + {"name":"AdjustableArrowCap","target":"ArrowCap","vis":"public","file":"GdiPlus/ArrowCap.twin","signature":"Alias AdjustableArrowCap As ArrowCap"}, + {"name":"Brush","target":"IBrush","vis":"public","file":"GdiPlus/Brush.twin","signature":"Alias Brush As IBrush"}, + {"name":"GpAdjustableArrowCap","target":"GpArrowCap","vis":"public","file":"GdiPlus/ArrowCap.twin","signature":"Alias GpAdjustableArrowCap As GpArrowCap"}, + {"name":"GraphicsContainer","target":"Long","vis":"public","file":"GdiPlus/Types.twin","signature":"Alias GraphicsContainer As Long"}, + {"name":"GraphicsState","target":"Long","vis":"public","file":"GdiPlus/Types.twin","signature":"Alias GraphicsState As Long"}, + {"name":"LANGID","target":"WORD","vis":"public","file":"GdiPlus/FontFamily.twin","signature":"Alias LANGID As WORD"}, + {"name":"PROPID","target":"Long","vis":"public","file":"GdiPlus/Image.twin","signature":"Alias PROPID As Long"}, + {"name":"UINT","target":"Long","vis":"public","file":"GdiPlus/Types.twin","signature":"Alias UINT As Long"}, + {"name":"ULONG","target":"Long","vis":"public","file":"GdiPlus/Types.twin","signature":"Alias ULONG As Long"}, + {"name":"WORD","target":"Integer","vis":"public","file":"GdiPlus/FontFamily.twin","signature":"Alias WORD As Integer"} + ], + "problems": [ + {"file":"GdiPlus/GdiPlusUser.twin","line":154,"why":"no field in module GdipGdiPlusUser: Public Delegate PtrSafe Sub DebugEventProc (ByVal level As GdiplusDebugEventLeve"}, + {"file":"GdiPlus/GdiPlusUser.twin","line":157,"why":"no field in module GdipGdiPlusUser: Public Delegate PtrSafe Function NotificationHookProc (ByRef token As ULONG) As "}, + {"file":"GdiPlus/GdiPlusUser.twin","line":158,"why":"no field in module GdipGdiPlusUser: Public Delegate PtrSafe Sub NotificationUnhookProc (ByVal token As ULONG)"} + ] +} diff --git a/scripts/check_package_tests.mjs b/scripts/check_package_tests.mjs index fec01879..aee101f1 100644 --- a/scripts/check_package_tests.mjs +++ b/scripts/check_package_tests.mjs @@ -93,7 +93,7 @@ if ( // The contributed sections that have no test project yet. Each package's project removes it // from here; the gate fails on a name here with a project, and on a section neither here nor // with one. -const PENDING = new Set(["ArrayListLib", "WinReg"]); +const PENDING = new Set(["ArrayListLib", "GdiPlus", "WinReg"]); const DOCS = path.join(REPO_ROOT, "docs"); const SECTIONS = path.join(DOCS, "Reference", "Contributed"); diff --git a/test/example-projects/contributed-GdiPlus/Settings b/test/example-projects/contributed-GdiPlus/Settings new file mode 100644 index 00000000..37082c87 --- /dev/null +++ b/test/example-projects/contributed-GdiPlus/Settings @@ -0,0 +1,74 @@ +{ + "configuration.inherits": "Defaults", + "project.appTitle": "Documentation samples", + "project.buildPath": "${SourcePath}\\Build\\${ProjectName}_${Architecture}.${FileExtension}", + "project.buildType": "Standard EXE", + "project.description": "Template for scripts/check_examples.mjs. project.id, project.name and project.buildPath are rewritten in the staged copy, one per batch.", + "project.exportPathIsV2": true, + "project.id": "{7B247400-0000-4000-9000-7B2474000000}", + "project.name": "DocSamples", + "project.optionExplicit": true, + "project.references": [ + { + "id": "{00020430-0000-0000-C000-000000000046}", + "lcid": 0, + "name": "OLE Automation", + "path32": "C:\\Windows\\SysWOW64\\stdole2.tlb", + "path64": "C:\\Windows\\System32\\stdole2.tlb", + "symbolId": "stdole", + "versionMajor": 2, + "versionMinor": 0 + }, + { + "id": "{F50B82D0-DCAB-43FE-9631-11959D4A4728}", + "isCompilerPackage": true, + "licence": "MIT", + "name": "[COMPILER PACKAGE] twinBASIC - VB Compatibility Package (Forms)", + "path32": "", + "path64": "", + "publisher": "TWINBASIC-COMPILER", + "symbolId": "VB", + "versionBuild": 0, + "versionMajor": 0, + "versionMinor": 0, + "versionRevision": 31 + }, + { + "id": "{C192FB39-64CA-4D9B-B477-A5502F48EFCC}", + "isCompilerPackage": true, + "licence": "MIT", + "name": "[COMPILER PACKAGE] twinBASIC - App global class object", + "path32": "", + "path64": "", + "publisher": "TWINBASIC-COMPILER", + "symbolId": "AppGlobalClassProject", + "versionBuild": 0, + "versionMajor": 1, + "versionMinor": 0, + "versionRevision": 0 + }, + { + "autoCtlExt": true, + "id": "{36057D8B-2239-4205-A267-309AE927D5B7}", + "licence": "MIT", + "name": "[IMPORTED] GdiPlus class library for tB", + "path32": "/Packages/GdiPlus", + "path64": "/Packages/GdiPlus", + "symbolId": "GdiPlus", + "versionBuild": "0", + "versionMajor": "0", + "versionMinor": "9", + "versionRevision": "45" + } + ], + "project.settingsVersion": 1, + "project.startupObject": "Sub Main", + "project.warnings": { + "errors": [], + "hints": [], + "ignored": [], + "info": [], + "warnings": [] + }, + "runtime.useUnicodeStandardLibrary": true +} From 8b78c834dcf8b3dba3ca19c7831bb7d02da28832 Mon Sep 17 00:00:00 2001 From: Kuba Sunderland-Ober Date: Thu, 15 Oct 2026 22:48:38 +0200 Subject: [PATCH 3/6] AutoCompleteLib and VBComDlg complete: their 20 enumerations have pages (Enumerations/), AutoCompleteHandle excluded as CommonDialogBase is; new WARNING with a failing case: ShowFolderBrowser returns True with an empty FileName for a computer or a printer; HelpCommand's Index names are the older names of Contents --- WIP.md | 2 +- builder/page-baseline.json | 2 +- .../AutoCompleteLib/AutoComplete.md | 6 +- .../AutoCompleteFileSystemOptionConstants.md | 33 +++++ .../AutoCompleteOptionConstants.md | 34 +++++ .../AutoCompleteSourceConstants.md | 32 +++++ .../AutoCompleteLib/Enumerations/index.md | 17 +++ .../Contributed/AutoCompleteLib/index.md | 4 + .../Contributed/VBComDlg/CommonDialog.md | 46 +++--- .../VBComDlg/Enumerations/CdlBIFConstants.md | 48 +++++++ .../VBComDlg/Enumerations/CdlCCConstants.md | 33 +++++ .../VBComDlg/Enumerations/CdlCFConstants.md | 45 ++++++ .../Enumerations/CdlErrorConstants.md | 51 +++++++ .../VBComDlg/Enumerations/CdlFRConstants.md | 42 ++++++ .../VBComDlg/Enumerations/CdlHelpConstants.md | 41 ++++++ .../VBComDlg/Enumerations/CdlOFNConstants.md | 46 ++++++ .../CdlOFNShareViResultConstants.md | 29 ++++ .../VBComDlg/Enumerations/CdlPDConstants.md | 48 +++++++ .../Enumerations/CdlPDResultConstants.md | 29 ++++ .../VBComDlg/Enumerations/CdlPRBNConstants.md | 40 ++++++ .../VBComDlg/Enumerations/CdlPRCMConstants.md | 29 ++++ .../VBComDlg/Enumerations/CdlPRDPConstants.md | 31 ++++ .../VBComDlg/Enumerations/CdlPRORConstants.md | 30 ++++ .../VBComDlg/Enumerations/CdlPRPQConstants.md | 32 +++++ .../VBComDlg/Enumerations/CdlPRPSConstants.md | 71 +++++++++ .../VBComDlg/Enumerations/CdlPSDConstants.md | 41 ++++++ .../VBComDlg/Enumerations/index.md | 74 ++++++++++ docs/Reference/Contributed/VBComDlg/index.md | 4 + .../VBComDlg/Sources/DialogDriver.twin | 136 ++++++++++++++++++ .../VBComDlg/Sources/FolderBrowserTests.twin | 30 ++++ .../VBComDlg/Sources/RunAll.twin | 6 +- test/package-tests/VBComDlg/expect.json | 3 + 32 files changed, 1088 insertions(+), 27 deletions(-) create mode 100644 docs/Reference/Contributed/AutoCompleteLib/Enumerations/AutoCompleteFileSystemOptionConstants.md create mode 100644 docs/Reference/Contributed/AutoCompleteLib/Enumerations/AutoCompleteOptionConstants.md create mode 100644 docs/Reference/Contributed/AutoCompleteLib/Enumerations/AutoCompleteSourceConstants.md create mode 100644 docs/Reference/Contributed/AutoCompleteLib/Enumerations/index.md create mode 100644 docs/Reference/Contributed/VBComDlg/Enumerations/CdlBIFConstants.md create mode 100644 docs/Reference/Contributed/VBComDlg/Enumerations/CdlCCConstants.md create mode 100644 docs/Reference/Contributed/VBComDlg/Enumerations/CdlCFConstants.md create mode 100644 docs/Reference/Contributed/VBComDlg/Enumerations/CdlErrorConstants.md create mode 100644 docs/Reference/Contributed/VBComDlg/Enumerations/CdlFRConstants.md create mode 100644 docs/Reference/Contributed/VBComDlg/Enumerations/CdlHelpConstants.md create mode 100644 docs/Reference/Contributed/VBComDlg/Enumerations/CdlOFNConstants.md create mode 100644 docs/Reference/Contributed/VBComDlg/Enumerations/CdlOFNShareViResultConstants.md create mode 100644 docs/Reference/Contributed/VBComDlg/Enumerations/CdlPDConstants.md create mode 100644 docs/Reference/Contributed/VBComDlg/Enumerations/CdlPDResultConstants.md create mode 100644 docs/Reference/Contributed/VBComDlg/Enumerations/CdlPRBNConstants.md create mode 100644 docs/Reference/Contributed/VBComDlg/Enumerations/CdlPRCMConstants.md create mode 100644 docs/Reference/Contributed/VBComDlg/Enumerations/CdlPRDPConstants.md create mode 100644 docs/Reference/Contributed/VBComDlg/Enumerations/CdlPRORConstants.md create mode 100644 docs/Reference/Contributed/VBComDlg/Enumerations/CdlPRPQConstants.md create mode 100644 docs/Reference/Contributed/VBComDlg/Enumerations/CdlPRPSConstants.md create mode 100644 docs/Reference/Contributed/VBComDlg/Enumerations/CdlPSDConstants.md create mode 100644 docs/Reference/Contributed/VBComDlg/Enumerations/index.md create mode 100644 test/package-tests/VBComDlg/Sources/FolderBrowserTests.twin diff --git a/WIP.md b/WIP.md index 0241ff3c..1884b6ad 100644 --- a/WIP.md +++ b/WIP.md @@ -35,7 +35,7 @@ sibling. History goes nowhere: git keeps it. Reference documentation is **complete** for all thirteen packages: VBA, VBRUN, VB, WebView2, Assert, CustomControls, CEF, WinEventLogLib, WinNamedPipesLib, WinServicesLib, tbIDE, WinNativeCommonCtls and AppGlobalClassObject. It is adapted from primary sources: Microsoft VBA-Docs (CC-BY-4.0) for the runtime library, `.twin` source for the twinBASIC-specific packages. The CEF and WebView2 packages also carry a tutorial set. -Twenty-six **contributed** packages from TWINSERV have sections under `docs/Reference/Contributed/`: ArrayListLib, FileProps, Fmt, Generics, OLEGuids, WinReg, TwinTimerLib, tbFileSysTools, TBMANLIB, TBMANLIB_Aes, TBMANLIB_ConsoleComponents, TBMANLIB_ConsoleCore, TBMANLIB_Diagnostic, TBMANLIB_Dialog, TBMANLIB_ListBoxHScroll, TBMANLIB_RES, TBMANLIB_Xml, tbProjPacker, tbRegExp, tsJson, tsPwGen, VBA_JSON and xCalendar complete; AutoCompleteLib, BigNumberLib and VBComDlg their main class only. TBMANLIB_ConsoleCore's console claims are checked by its test cases, each on a console screen buffer of its own with its input written by `WriteConsoleInput`; TBMANLIB_ConsoleComponents' follow the source, because the samples harness cannot capture a console. Generics (seven tuple classes) and xCalendar (one control) are each one page (owner), so `analyze` in audit mode lists their classes and members as undocumented. What xCalendar's page says it does at run time comes from `test/package-tests/xCalendar/probe/`, which runs the control on a form in a built exe. Fmt documents its test code (`HelloWorldClass`, `HelloWorldModule`, `Pootle`) in one paragraph of its landing page, which `exclude_from_docs` names; Generics' `exclude_from_docs` names its test code, `HelloWorldModule`, which the page does not mention. VBComDlg's `exclude_from_docs` names `CommonDialogBase`, a module whose public procedures only its class calls. tbRegExp's `exclude_from_docs` names its private engine module, `StaticRegex`, and tbProjPacker's its helper modules, `modImpExp` and `modWin32`: the indexer counts a Public Enum as public even inside a Private Module, because a built-in package's are reached through its library symbol written with an asterisk (`*WinNativeCommonCtls`, as `ImlDrawConstants` says). By its bare name no such enum is reachable, in a built-in or a contributed package (TB5079 on BETA 1005). OLEGuids documents each interface's methods on the interface's page. What TBMANLIB_Dialog's pages say its dialogs do comes from `test/package-tests/TBMANLIB_Dialog/probe/`, which operates them in a built exe on a private desktop; run it again when the package's version changes. TBMANLIB_Dialog 1.1.0.0 has a page of its own for each class except cDialog, which keeps a page for each member, so `analyze` in audit mode lists the members of those one-page classes as undocumented; its `exclude_from_docs` names its test module, `TestModule`, and the seven COM interface declarations that cDialogEx calls inside (`IOleWindow`, `IModalWindow`, `IShellItem`, `IShellItemArray`, `IFileDialog`, `IFileOpenDialog`, `IFileSaveDialog`), which its landing page describes in a paragraph. cDialogEx 1.1.0.0 returns the name of the chosen file, not its path, ignores `InitialDir` and ignores a `Filter` that has no closing pipe, each documented as a WARNING. tbRegExp is the first section drafted by the doc-draft workflow ([WIP.Indexer.md](WIP.Indexer.md#draft-and-the-doc-draft-workflow)), then reviewed against the sources, the package's README and VBScript's own **RegExp** under `cscript`. tbRegExp 1.9.0.0 raises `vbObjectError + 3016` from a search that uses up its step budget and returns nothing (1.8.0.0's `SearchAborted` is gone); the budget is 10 steps for each character squared, at least 1,000,000 and at most 100,000,000, for the search of one match, and `RegExp.SearchStepLimit` replaces it with a fixed number, documented on its own page and in a section of the landing page. On the dev box (BETA 1005, win32) `\d+x` costs between 2.0 and 2.2 × n² steps, so it finishes on 7,000 digits (15 s) and raises on 10,000 (16 s); `(a+)+b` raises in 0.2 s on 30 or 300 `a` but takes 16 s on 3,000; `a*` matches 1,000,000 characters whole in about half a second. Its pattern syntax has a page of its own, `PatternSyntax.md`. Each one that is not Experimental has a chapter in the book's Packages part; the Experimental ones are left out of the book. **ArrayListLib, BigNumberLib, GdiPlus, TBMANLIB, TBMANLIB_Aes, TBMANLIB_ConsoleComponents, TBMANLIB_ConsoleCore, TBMANLIB_Diagnostic, TBMANLIB_Dialog, TBMANLIB_ListBoxHScroll, TBMANLIB_Xml, WinReg and xCalendar are listed under Experimental Packages** (`docs/Reference/Experimental.md`, owner): ArrayListLib and WinReg do not compile on BETA 1005 (each documented from its source and a copy of it that builds, its samples compile-only; in a copy of ArrayListLib 1.6.151.1 with the arguments of its three `VSwap` calls passed `ByVal` and `LSetByVal` taking a `LongPtr`, a For Each over a list with no items fails, ToString of such a list never returns, Reverse keeps the middle pair of an even run in place and a second GetEnumerator over a list ignores its arguments; in a copy of WinReg's source with its four failing calls passed `ByVal`, ReadString, GetRegistryValueType and the first ConvertValueToString give wrong results), xCalendar has a grid that keeps the old month's dates when Value is set to another month, and text colour properties that have no effect, BigNumberLib 1.0.2.0 compiles, but loses the minus sign after `IsNegative = True` and in a negative operand of the greatest common divisor and the least common multiple, makes a zero from `AssignFromLong` negative, and does not return from the modular inverse of zero (all four confirmed by a second agent), TBMANLIB 1.0.0.29 does not compile in a 64-bit build (TB5001 in cSubClass, where the window procedure is passed as a Long) and has many members that fail or give wrong results, TBMANLIB_ConsoleComponents cannot take a cConsole of the published TBMANLIB_ConsoleCore (it embeds a copy of it, the same package at 1.0.0.1, whose types the compiler treats as different; checked in a project made by the IDE's own import, in either order), TBMANLIB_ConsoleCore reads keys wrongly, TBMANLIB_Diagnostic cannot create its Dictionary and misplaces List items, TBMANLIB_Dialog 1.1.0.0 has classes that fail at their main task (cDialogFindReplace reports nothing, cDialogPageSetup ignores paper and orientation, cDialogEx returns names without their folder, cDialogPassword shows the password in its confirmation boxes; every defect confirmed by a second agent, owner), TBMANLIB_ListBoxHScroll 1.0.0.1 moves the thumb 20 px per arrow and one page per track click while the list box scrolls its contents by its own step, so thumb and text disagree (confirmed by a second agent, owner), TBMANLIB_Aes runs other cipher modes than the ones named (its default CBC is ECB) and fails the NIST test vectors, and TBMANLIB_Xml's parser misreads self-closing elements and entities and does not return for some malformed text (and its XPath engine reads the step `..` and `and` with `or` wrongly). TBMANLIB_Xml's `exclude_from_docs` names its test module, `mXmlTests`, which its landing page describes in a paragraph, and the five types of its XPath engine (`XPathTokenType`, `XPathAxisType`, `XPathOperator`, `XPathStep`, `XPathPredicate`), which no public member takes or returns and which the mXPath page mentions in a paragraph; tsPwGen's names its five test modules and its six internal modules, and tsJson's its test and internal modules likewise, which their landing pages describe in a paragraph each. See *Where things live* for how a package moves between the two lists. +Twenty-six **contributed** packages from TWINSERV have sections under `docs/Reference/Contributed/`: ArrayListLib, FileProps, Fmt, Generics, OLEGuids, WinReg, TwinTimerLib, tbFileSysTools, TBMANLIB, TBMANLIB_Aes, TBMANLIB_ConsoleComponents, TBMANLIB_ConsoleCore, TBMANLIB_Diagnostic, TBMANLIB_Dialog, TBMANLIB_ListBoxHScroll, TBMANLIB_RES, TBMANLIB_Xml, tbProjPacker, tbRegExp, tsJson, tsPwGen, VBA_JSON, xCalendar, AutoCompleteLib and VBComDlg complete; BigNumberLib its main class only. TBMANLIB_ConsoleCore's console claims are checked by its test cases, each on a console screen buffer of its own with its input written by `WriteConsoleInput`; TBMANLIB_ConsoleComponents' follow the source, because the samples harness cannot capture a console. Generics (seven tuple classes) and xCalendar (one control) are each one page (owner), so `analyze` in audit mode lists their classes and members as undocumented. What xCalendar's page says it does at run time comes from `test/package-tests/xCalendar/probe/`, which runs the control on a form in a built exe. Fmt documents its test code (`HelloWorldClass`, `HelloWorldModule`, `Pootle`) in one paragraph of its landing page, which `exclude_from_docs` names; Generics' `exclude_from_docs` names its test code, `HelloWorldModule`, which the page does not mention. VBComDlg's `exclude_from_docs` names `CommonDialogBase`, and AutoCompleteLib's `AutoCompleteHandle`, each a module whose public procedures only its class calls. tbRegExp's `exclude_from_docs` names its private engine module, `StaticRegex`, and tbProjPacker's its helper modules, `modImpExp` and `modWin32`: the indexer counts a Public Enum as public even inside a Private Module, because a built-in package's are reached through its library symbol written with an asterisk (`*WinNativeCommonCtls`, as `ImlDrawConstants` says). By its bare name no such enum is reachable, in a built-in or a contributed package (TB5079 on BETA 1005). OLEGuids documents each interface's methods on the interface's page. What TBMANLIB_Dialog's pages say its dialogs do comes from `test/package-tests/TBMANLIB_Dialog/probe/`, which operates them in a built exe on a private desktop; run it again when the package's version changes. TBMANLIB_Dialog 1.1.0.0 has a page of its own for each class except cDialog, which keeps a page for each member, so `analyze` in audit mode lists the members of those one-page classes as undocumented; its `exclude_from_docs` names its test module, `TestModule`, and the seven COM interface declarations that cDialogEx calls inside (`IOleWindow`, `IModalWindow`, `IShellItem`, `IShellItemArray`, `IFileDialog`, `IFileOpenDialog`, `IFileSaveDialog`), which its landing page describes in a paragraph. cDialogEx 1.1.0.0 returns the name of the chosen file, not its path, ignores `InitialDir` and ignores a `Filter` that has no closing pipe, each documented as a WARNING. tbRegExp is the first section drafted by the doc-draft workflow ([WIP.Indexer.md](WIP.Indexer.md#draft-and-the-doc-draft-workflow)), then reviewed against the sources, the package's README and VBScript's own **RegExp** under `cscript`. tbRegExp 1.9.0.0 raises `vbObjectError + 3016` from a search that uses up its step budget and returns nothing (1.8.0.0's `SearchAborted` is gone); the budget is 10 steps for each character squared, at least 1,000,000 and at most 100,000,000, for the search of one match, and `RegExp.SearchStepLimit` replaces it with a fixed number, documented on its own page and in a section of the landing page. On the dev box (BETA 1005, win32) `\d+x` costs between 2.0 and 2.2 × n² steps, so it finishes on 7,000 digits (15 s) and raises on 10,000 (16 s); `(a+)+b` raises in 0.2 s on 30 or 300 `a` but takes 16 s on 3,000; `a*` matches 1,000,000 characters whole in about half a second. Its pattern syntax has a page of its own, `PatternSyntax.md`. Each one that is not Experimental has a chapter in the book's Packages part; the Experimental ones are left out of the book. **ArrayListLib, BigNumberLib, GdiPlus, TBMANLIB, TBMANLIB_Aes, TBMANLIB_ConsoleComponents, TBMANLIB_ConsoleCore, TBMANLIB_Diagnostic, TBMANLIB_Dialog, TBMANLIB_ListBoxHScroll, TBMANLIB_Xml, WinReg and xCalendar are listed under Experimental Packages** (`docs/Reference/Experimental.md`, owner): ArrayListLib and WinReg do not compile on BETA 1005 (each documented from its source and a copy of it that builds, its samples compile-only; in a copy of ArrayListLib 1.6.151.1 with the arguments of its three `VSwap` calls passed `ByVal` and `LSetByVal` taking a `LongPtr`, a For Each over a list with no items fails, ToString of such a list never returns, Reverse keeps the middle pair of an even run in place and a second GetEnumerator over a list ignores its arguments; in a copy of WinReg's source with its four failing calls passed `ByVal`, ReadString, GetRegistryValueType and the first ConvertValueToString give wrong results), xCalendar has a grid that keeps the old month's dates when Value is set to another month, and text colour properties that have no effect, BigNumberLib 1.0.2.0 compiles, but loses the minus sign after `IsNegative = True` and in a negative operand of the greatest common divisor and the least common multiple, makes a zero from `AssignFromLong` negative, and does not return from the modular inverse of zero (all four confirmed by a second agent), TBMANLIB 1.0.0.29 does not compile in a 64-bit build (TB5001 in cSubClass, where the window procedure is passed as a Long) and has many members that fail or give wrong results, TBMANLIB_ConsoleComponents cannot take a cConsole of the published TBMANLIB_ConsoleCore (it embeds a copy of it, the same package at 1.0.0.1, whose types the compiler treats as different; checked in a project made by the IDE's own import, in either order), TBMANLIB_ConsoleCore reads keys wrongly, TBMANLIB_Diagnostic cannot create its Dictionary and misplaces List items, TBMANLIB_Dialog 1.1.0.0 has classes that fail at their main task (cDialogFindReplace reports nothing, cDialogPageSetup ignores paper and orientation, cDialogEx returns names without their folder, cDialogPassword shows the password in its confirmation boxes; every defect confirmed by a second agent, owner), TBMANLIB_ListBoxHScroll 1.0.0.1 moves the thumb 20 px per arrow and one page per track click while the list box scrolls its contents by its own step, so thumb and text disagree (confirmed by a second agent, owner), TBMANLIB_Aes runs other cipher modes than the ones named (its default CBC is ECB) and fails the NIST test vectors, and TBMANLIB_Xml's parser misreads self-closing elements and entities and does not return for some malformed text (and its XPath engine reads the step `..` and `and` with `or` wrongly). TBMANLIB_Xml's `exclude_from_docs` names its test module, `mXmlTests`, which its landing page describes in a paragraph, and the five types of its XPath engine (`XPathTokenType`, `XPathAxisType`, `XPathOperator`, `XPathStep`, `XPathPredicate`), which no public member takes or returns and which the mXPath page mentions in a paragraph; tsPwGen's names its five test modules and its six internal modules, and tsJson's its test and internal modules likewise, which their landing pages describe in a paragraph each. See *Where things live* for how a package moves between the two lists. The rest of this file is the maintenance guide for updating existing pages or adding new ones: package surface notes, page conventions, and the integrity check. diff --git a/builder/page-baseline.json b/builder/page-baseline.json index 7a227504..5def17b7 100644 --- a/builder/page-baseline.json +++ b/builder/page-baseline.json @@ -1,5 +1,5 @@ { "src": "docs", - "pages": 1450, + "pages": 1472, "staticFiles": 1011 } diff --git a/docs/Reference/Contributed/AutoCompleteLib/AutoComplete.md b/docs/Reference/Contributed/AutoCompleteLib/AutoComplete.md index f456c110..e3fe18d5 100644 --- a/docs/Reference/Contributed/AutoCompleteLib/AutoComplete.md +++ b/docs/Reference/Contributed/AutoCompleteLib/AutoComplete.md @@ -53,7 +53,7 @@ Returns or sets the file-system objects enumerated when the source is **AutoComp Syntax: *object*.**FileSystemOptions** [ = *value* ] *value* -: One or more **AutoCompleteFileSystemOptionConstants** values combined with `Or`. +: One or more [**AutoCompleteFileSystemOptionConstants**](Enumerations/AutoCompleteFileSystemOptionConstants) values combined with `Or`. | Constant | Value | Description | |----------|-------|-------------| @@ -77,7 +77,7 @@ Returns or sets flags that control how the completion works. Syntax: *object*.**Options** [ = *value* ] *value* -: One or more **AutoCompleteOptionConstants** values combined with `Or`. +: One or more [**AutoCompleteOptionConstants**](Enumerations/AutoCompleteOptionConstants) values combined with `Or`. | Constant | Value | Description | |----------|-------|-------------| @@ -141,7 +141,7 @@ Syntax: *object*.**Init** *hWndEdit*, *Source* : *required* A **LongPtr** (32-bit: **Long**) containing the window handle of the edit control that should receive suggestions. *Source* -: *required* An **AutoCompleteSourceConstants** value identifying where suggestions come from. +: *required* An [**AutoCompleteSourceConstants**](Enumerations/AutoCompleteSourceConstants) value identifying where suggestions come from. | Constant | Value | Description | |----------|-------|-------------| diff --git a/docs/Reference/Contributed/AutoCompleteLib/Enumerations/AutoCompleteFileSystemOptionConstants.md b/docs/Reference/Contributed/AutoCompleteLib/Enumerations/AutoCompleteFileSystemOptionConstants.md new file mode 100644 index 00000000..a1447151 --- /dev/null +++ b/docs/Reference/Contributed/AutoCompleteLib/Enumerations/AutoCompleteFileSystemOptionConstants.md @@ -0,0 +1,33 @@ +--- +title: AutoCompleteFileSystemOptionConstants +parent: Enumerations +grand_parent: AutoCompleteLib Package +permalink: /tB/Packages/Contributed/AutoCompleteLib/Enumerations/AutoCompleteFileSystemOptionConstants +--- + +# AutoCompleteFileSystemOptionConstants enumeration +{: .no_toc } + +Selects which file-system objects the file-system source offers as suggestions. + +The enumeration is declared inside the [**AutoComplete**](../AutoComplete) class. The values are flags that can be combined with `Or`; each is the value of the Windows `ACLO_*` option of the same meaning. They apply to the sources [**AutoCompleteSourceFileSystem**](AutoCompleteSourceConstants#AutoCompleteSourceFileSystem) and [**AutoCompleteSourceAll**](AutoCompleteSourceConstants#AutoCompleteSourceAll). The members are used without a qualifier, or with the name of the enumeration. + +| Member | Value | Description | +|:-------|:------|:------------| +| **AutoCompleteFileSystemOptionNone**{: #AutoCompleteFileSystemOptionNone } | `0` | No option is set. | +| **AutoCompleteFileSystemOptionCurrentDir**{: #AutoCompleteFileSystemOptionCurrentDir } | `1` | Includes the objects of the current directory. | +| **AutoCompleteFileSystemOptionMyComputer**{: #AutoCompleteFileSystemOptionMyComputer } | `2` | Includes the objects under *My Computer*, such as the drives. | +| **AutoCompleteFileSystemOptionDesktop**{: #AutoCompleteFileSystemOptionDesktop } | `4` | Includes the objects of the desktop. | +| **AutoCompleteFileSystemOptionFavorites**{: #AutoCompleteFileSystemOptionFavorites } | `8` | Includes the objects of the Favorites folder. | +| **AutoCompleteFileSystemOptionFileSysOnly**{: #AutoCompleteFileSystemOptionFileSysOnly } | `16` | Offers only file-system items, not the virtual shell folders. | +| **AutoCompleteFileSystemOptionFileSysDirs**{: #AutoCompleteFileSystemOptionFileSysDirs } | `32` | Offers only directories, not files. | + +## Used by + +- [**AutoComplete**](../AutoComplete) class: [**FileSystemOptions**](../AutoComplete#filesystemoptions) + +## See Also + +- [Enumerations](.) -- all the enumerations of the package +- [AutoCompleteSourceConstants](AutoCompleteSourceConstants) enumeration +- [AutoComplete](../AutoComplete) class diff --git a/docs/Reference/Contributed/AutoCompleteLib/Enumerations/AutoCompleteOptionConstants.md b/docs/Reference/Contributed/AutoCompleteLib/Enumerations/AutoCompleteOptionConstants.md new file mode 100644 index 00000000..5e32a55c --- /dev/null +++ b/docs/Reference/Contributed/AutoCompleteLib/Enumerations/AutoCompleteOptionConstants.md @@ -0,0 +1,34 @@ +--- +title: AutoCompleteOptionConstants +parent: Enumerations +grand_parent: AutoCompleteLib Package +permalink: /tB/Packages/Contributed/AutoCompleteLib/Enumerations/AutoCompleteOptionConstants +--- + +# AutoCompleteOptionConstants enumeration +{: .no_toc } + +Selects how the completion behaves while the user types into the text box. + +The enumeration is declared inside the [**AutoComplete**](../AutoComplete) class. The values are flags that can be combined with `Or`; each is the value of the Windows `ACO_*` option of the same meaning. The members are used without a qualifier, or with the name of the enumeration. + +| Member | Value | Description | +|:-------|:------|:------------| +| **AutoCompleteOptionNone**{: #AutoCompleteOptionNone } | `&H0` | No option is set. The completion neither shows a list nor appends text. | +| **AutoCompleteOptionAppend**{: #AutoCompleteOptionAppend } | `&H2` | Appends the best match to the typed text and selects the appended part. | +| **AutoCompleteOptionSuggest**{: #AutoCompleteOptionSuggest } | `&H1` | Shows a drop-down list of the matching suggestions. | +| **AutoCompleteOptionSuggestAppend**{: #AutoCompleteOptionSuggestAppend } | `&H3` | Both **AutoCompleteOptionSuggest** and **AutoCompleteOptionAppend**: the member is defined as the two combined with `Or`. | +| **AutoCompleteOptionSearch**{: #AutoCompleteOptionSearch } | `&H4` | Adds a search item at the bottom of the drop-down list. | +| **AutoCompleteOptionFilterPrefixes**{: #AutoCompleteOptionFilterPrefixes } | `&H8` | Ignores common prefixes such as `www.` and `http://` when matching the typed text. | +| **AutoCompleteOptionUseTab**{: #AutoCompleteOptionUseTab } | `&H10` | The **Tab** key selects the highlighted suggestion. | +| **AutoCompleteOptionUpDownKeyDropsList**{: #AutoCompleteOptionUpDownKeyDropsList } | `&H20` | The **Up** and **Down** arrow keys open the drop-down list. | +| **AutoCompleteOptionRightToLeft**{: #AutoCompleteOptionRightToLeft } | `&H40` | Shows the text of the drop-down list in right-to-left reading order. | + +## Used by + +- [**AutoComplete**](../AutoComplete) class: [**Options**](../AutoComplete#options) + +## See Also + +- [Enumerations](.) -- all the enumerations of the package +- [AutoComplete](../AutoComplete) class diff --git a/docs/Reference/Contributed/AutoCompleteLib/Enumerations/AutoCompleteSourceConstants.md b/docs/Reference/Contributed/AutoCompleteLib/Enumerations/AutoCompleteSourceConstants.md new file mode 100644 index 00000000..74ee46a0 --- /dev/null +++ b/docs/Reference/Contributed/AutoCompleteLib/Enumerations/AutoCompleteSourceConstants.md @@ -0,0 +1,32 @@ +--- +title: AutoCompleteSourceConstants +parent: Enumerations +grand_parent: AutoCompleteLib Package +permalink: /tB/Packages/Contributed/AutoCompleteLib/Enumerations/AutoCompleteSourceConstants +--- + +# AutoCompleteSourceConstants enumeration +{: .no_toc } + +Selects where the suggestions of an [**AutoComplete**](../AutoComplete) object come from. + +The enumeration is declared inside the **AutoComplete** class, and its members are used without a qualifier, or with the name of the enumeration. The value is passed to the *Source* parameter of **Init**, which attaches the source to a text box. + +| Member | Value | Description | +|:-------|:------|:------------| +| **AutoCompleteSourceNone**{: #AutoCompleteSourceNone } | `0` | Not a source. **Init** raises run-time error 380 for it. | +| **AutoCompleteSourceHistory**{: #AutoCompleteSourceHistory } | `1` | The shell history list. | +| **AutoCompleteSourceFileSystem**{: #AutoCompleteSourceFileSystem } | `2` | File-system paths. The [**AutoCompleteFileSystemOptionConstants**](AutoCompleteFileSystemOptionConstants) set in **FileSystemOptions** choose which objects are offered. | +| **AutoCompleteSourceMRU**{: #AutoCompleteSourceMRU } | `3` | The shell most-recently-used list. | +| **AutoCompleteSourceAll**{: #AutoCompleteSourceAll } | `4` | The history, the file system and the most-recently-used list together, in that order. | +| **AutoCompleteSourceCustomSource**{: #AutoCompleteSourceCustomSource } | `5` | The strings of the array set in **CustomSource**. | + +## Used by + +- [**AutoComplete**](../AutoComplete) class: [**Init**](../AutoComplete#init) + +## See Also + +- [Enumerations](.) -- all the enumerations of the package +- [AutoCompleteFileSystemOptionConstants](AutoCompleteFileSystemOptionConstants) enumeration +- [AutoComplete](../AutoComplete) class diff --git a/docs/Reference/Contributed/AutoCompleteLib/Enumerations/index.md b/docs/Reference/Contributed/AutoCompleteLib/Enumerations/index.md new file mode 100644 index 00000000..24240785 --- /dev/null +++ b/docs/Reference/Contributed/AutoCompleteLib/Enumerations/index.md @@ -0,0 +1,17 @@ +--- +title: Enumerations +parent: AutoCompleteLib Package +permalink: /tB/Packages/Contributed/AutoCompleteLib/Enumerations/ +has_children: true +has_toc: false +nav_order: 99 +--- + +# AutoCompleteLib Enumerations +{: .no_toc } + +The three public enumerations of the package, all declared inside the [**AutoComplete**](../AutoComplete) class. Their members can be written with or without the name of the enumeration, as in `AutoCompleteOptionAppend` or `AutoCompleteOptionConstants.AutoCompleteOptionAppend`. + +- [AutoCompleteFileSystemOptionConstants](AutoCompleteFileSystemOptionConstants) -- which file-system objects the file-system source offers +- [AutoCompleteOptionConstants](AutoCompleteOptionConstants) -- how the completion behaves while the user types +- [AutoCompleteSourceConstants](AutoCompleteSourceConstants) -- where the suggestions come from diff --git a/docs/Reference/Contributed/AutoCompleteLib/index.md b/docs/Reference/Contributed/AutoCompleteLib/index.md index 6382d292..60f50247 100644 --- a/docs/Reference/Contributed/AutoCompleteLib/index.md +++ b/docs/Reference/Contributed/AutoCompleteLib/index.md @@ -17,6 +17,10 @@ The **AutoCompleteLib** contributed package provides Windows shell auto-complete - [AutoComplete](AutoComplete) -- attaches Windows shell auto-complete behaviour to a text-input control's window handle. +## Enumerations + +- [Enumerations](Enumerations/) -- the three enumerations of the **AutoComplete** class: its options, its file-system options and its sources of suggestions. + ## Test cases The notes and warnings of this section are checked by the test cases in [AutoCompleteLib-tests.twinproj](AutoCompleteLib-tests.twinproj), a twinBASIC project. It uses AutoCompleteLib as a [linked package](../../../../Features/Packages/Linked#manual-management): put the package's `.twinpack` in `%APPDATA%\twinBASIC\packages`, then run the project, and each case prints whether it passes. diff --git a/docs/Reference/Contributed/VBComDlg/CommonDialog.md b/docs/Reference/Contributed/VBComDlg/CommonDialog.md index fb270ee5..08f18635 100644 --- a/docs/Reference/Contributed/VBComDlg/CommonDialog.md +++ b/docs/Reference/Contributed/VBComDlg/CommonDialog.md @@ -83,7 +83,7 @@ Syntax: *object*.**Color** [ = *value* ] ### ColorMode {: .no_toc } -The printer color mode. A member of **CdlPRCMConstants**: **CdlPRCMMonochrome** or **CdlPRCMColor**. Default **CdlPRCMColor**. +The printer color mode. A member of [**CdlPRCMConstants**](Enumerations/CdlPRCMConstants): **CdlPRCMMonochrome** or **CdlPRCMColor**. Default **CdlPRCMColor**. Syntax: *object*.**ColorMode** [ = *value* ] @@ -131,7 +131,7 @@ Syntax: *object*.**DialogTitle** [ = *value* ] ### Duplex {: .no_toc } -The printer duplex (two-sided printing) mode. A member of **CdlPRDPConstants**: **CdlPRDPSimplex**, **CdlPRDPHorizontal**, or **CdlPRDPVertical**. Default **CdlPRDPSimplex**. +The printer duplex (two-sided printing) mode. A member of [**CdlPRDPConstants**](Enumerations/CdlPRDPConstants): **CdlPRDPSimplex**, **CdlPRDPHorizontal**, or **CdlPRDPVertical**. Default **CdlPRDPSimplex**. Syntax: *object*.**Duplex** [ = *value* ] @@ -192,13 +192,13 @@ Syntax: *object*.**FindWhat** [ = *value* ] A **Long** bitmask of option flags passed to the active dialog. The applicable constants depend on which dialog is being shown: -- File dialogs: **CdlOFNConstants** (e.g. **CdlOFNFileMustExist**, **CdlOFNOverwritePrompt**, **CdlOFNAllowMultiSelect**) -- Color dialog: **CdlCCConstants** (e.g. **CdlCCFullOpen**, **CdlCCSolidColor**) -- Font dialog: **CdlCFConstants** (e.g. **CdlCFScreenFonts**, **CdlCFEffects**, **CdlCFLimitSize**) -- Print dialog: **CdlPDConstants** (e.g. **CdlPDAllPages**, **CdlPDPageNums**, **CdlPDReturnDC**) -- Page Setup dialog: **CdlPSDConstants** (e.g. **CdlPSDMargins**, **CdlPSDInThousandthsOfInches**) -- Folder Browser dialog: **CdlBIFConstants** (e.g. **CdlBIFNewDialogStyle**, **CdlBIFEditBox**) -- Find/Replace dialogs: **CdlFRConstants** (e.g. **CdlFRDown**, **CdlFRMatchCase**, **CdlFRWholeWord**) +- File dialogs: [**CdlOFNConstants**](Enumerations/CdlOFNConstants) (e.g. **CdlOFNFileMustExist**, **CdlOFNOverwritePrompt**, **CdlOFNAllowMultiSelect**) +- Color dialog: [**CdlCCConstants**](Enumerations/CdlCCConstants) (e.g. **CdlCCFullOpen**, **CdlCCSolidColor**) +- Font dialog: [**CdlCFConstants**](Enumerations/CdlCFConstants) (e.g. **CdlCFScreenFonts**, **CdlCFEffects**, **CdlCFLimitSize**) +- Print dialog: [**CdlPDConstants**](Enumerations/CdlPDConstants) (e.g. **CdlPDAllPages**, **CdlPDPageNums**, **CdlPDReturnDC**) +- Page Setup dialog: [**CdlPSDConstants**](Enumerations/CdlPSDConstants) (e.g. **CdlPSDMargins**, **CdlPSDInThousandthsOfInches**) +- Folder Browser dialog: [**CdlBIFConstants**](Enumerations/CdlBIFConstants) (e.g. **CdlBIFNewDialogStyle**, **CdlBIFEditBox**) +- Find/Replace dialogs: [**CdlFRConstants**](Enumerations/CdlFRConstants) (e.g. **CdlFRDown**, **CdlFRMatchCase**, **CdlFRWholeWord**) Syntax: *object*.**Flags** [ = *value* ] @@ -291,7 +291,7 @@ The handle is freed when the **CommonDialog** object is destroyed, or when a lat {: .no_toc } -The type of help to invoke when [**ShowHelp**](#showhelp) is called. A member of **CdlHelpConstants**, or 0 (the default), for which **ShowHelp** does nothing. Any other value raises run-time error 380. +The type of help to invoke when [**ShowHelp**](#showhelp) is called. A member of [**CdlHelpConstants**](Enumerations/CdlHelpConstants), or 0 (the default), for which **ShowHelp** does nothing. Any other value raises run-time error 380. Syntax: *object*.**HelpCommand** [ = *value* ] @@ -299,17 +299,17 @@ Syntax: *object*.**HelpCommand** [ = *value* ] | Constant | Description | |----------|-------------| | **CdlHelpContext** | Displays the topic identified by [**HelpContext**](#helpcontext). | -| **CdlHelpContents** | Displays the table of contents. | +| **CdlHelpContents** | Displays the contents topic of the help file. | | **CdlHelpForceFile** | Forces WinHelp to display the correct file. | | **CdlHelpHelpOnHelp** | Displays help on using Help itself. | -| **CdlHelpIndex** | Displays the index. | +| **CdlHelpIndex** | The older name of **CdlHelpContents**, with the same value. | | **CdlHelpKey** | Displays help for the keyword in [**HelpKey**](#helpkey). | | **CdlHelpPartialKey** | Displays the topic whose keyword matches [**HelpKey**](#helpkey), or lists the matching topics when there are several. | | **CdlHelpCommandHelp** | Executes the help macro in [**HelpKey**](#helpkey). | | **CdlHelpContextPopup** | Displays a pop-up for the topic in [**HelpContext**](#helpcontext). | | **CdlHelpQuit** | Closes the help file. | -| **CdlHelpSetContents** | Sets the table of contents topic. | -| **CdlHelpSetIndex** | Sets the context specified by [**HelpContext**](#helpcontext) as the current index. | +| **CdlHelpSetContents** | Makes the topic in [**HelpContext**](#helpcontext) the contents topic of the help file. | +| **CdlHelpSetIndex** | The older name of **CdlHelpSetContents**, with the same value. | ### HelpContext {: .no_toc } @@ -389,7 +389,7 @@ Syntax: *object*.**Object** ### Orientation {: .no_toc } -The paper orientation. A member of **CdlPRORConstants**: **CdlPRORPortrait** or **CdlPRORLandscape**. Default **CdlPRORPortrait**. +The paper orientation. A member of [**CdlPRORConstants**](Enumerations/CdlPRORConstants): **CdlPRORPortrait** or **CdlPRORLandscape**. Default **CdlPRORPortrait**. Syntax: *object*.**Orientation** [ = *value* ] @@ -454,7 +454,7 @@ The unit for all margin properties is controlled by **CdlPSDInThousandthsOfInche ### PaperBin {: .no_toc } -The paper source (bin) used by the printer. A member of **CdlPRBNConstants** (e.g. **CdlPRBNUpper**, **CdlPRBNLower**, **CdlPRBNAuto**). Default **CdlPRBNAuto**. +The paper source (bin) used by the printer. A member of [**CdlPRBNConstants**](Enumerations/CdlPRBNConstants) (e.g. **CdlPRBNUpper**, **CdlPRBNLower**, **CdlPRBNAuto**), or a bin number a printer driver defines; any whole number from 1 to 32767 is accepted. Default **CdlPRBNAuto**. Syntax: *object*.**PaperBin** [ = *value* ] @@ -462,7 +462,7 @@ Syntax: *object*.**PaperBin** [ = *value* ] {: .no_toc } -The paper size. A member of **CdlPRPSConstants** (e.g. **CdlPRPSLetter**, **CdlPRPSA4**). Default is **CdlPRPSA4** on metric systems and **CdlPRPSLetter** on US systems. +The paper size. A member of [**CdlPRPSConstants**](Enumerations/CdlPRPSConstants) (e.g. **CdlPRPSLetter**, **CdlPRPSA4**), or a paper size a printer driver defines; any whole number from 1 to 32767 is accepted. Default is **CdlPRPSA4** on metric systems and **CdlPRPSLetter** on US systems. Syntax: *object*.**PaperSize** [ = *value* ] @@ -506,7 +506,7 @@ Syntax: *object*.**PrinterPort** [ = *value* ] {: .no_toc } -The printer resolution. A member of **CdlPRPQConstants** (**CdlPRPQHigh**, **CdlPRPQMedium**, **CdlPRPQLow**, **CdlPRPQDraft**) or an integer from 0 to 32767 giving a resolution in dots per inch. Default **CdlPRPQHigh**. +The printer resolution. A member of [**CdlPRPQConstants**](Enumerations/CdlPRPQConstants) (**CdlPRPQHigh**, **CdlPRPQMedium**, **CdlPRPQLow**, **CdlPRPQDraft**) or an integer from 0 to 32767 giving a resolution in dots per inch. Default **CdlPRPQHigh**. Syntax: *object*.**PrintQuality** [ = *value* ] @@ -594,7 +594,11 @@ Syntax: *object*.**ShowFolderBrowser** ( ) **As Boolean** On success, [**FileName**](#filename) is set to the selected path (with a trailing backslash for directories). [**FileTitle**](#filetitle) is set to the file name part when a file is selected rather than a directory; [**FileOffset**](#fileoffset) is the character offset of that name within [**FileName**](#filename). For a directory, **FileTitle** is empty and **FileOffset** is 0. On cancel with [**CancelError**](#cancelerror) **True**, error `CdlCancel` is raised. -[**Flags**](#flags) is passed to the dialog as its **CdlBIFConstants** options and is not updated afterwards. The [**FolderBrowserValidateFailed**](#folderbrowservalidatefailed) event fires when the user types an invalid path into the dialog's edit box. +[**Flags**](#flags) is passed to the dialog as its [**CdlBIFConstants**](Enumerations/CdlBIFConstants) options and is not updated afterwards. The [**FolderBrowserValidateFailed**](#folderbrowservalidatefailed) event fires when the user types an invalid path into the dialog's edit box. + + +> [!WARNING] 1.0.13.0 +> With **CdlBIFBrowseForComputer** or **CdlBIFBrowseForPrinter**, the method returns **True** after the user selects a computer or a printer, but [**FileName**](#filename) and [**FileTitle**](#filetitle) are empty: the class reads the selection as a file system path, and a computer or a printer has none. The name of the selection is not available. To let the user choose a printer, use [**ShowPrinter**](#showprinter), which sets [**PrinterName**](#printername). ### ShowHelp {: .no_toc } @@ -641,7 +645,7 @@ Possible errors: **CdlPrinterNotFound** (28660), **CdlCreateICFailure** (28661), ### ShowPrinterEx {: .no_toc } -Displays the extended Print dialog (the `PrintDlgEx` function) and returns a **CdlPDResultConstants** value. +Displays the extended Print dialog (the `PrintDlgEx` function) and returns a [**CdlPDResultConstants**](Enumerations/CdlPDResultConstants) value. Syntax: *object*.**ShowPrinterEx** ( ) **As CdlPDResultConstants** @@ -696,7 +700,7 @@ Syntax: *object*\_**FileShareViolation**( *FileName* **As String**, *Result* **A : The path of the file that caused the sharing violation. *Result* -: Set to a **CdlOFNShareViResultConstants** value to control the dialog's response: **CdlOFNShareViResultWarn** (0, default --- show a warning), **CdlOFNShareViResultNoWarn** (1 --- silently reject), or **CdlOFNShareViResultFallThrough** (2 --- accept the selection despite the violation). +: Set to a [**CdlOFNShareViResultConstants**](Enumerations/CdlOFNShareViResultConstants) value to control the dialog's response: **CdlOFNShareViResultWarn** (0, default --- show a warning), **CdlOFNShareViResultNoWarn** (1 --- silently reject), or **CdlOFNShareViResultFallThrough** (2 --- accept the selection despite the violation). *hDlg* : The Win32 window handle of the dialog. diff --git a/docs/Reference/Contributed/VBComDlg/Enumerations/CdlBIFConstants.md b/docs/Reference/Contributed/VBComDlg/Enumerations/CdlBIFConstants.md new file mode 100644 index 00000000..776d61d3 --- /dev/null +++ b/docs/Reference/Contributed/VBComDlg/Enumerations/CdlBIFConstants.md @@ -0,0 +1,48 @@ +--- +title: CdlBIFConstants +parent: Enumerations +grand_parent: VBComDlg Package +permalink: /tB/Packages/Contributed/VBComDlg/Enumerations/CdlBIFConstants +--- + +# CdlBIFConstants enumeration +{: .no_toc } + +Options of the Folder Browser dialog, combined with **Or** in the [**Flags**](../CommonDialog#flags) property. + +The enumeration is declared inside the [**CommonDialog**](../CommonDialog) class. Its members are used without a qualifier, or with the name of the enumeration. The values are those of the Windows `BIF_` constants of the `BROWSEINFO` structure. + +[**ShowFolderBrowser**](../CommonDialog#showfolderbrowser) passes **Flags** to the dialog unchanged and does not update it afterwards. The class always installs its own callback, which handles the initial folder ([**InitDir**](../CommonDialog#initdir)) and some of the flags below. + +| Member | Value | Description | +|:-------|:------|:------------| +| **CdlBIFReturnOnlyFSDirs**{: #CdlBIFReturnOnlyFSDirs } | `&H1` | The user can select only a folder of the file system. The class disables the **OK** button while the selected item has no file system path, such as a computer name in the network. | +| **CdlBIFDontGoBelowDomain**{: #CdlBIFDontGoBelowDomain } | `&H2` | The tree does not show the network folders below the domain level. | +| **CdlBIFStatusText**{: #CdlBIFStatusText } | `&H4` | Shows a status line, in which the class writes the path of the selected folder. Windows does not support the status line together with **CdlBIFNewDialogStyle**. | +| **CdlBIFReturnFSAncestors**{: #CdlBIFReturnFSAncestors } | `&H8` | The dialog enables the **OK** button only for a file system folder that lies below the root folder. | +| **CdlBIFEditBox**{: #CdlBIFEditBox } | `&H10` | Shows a box in which the user can type the name of an item. | +| **CdlBIFValidate**{: #CdlBIFValidate } | `&H20` | When the user types a name that is not valid, the class raises the [**FolderBrowserValidateFailed**](../CommonDialog#folderbrowservalidatefailed) event. Windows ignores the flag without **CdlBIFEditBox**. | +| **CdlBIFNewDialogStyle**{: #CdlBIFNewDialogStyle } | `&H40` | Uses the new dialog style, which the user can resize and which has a **New Folder** button and shortcut menus. | +| **CdlBIFBrowseIncludeURLs**{: #CdlBIFBrowseIncludeURLs } | `&H80` | The dialog can show URLs. Windows rejects URLs unless **CdlBIFUseNewUI** and **CdlBIFBrowseIncludeFiles** are also set. | +| **CdlBIFUseNewUI**{: #CdlBIFUseNewUI } | `&H50` | The combination of **CdlBIFEditBox** and **CdlBIFNewDialogStyle**. | +| **CdlBIFUAHint**{: #CdlBIFUAHint } | `&H100` | With **CdlBIFNewDialogStyle**, shows a line of usage hints at the bottom of the dialog instead of the box for the name. Windows ignores it together with **CdlBIFEditBox**. | +| **CdlBIFNoNewFolderButton**{: #CdlBIFNoNewFolderButton } | `&H200` | Leaves out the **New Folder** button. | +| **CdlBIFNoTranslateTargets**{: #CdlBIFNoTranslateTargets } | `&H400` | When the user selects a shortcut, the dialog returns the shortcut itself, not the item it points to. | +| **CdlBIFBrowseForComputer**{: #CdlBIFBrowseForComputer } | `&H1000` | The user can select only a computer. | +| **CdlBIFBrowseForPrinter**{: #CdlBIFBrowseForPrinter } | `&H2000` | The user can select only a printer. | +| **CdlBIFBrowseIncludeFiles**{: #CdlBIFBrowseIncludeFiles } | `&H4000` | The tree also shows files, and the user can select one. For a file, [**FileName**](../CommonDialog#filename) holds the path of the file and [**FileTitle**](../CommonDialog#filetitle) its name. | +| **CdlBIFShareable**{: #CdlBIFShareable } | `&H8000&` | The tree shows the resources that remote computers share. Windows requires **CdlBIFNewDialogStyle** with it. | +| **CdlBIFBrowseFileJunctions**{: #CdlBIFBrowseFileJunctions } | `&H10000` | The user can browse into items that act as folders, such as a library or a compressed file with the extension `.zip`. | + + +> [!WARNING] 1.0.13.0 +> With **CdlBIFBrowseForComputer** or **CdlBIFBrowseForPrinter**, [**ShowFolderBrowser**](../CommonDialog#showfolderbrowser) returns **True** after the user selects a computer or a printer, but [**FileName**](../CommonDialog#filename) and [**FileTitle**](../CommonDialog#filetitle) are empty: the class reads the selection as a file system path, and a computer or a printer has none. The name of the selection is not available. To let the user choose a printer, use [**ShowPrinter**](../CommonDialog#showprinter), which sets [**PrinterName**](../CommonDialog#printername). + +## Used by + +- [**CommonDialog**](../CommonDialog) class: [**Flags**](../CommonDialog#flags) (for [**ShowFolderBrowser**](../CommonDialog#showfolderbrowser)) + +## See Also + +- [Enumerations](.) -- all the enumerations of the package +- [CommonDialog](../CommonDialog) class diff --git a/docs/Reference/Contributed/VBComDlg/Enumerations/CdlCCConstants.md b/docs/Reference/Contributed/VBComDlg/Enumerations/CdlCCConstants.md new file mode 100644 index 00000000..e630d0d1 --- /dev/null +++ b/docs/Reference/Contributed/VBComDlg/Enumerations/CdlCCConstants.md @@ -0,0 +1,33 @@ +--- +title: CdlCCConstants +parent: Enumerations +grand_parent: VBComDlg Package +permalink: /tB/Packages/Contributed/VBComDlg/Enumerations/CdlCCConstants +--- + +# CdlCCConstants enumeration +{: .no_toc } + +Options of the Color dialog, combined with **Or** in the [**Flags**](../CommonDialog#flags) property. + +The enumeration is declared inside the [**CommonDialog**](../CommonDialog) class. Its members are used without a qualifier, or with the name of the enumeration. The values are those of the Windows `CC_` constants of the `CHOOSECOLOR` structure. + +When the [**HookEvents**](../CommonDialog#hookevents) property is **True**, the class adds the Windows flag that switches on its hook procedure (`CC_ENABLEHOOK`) and removes it from **Flags** again when the dialog closes, so it is not a member. + +| Member | Value | Description | +|:-------|:------|:------------| +| **CdlCCRGBInit**{: #CdlCCRGBInit } | `&H1` | The dialog opens with the [**Color**](../CommonDialog#color) property as the selected color. Without this flag the dialog ignores **Color** when it opens. | +| **CdlCCFullOpen**{: #CdlCCFullOpen } | `&H2` | The dialog opens with the part for defining custom colors already shown. | +| **CdlCCPreventFullOpen**{: #CdlCCPreventFullOpen } | `&H4` | Disables the **Define Custom Colors** button, so the user cannot open the part for custom colors. | +| **CdlCCHelpButton**{: #CdlCCHelpButton } | `&H8` | Shows a Help button. A click raises the [**Help**](../CommonDialog#help) event, but only when the dialog has an owner window. | +| **CdlCCSolidColor**{: #CdlCCSolidColor } | `&H80` | The set of basic colors shows only solid colors. | +| **CdlCCAnyColor**{: #CdlCCAnyColor } | `&H100` | The set of basic colors shows all the colors that are available. | + +## Used by + +- [**CommonDialog**](../CommonDialog) class: [**Flags**](../CommonDialog#flags) (for [**ShowColor**](../CommonDialog#showcolor)) + +## See Also + +- [Enumerations](.) -- all the enumerations of the package +- [CommonDialog](../CommonDialog) class diff --git a/docs/Reference/Contributed/VBComDlg/Enumerations/CdlCFConstants.md b/docs/Reference/Contributed/VBComDlg/Enumerations/CdlCFConstants.md new file mode 100644 index 00000000..4af8245a --- /dev/null +++ b/docs/Reference/Contributed/VBComDlg/Enumerations/CdlCFConstants.md @@ -0,0 +1,45 @@ +--- +title: CdlCFConstants +parent: Enumerations +grand_parent: VBComDlg Package +permalink: /tB/Packages/Contributed/VBComDlg/Enumerations/CdlCFConstants +--- + +# CdlCFConstants enumeration +{: .no_toc } + +Options of the Font dialog, combined with **Or** in the [**Flags**](../CommonDialog#flags) property. + +The enumeration is declared inside the [**CommonDialog**](../CommonDialog) class. Its members are used without a qualifier, or with the name of the enumeration. The values are those of the Windows `CF_` constants of the `CHOOSEFONT` structure. + +The class always adds the Windows flag that makes the dialog start from the font properties (`CF_INITTOLOGFONTSTRUCT`), and, when the [**HookEvents**](../CommonDialog#hookevents) property is **True**, the one that switches on its hook procedure (`CF_ENABLEHOOK`). It removes both from **Flags** when the dialog closes, so they are not members. The dialog returns the `CdlCFNo...Sel` flags to say which parts the user did not select; [**ShowFont**](../CommonDialog#showfont) then leaves the matching property as it was. + +| Member | Value | Description | +|:-------|:------|:------------| +| **CdlCFScreenFonts**{: #CdlCFScreenFonts } | `&H1` | Lists the fonts that the screen supports. | +| **CdlCFPrinterFonts**{: #CdlCFPrinterFonts } | `&H2` | Lists the fonts that a printer supports. | +| **CdlCFHelpButton**{: #CdlCFHelpButton } | `&H4` | Shows a Help button. A click raises the [**Help**](../CommonDialog#help) event, but only when the dialog has an owner window. | +| **CdlCFEffects**{: #CdlCFEffects } | `&H100` | Shows the **Strikeout** and **Underline** check boxes and the color list. Only with this flag does the class update [**FontStrikethru**](../CommonDialog#fontstrikethru), [**FontUnderline**](../CommonDialog#fontunderline) and [**Color**](../CommonDialog#color). | +| **CdlCFApply**{: #CdlCFApply } | `&H200` | Shows an **Apply** button. A click raises the [**FontApply**](../CommonDialog#fontapply) event, which needs [**HookEvents**](../CommonDialog#hookevents) **True**. | +| **CdlCFScriptsOnly**{: #CdlCFScriptsOnly } | `&H400` | Lists the fonts of the non-OEM character sets, the Symbol set and the ANSI set. | +| **CdlCFNoVectorFonts**{: #CdlCFNoVectorFonts } | `&H800` | Does not allow vector fonts. | +| **CdlCFLimitSize**{: #CdlCFLimitSize } | `&H2000` | Limits the sizes to the range from [**Min**](../CommonDialog#min) to [**Max**](../CommonDialog#max) points. Without this flag the dialog ignores both properties. | +| **CdlCFFixedPitchOnly**{: #CdlCFFixedPitchOnly } | `&H4000` | Lists only fixed-pitch (monospaced) fonts. | +| **CdlCFForceFontExist**{: #CdlCFForceFontExist } | `&H10000` | The dialog shows an error message when the user enters a font or a style that does not exist. | +| **CdlCFScalableOnly**{: #CdlCFScalableOnly } | `&H20000` | Lists only scalable fonts, which include vector, TrueType and OpenType fonts. | +| **CdlCFTTOnly**{: #CdlCFTTOnly } | `&H40000` | Lists only TrueType fonts. | +| **CdlCFNoFaceSel**{: #CdlCFNoFaceSel } | `&H80000` | No font name is selected when the dialog opens. The dialog returns the flag when the user chose no name, and the class then leaves [**FontName**](../CommonDialog#fontname) unchanged. | +| **CdlCFNoStyleSel**{: #CdlCFNoStyleSel } | `&H100000` | No style is selected when the dialog opens. The dialog returns the flag when the user chose no style, and the class then leaves [**FontWeight**](../CommonDialog#fontweight) and [**FontItalic**](../CommonDialog#fontitalic) unchanged. | +| **CdlCFNoSizeSel**{: #CdlCFNoSizeSel } | `&H200000` | No size is selected when the dialog opens. The dialog returns the flag when the user chose no size, and the class then leaves [**FontSize**](../CommonDialog#fontsize) unchanged. | +| **CdlCFSelectScript**{: #CdlCFSelectScript } | `&H400000` | Lists only the fonts of the character set in [**FontCharset**](../CommonDialog#fontcharset). The user cannot change the character set in the **Script** box. | +| **CdlCFNoScriptSel**{: #CdlCFNoScriptSel } | `&H800000` | Disables the **Script** box. The dialog returns the flag when the user chose no character set, and the class then leaves [**FontCharset**](../CommonDialog#fontcharset) unchanged. | +| **CdlCFNoVertFonts**{: #CdlCFNoVertFonts } | `&H1000000` | Does not list the vertical fonts, those with a name that starts with `@`. | + +## Used by + +- [**CommonDialog**](../CommonDialog) class: [**Flags**](../CommonDialog#flags) (for [**ShowFont**](../CommonDialog#showfont)); the *Flags* parameter of the [**FontApply**](../CommonDialog#fontapply) event + +## See Also + +- [Enumerations](.) -- all the enumerations of the package +- [CommonDialog](../CommonDialog) class diff --git a/docs/Reference/Contributed/VBComDlg/Enumerations/CdlErrorConstants.md b/docs/Reference/Contributed/VBComDlg/Enumerations/CdlErrorConstants.md new file mode 100644 index 00000000..45920c93 --- /dev/null +++ b/docs/Reference/Contributed/VBComDlg/Enumerations/CdlErrorConstants.md @@ -0,0 +1,51 @@ +--- +title: CdlErrorConstants +parent: Enumerations +grand_parent: VBComDlg Package +permalink: /tB/Packages/Contributed/VBComDlg/Enumerations/CdlErrorConstants +--- + +# CdlErrorConstants enumeration +{: .no_toc } + +The run-time error numbers that the methods of [**CommonDialog**](../CommonDialog) raise when a dialog fails or the user cancels it. + +The enumeration is declared inside the [**CommonDialog**](../CommonDialog) class. Its members are used without a qualifier, or with the name of the enumeration. The numbers are those of the VB6 CommonDialog control (`cdlCancel` and the other `cdl` constants), not the codes that the Windows common-dialog library reports: the class translates the Windows code of a failure into the member that matches it. A failure for which there is no member raises an error whose number is the Windows code and whose description is "Unexpected error." + +No property takes or returns a member. A handler reads them from `Err.Number`. + +| Member | Value | Description | +|:-------|:------|:------------| +| **CdlCancel**{: #CdlCancel } | `32755` | The user closed the dialog with **Cancel**. The error is raised only when [**CancelError**](../CommonDialog#cancelerror) is **True**. | +| **CdlBufferTooSmall**{: #CdlBufferTooSmall } | `20476` | The buffer for the file name is too small for the name that the user chose. The size of the buffer is [**MaxFileSize**](../CommonDialog#maxfilesize). | +| **CdlInvalidFileName**{: #CdlInvalidFileName } | `20477` | The file name is not valid. | +| **CdlSubclassFailure**{: #CdlSubclassFailure } | `20478` | The dialog could not subclass a list box because the system had too little memory. | +| **CdlMaxLessThanMin**{: #CdlMaxLessThanMin } | `24573` | The Font dialog was asked to limit the size, and [**Max**](../CommonDialog#max) is less than [**Min**](../CommonDialog#min). | +| **CdlNoFonts**{: #CdlNoFonts } | `24574` | The Font dialog found no fonts to list. | +| **CdlPrinterNotFound**{: #CdlPrinterNotFound } | `28660` | The `[devices]` section of `WIN.INI` has no entry for the printer. | +| **CdlCreateICFailure**{: #CdlCreateICFailure } | `28661` | The dialog could not create an information context for the printer. | +| **CdlDndmMismatch**{: #CdlDndmMismatch } | `28662` | The device mode and the device names describe two different printers. | +| **CdlNoDefaultPrn**{: #CdlNoDefaultPrn } | `28663` | The computer has no default printer. | +| **CdlNoDevices**{: #CdlNoDevices } | `28664` | The computer has no printer drivers. | +| **CdlInitFailure**{: #CdlInitFailure } | `28665` | The dialog failed while it was starting up. [**ShowPrinterEx**](../CommonDialog#showprinterex) raises this error for a failure of the extended Print dialog that has no member of its own. | +| **CdlGetDevModeFail**{: #CdlGetDevModeFail } | `28666` | The printer driver could not fill in the device mode. | +| **CdlLoadDrvFailure**{: #CdlLoadDrvFailure } | `28667` | The dialog could not load the driver of the printer. | +| **CdlRetDefFailure**{: #CdlRetDefFailure } | `28668` | **CdlPDReturnDefault** or **CdlPSDReturnDefault** was set, but a field that must be zero was not. | +| **CdlParseFailure**{: #CdlParseFailure } | `28669` | The dialog could not read the strings in `WIN.INI`. | +| **CdlHelp**{: #CdlHelp } | `32751` | The call of the WinHelp viewer failed. | +| **CdlBufferLengthZero**{: #CdlBufferLengthZero } | `36848` | A buffer of the Find or Replace dialog is not valid. | + +## Used by + +- [**CommonDialog**](../CommonDialog) class, the methods that raise them: + - **CdlCancel**: [**ShowOpen**](../CommonDialog#showopen), [**ShowSave**](../CommonDialog#showsave), [**ShowColor**](../CommonDialog#showcolor), [**ShowFont**](../CommonDialog#showfont), [**ShowPrinter**](../CommonDialog#showprinter), [**ShowPrinterEx**](../CommonDialog#showprinterex), [**ShowPageSetup**](../CommonDialog#showpagesetup) and [**ShowFolderBrowser**](../CommonDialog#showfolderbrowser) + - **CdlBufferTooSmall**, **CdlInvalidFileName** and **CdlSubclassFailure**: [**ShowOpen**](../CommonDialog#showopen) and [**ShowSave**](../CommonDialog#showsave) + - **CdlMaxLessThanMin** and **CdlNoFonts**: [**ShowFont**](../CommonDialog#showfont) + - **CdlPrinterNotFound**, **CdlCreateICFailure**, **CdlDndmMismatch**, **CdlNoDefaultPrn**, **CdlNoDevices**, **CdlInitFailure**, **CdlGetDevModeFail**, **CdlLoadDrvFailure**, **CdlRetDefFailure** and **CdlParseFailure**: [**ShowPrinter**](../CommonDialog#showprinter) and [**ShowPageSetup**](../CommonDialog#showpagesetup); [**ShowPrinterEx**](../CommonDialog#showprinterex) raises only **CdlInitFailure** + - **CdlHelp**: [**ShowHelp**](../CommonDialog#showhelp) + - **CdlBufferLengthZero**: [**ShowFind**](../CommonDialog#showfind) and [**ShowReplace**](../CommonDialog#showreplace) + +## See Also + +- [Enumerations](.) -- all the enumerations of the package +- [CommonDialog](../CommonDialog) class diff --git a/docs/Reference/Contributed/VBComDlg/Enumerations/CdlFRConstants.md b/docs/Reference/Contributed/VBComDlg/Enumerations/CdlFRConstants.md new file mode 100644 index 00000000..89198117 --- /dev/null +++ b/docs/Reference/Contributed/VBComDlg/Enumerations/CdlFRConstants.md @@ -0,0 +1,42 @@ +--- +title: CdlFRConstants +parent: Enumerations +grand_parent: VBComDlg Package +permalink: /tB/Packages/Contributed/VBComDlg/Enumerations/CdlFRConstants +--- + +# CdlFRConstants enumeration +{: .no_toc } + +Options and results of the Find and Replace dialogs, combined with **Or** in the [**Flags**](../CommonDialog#flags) property. + +The enumeration is declared inside the [**CommonDialog**](../CommonDialog) class. Its members are used without a qualifier, or with the name of the enumeration. The values are those of the Windows `FR_` constants of the `FINDREPLACE` structure. + +Some members are options that the program sets before it shows the dialog, and the dialog changes them as the user works. Others, such as **CdlFRFindNext**, tell which button the user clicked. The class updates [**Flags**](../CommonDialog#flags) before it raises each event of the dialog. + +The Windows flags `FR_ENABLEHOOK` and `FR_DIALOGTERM` are not members. The class adds the first one when the [**HookEvents**](../CommonDialog#hookevents) property is **True**, and removes it from **Flags** again. The dialog sets the second one when it closes. + +| Member | Value | Description | +|:-------|:------|:------------| +| **CdlFRDown**{: #CdlFRDown } | `&H1` | The **Down** option for the direction of the search is selected. The dialog sets or clears the flag as the user chooses **Up** or **Down**. | +| **CdlFRWholeWord**{: #CdlFRWholeWord } | `&H2` | The **Match whole word only** check box is selected. The dialog sets or clears the flag as the user changes the check box. | +| **CdlFRMatchCase**{: #CdlFRMatchCase } | `&H4` | The **Match case** check box is selected. The dialog sets or clears the flag as the user changes the check box. | +| **CdlFRFindNext**{: #CdlFRFindNext } | `&H8` | The user clicked **Find Next**. The class raises the [**FindNext**](../CommonDialog#findnext) event. | +| **CdlFRReplace**{: #CdlFRReplace } | `&H10` | The user clicked **Replace**. The class raises the [**Replace**](../CommonDialog#replace) event. | +| **CdlFRReplaceAll**{: #CdlFRReplaceAll } | `&H20` | The user clicked **Replace All**. See the [**ReplaceAll**](../CommonDialog#replaceall) event. | +| **CdlFRHelpButton**{: #CdlFRHelpButton } | `&H80` | Shows a Help button. A click raises the [**Help**](../CommonDialog#help) event. | +| **CdlFRNoUpDown**{: #CdlFRNoUpDown } | `&H400` | Disables the **Up** and **Down** options. | +| **CdlFRNoMatchCase**{: #CdlFRNoMatchCase } | `&H800` | Disables the **Match case** check box. | +| **CdlFRNoWholeWord**{: #CdlFRNoWholeWord } | `&H1000` | Disables the **Match whole word only** check box. | +| **CdlFRHideUpDown**{: #CdlFRHideUpDown } | `&H4000` | Hides the **Up** and **Down** options. | +| **CdlFRHideMatchCase**{: #CdlFRHideMatchCase } | `&H8000&` | Hides the **Match case** check box. | +| **CdlFRHideWholeWord**{: #CdlFRHideWholeWord } | `&H10000` | Hides the **Match whole word only** check box. | + +## Used by + +- [**CommonDialog**](../CommonDialog) class: [**Flags**](../CommonDialog#flags) (for [**ShowFind**](../CommonDialog#showfind) and [**ShowReplace**](../CommonDialog#showreplace)) + +## See Also + +- [Enumerations](.) -- all the enumerations of the package +- [CommonDialog](../CommonDialog) class diff --git a/docs/Reference/Contributed/VBComDlg/Enumerations/CdlHelpConstants.md b/docs/Reference/Contributed/VBComDlg/Enumerations/CdlHelpConstants.md new file mode 100644 index 00000000..edceb3b2 --- /dev/null +++ b/docs/Reference/Contributed/VBComDlg/Enumerations/CdlHelpConstants.md @@ -0,0 +1,41 @@ +--- +title: CdlHelpConstants +parent: Enumerations +grand_parent: VBComDlg Package +permalink: /tB/Packages/Contributed/VBComDlg/Enumerations/CdlHelpConstants +--- + +# CdlHelpConstants enumeration +{: .no_toc } + +Commands for the WinHelp viewer, which [**ShowHelp**](../CommonDialog#showhelp) starts. + +The enumeration is declared inside the [**CommonDialog**](../CommonDialog) class. Its members are used without a qualifier, or with the name of the enumeration. The values are those of the Windows `HELP_` constants of the `WinHelp` function, and the class passes the value of [**HelpCommand**](../CommonDialog#helpcommand) to that function unchanged. + +The command decides which property supplies the extra data that `WinHelp` needs. The commands that need a topic number read [**HelpContext**](../CommonDialog#helpcontext), those that need a keyword or a macro read [**HelpKey**](../CommonDialog#helpkey), and the others use no extra data. [**HelpFile**](../CommonDialog#helpfile) names the help file for every command. The **HelpCommand** property accepts these members and 0, for which **ShowHelp** does nothing. + +Two pairs of members have the same value, so the two names of a pair are interchangeable: the **Index** names are the older ones: **CdlHelpIndex** and **CdlHelpContents**, and **CdlHelpSetIndex** and **CdlHelpSetContents**. + +| Member | Value | Description | +|:-------|:------|:------------| +| **CdlHelpContext**{: #CdlHelpContext } | `&H1` | Shows the topic with the number in [**HelpContext**](../CommonDialog#helpcontext). | +| **CdlHelpQuit**{: #CdlHelpQuit } | `&H2` | Closes the help file. | +| **CdlHelpIndex**{: #CdlHelpIndex } | `&H3` | Shows the contents topic of the help file. Has the same value as **CdlHelpContents**, of which it is the older name. | +| **CdlHelpContents**{: #CdlHelpContents } | `&H3` | Shows the contents topic of the help file. Has the same value as **CdlHelpIndex**. | +| **CdlHelpHelpOnHelp**{: #CdlHelpHelpOnHelp } | `&H4` | Shows the help on how to use the help viewer. | +| **CdlHelpSetIndex**{: #CdlHelpSetIndex } | `&H5` | Makes the topic with the number in [**HelpContext**](../CommonDialog#helpcontext) the contents topic of the help file. Has the same value as **CdlHelpSetContents**, of which it is the older name. | +| **CdlHelpSetContents**{: #CdlHelpSetContents } | `&H5` | Makes the topic with the number in [**HelpContext**](../CommonDialog#helpcontext) the contents topic of the help file. Has the same value as **CdlHelpSetIndex**. | +| **CdlHelpContextPopup**{: #CdlHelpContextPopup } | `&H8` | Shows the topic with the number in [**HelpContext**](../CommonDialog#helpcontext) in a pop-up window. | +| **CdlHelpForceFile**{: #CdlHelpForceFile } | `&H9` | Makes sure that the viewer shows the help file named in [**HelpFile**](../CommonDialog#helpfile). | +| **CdlHelpKey**{: #CdlHelpKey } | `&H101` | Shows the topic for the keyword in [**HelpKey**](../CommonDialog#helpkey). | +| **CdlHelpCommandHelp**{: #CdlHelpCommandHelp } | `&H102` | Runs the help macro in [**HelpKey**](../CommonDialog#helpkey). | +| **CdlHelpPartialKey**{: #CdlHelpPartialKey } | `&H105` | Shows the topic for the keyword in [**HelpKey**](../CommonDialog#helpkey), or a list of the topics that match it when there are several. | + +## Used by + +- [**CommonDialog**](../CommonDialog) class: [**HelpCommand**](../CommonDialog#helpcommand) + +## See Also + +- [Enumerations](.) -- all the enumerations of the package +- [CommonDialog](../CommonDialog) class diff --git a/docs/Reference/Contributed/VBComDlg/Enumerations/CdlOFNConstants.md b/docs/Reference/Contributed/VBComDlg/Enumerations/CdlOFNConstants.md new file mode 100644 index 00000000..4fb3e01a --- /dev/null +++ b/docs/Reference/Contributed/VBComDlg/Enumerations/CdlOFNConstants.md @@ -0,0 +1,46 @@ +--- +title: CdlOFNConstants +parent: Enumerations +grand_parent: VBComDlg Package +permalink: /tB/Packages/Contributed/VBComDlg/Enumerations/CdlOFNConstants +--- + +# CdlOFNConstants enumeration +{: .no_toc } + +Options of the File Open and File Save dialogs, combined with **Or** in the [**Flags**](../CommonDialog#flags) property. + +The enumeration is declared inside the [**CommonDialog**](../CommonDialog) class. Its members are used without a qualifier, or with the name of the enumeration. The values are those of the Windows `OFN_` constants of the `OPENFILENAME` structure. + +When the [**HookEvents**](../CommonDialog#hookevents) property is **True**, the class adds the Windows flags that switch on its hook procedure (`OFN_ENABLEHOOK` and `OFN_ENABLESIZING`) and removes them from **Flags** again when the dialog closes, so they are not members. The dialog also changes some of the flags before it returns, as the descriptions of **CdlOFNReadOnly** and **CdlOFNExtensionDifferent** say. + +| Member | Value | Description | +|:-------|:------|:------------| +| **CdlOFNReadOnly**{: #CdlOFNReadOnly } | `&H1` | Selects the Read Only check box when the dialog opens. When the dialog closes with **OK**, the flag is set if the check box is selected. | +| **CdlOFNOverwritePrompt**{: #CdlOFNOverwritePrompt } | `&H2` | File Save dialog: asks the user to confirm before the dialog accepts the name of a file that exists. | +| **CdlOFNHideReadOnly**{: #CdlOFNHideReadOnly } | `&H4` | Hides the Read Only check box. | +| **CdlOFNNoChangeDir**{: #CdlOFNNoChangeDir } | `&H8` | Sets the current directory of the process back to the one it had before the dialog opened, if the user browsed to another folder. | +| **CdlOFNHelpButton**{: #CdlOFNHelpButton } | `&H10` | Shows a Help button. A click raises the [**Help**](../CommonDialog#help) event, but only when the dialog has an owner window. | +| **CdlOFNNoValidate**{: #CdlOFNNoValidate } | `&H100` | The dialog accepts a file name that contains characters which are not valid in a file name. | +| **CdlOFNAllowMultiSelect**{: #CdlOFNAllowMultiSelect } | `&H200` | File Open dialog: the user can select more than one file. Together with **CdlOFNExplorer**, [**FileName**](../CommonDialog#filename) then holds the folder followed by the file names, separated by null characters. [**MaxFileSize**](../CommonDialog#maxfilesize) must be large enough for all of them. | +| **CdlOFNExtensionDifferent**{: #CdlOFNExtensionDifferent } | `&H400` | The dialog sets this flag when the user typed an extension that differs from [**DefaultExt**](../CommonDialog#defaultext). | +| **CdlOFNPathMustExist**{: #CdlOFNPathMustExist } | `&H800` | The user can type only paths that exist. Otherwise the dialog shows a warning. | +| **CdlOFNFileMustExist**{: #CdlOFNFileMustExist } | `&H1000` | The user can type only names of files that exist. Otherwise the dialog shows a warning. The flag includes **CdlOFNPathMustExist**. | +| **CdlOFNCreatePrompt**{: #CdlOFNCreatePrompt } | `&H2000` | When the user types the name of a file that does not exist, the dialog asks whether to create it. If the user agrees, the dialog closes and returns the name. | +| **CdlOFNShareAware**{: #CdlOFNShareAware } | `&H4000` | The dialog ignores a network sharing violation and returns the selected name. The [**FileShareViolation**](../CommonDialog#fileshareviolation) event is not raised. | +| **CdlOFNNoReadOnlyReturn**{: #CdlOFNNoReadOnlyReturn } | `&H8000&` | The file that the dialog returns has the Read Only check box cleared and is not in a write-protected folder. | +| **CdlOFNNoNetworkButton**{: #CdlOFNNoNetworkButton } | `&H20000` | Hides and disables the Network button. | +| **CdlOFNExplorer**{: #CdlOFNExplorer } | `&H80000` | Selects the Explorer-style dialog and its customization methods. With [**HookEvents**](../CommonDialog#hookevents) **True**, the class installs the hook procedure that matches the style. | +| **CdlOFNNoDereferenceLinks**{: #CdlOFNNoDereferenceLinks } | `&H100000` | When the user selects a shortcut (`.lnk` file), the dialog returns the path of the shortcut itself, not of the file it points to. | +| **CdlOFNDontAddToRecent**{: #CdlOFNDontAddToRecent } | `&H2000000` | The dialog does not add the file to the list of recent documents. | +| **CdlOFNForcesShowHidden**{: #CdlOFNForcesShowHidden } | `&H10000000` | The dialog shows hidden and system files, even when the user has set the folder options not to show them. | + +## Used by + +- [**CommonDialog**](../CommonDialog) class: [**Flags**](../CommonDialog#flags) (for [**ShowOpen**](../CommonDialog#showopen) and [**ShowSave**](../CommonDialog#showsave)) + +## See Also + +- [Enumerations](.) -- all the enumerations of the package +- [CommonDialog](../CommonDialog) class +- [CdlOFNShareViResultConstants](CdlOFNShareViResultConstants) enumeration diff --git a/docs/Reference/Contributed/VBComDlg/Enumerations/CdlOFNShareViResultConstants.md b/docs/Reference/Contributed/VBComDlg/Enumerations/CdlOFNShareViResultConstants.md new file mode 100644 index 00000000..50653914 --- /dev/null +++ b/docs/Reference/Contributed/VBComDlg/Enumerations/CdlOFNShareViResultConstants.md @@ -0,0 +1,29 @@ +--- +title: CdlOFNShareViResultConstants +parent: Enumerations +grand_parent: VBComDlg Package +permalink: /tB/Packages/Contributed/VBComDlg/Enumerations/CdlOFNShareViResultConstants +--- + +# CdlOFNShareViResultConstants enumeration +{: .no_toc } + +Tells the File Open or File Save dialog how to answer a network sharing violation. + +The enumeration is declared inside the [**CommonDialog**](../CommonDialog) class. Its members are used without a qualifier, or with the name of the enumeration. The values are those of the Windows `OFN_SHAREWARN`, `OFN_SHARENOWARN` and `OFN_SHAREFALLTHROUGH` constants. An event handler sets one of them in the *Result* parameter of the [**FileShareViolation**](../CommonDialog#fileshareviolation) event. + +| Member | Value | Description | +|:-------|:------|:------------| +| **CdlOFNShareViResultWarn**{: #CdlOFNShareViResultWarn } | `&H0` | The dialog shows its standard warning and stays open. This is the value when the handler sets nothing. | +| **CdlOFNShareViResultNoWarn**{: #CdlOFNShareViResultNoWarn } | `&H1` | The dialog shows no message and does not accept the file, so the handler can show a message of its own. | +| **CdlOFNShareViResultFallThrough**{: #CdlOFNShareViResultFallThrough } | `&H2` | The dialog accepts the file as if there were no violation and returns its name. | + +## Used by + +- [**CommonDialog**](../CommonDialog) class: [**FileShareViolation**](../CommonDialog#fileshareviolation) event (the *Result* parameter) + +## See Also + +- [Enumerations](.) -- all the enumerations of the package +- [CommonDialog](../CommonDialog) class +- [CdlOFNConstants](CdlOFNConstants) enumeration diff --git a/docs/Reference/Contributed/VBComDlg/Enumerations/CdlPDConstants.md b/docs/Reference/Contributed/VBComDlg/Enumerations/CdlPDConstants.md new file mode 100644 index 00000000..56f71b9f --- /dev/null +++ b/docs/Reference/Contributed/VBComDlg/Enumerations/CdlPDConstants.md @@ -0,0 +1,48 @@ +--- +title: CdlPDConstants +parent: Enumerations +grand_parent: VBComDlg Package +permalink: /tB/Packages/Contributed/VBComDlg/Enumerations/CdlPDConstants +--- + +# CdlPDConstants enumeration +{: .no_toc } + +Options of the Print dialog and the extended Print dialog, combined with **Or** in the [**Flags**](../CommonDialog#flags) property. + +The enumeration is declared inside the [**CommonDialog**](../CommonDialog) class. Its members are used without a qualifier, or with the name of the enumeration. The values are those of the Windows `PD_` constants of the `PRINTDLG` and `PRINTDLGEX` structures. + +[**ShowPrinter**](../CommonDialog#showprinter) uses `PRINTDLG` and [**ShowPrinterEx**](../CommonDialog#showprinterex) uses `PRINTDLGEX`. A few flags exist for only one of the two, and the descriptions say which. When the [**HookEvents**](../CommonDialog#hookevents) property is **True**, [**ShowPrinter**](../CommonDialog#showprinter) adds the two Windows flags that switch on its hook procedures (`PD_ENABLEPRINTHOOK` and `PD_ENABLESETUPHOOK`) and removes them from **Flags** again when the dialog closes, so they are not members. + +| Member | Value | Description | +|:-------|:------|:------------| +| **CdlPDAllPages**{: #CdlPDAllPages } | `&H0` | The **All** option is selected when the dialog opens. The value is zero, so the option is selected when none of **CdlPDSelection**, **CdlPDPageNums** and **CdlPDCurrentPage** is set. | +| **CdlPDSelection**{: #CdlPDSelection } | `&H1` | The **Selection** option is selected when the dialog opens, and the dialog returns the flag when the user chose it. | +| **CdlPDPageNums**{: #CdlPDPageNums } | `&H2` | The **Pages** option is selected when the dialog opens, and the dialog returns the flag when the user chose it. [**FromPage**](../CommonDialog#frompage) and [**ToPage**](../CommonDialog#topage) hold the range. | +| **CdlPDNoSelection**{: #CdlPDNoSelection } | `&H4` | Disables the **Selection** option. | +| **CdlPDNoPageNums**{: #CdlPDNoPageNums } | `&H8` | Disables the **Pages** option and the boxes for the range of pages. | +| **CdlPDCollate**{: #CdlPDCollate } | `&H10` | Selects the **Collate** check box when the dialog opens, and the dialog returns the flag when the user left it selected. The class also writes the choice to the printer settings. | +| **CdlPDPrintToFile**{: #CdlPDPrintToFile } | `&H20` | Selects the **Print to file** check box when the dialog opens, and the dialog returns the flag when the user left it selected. | +| **CdlPDPrintSetup**{: #CdlPDPrintSetup } | `&H40` | Shows the Print Setup dialog instead of the Print dialog. Only [**ShowPrinter**](../CommonDialog#showprinter) uses it. | +| **CdlPDNoWarning**{: #CdlPDNoWarning } | `&H80` | The dialog shows no warning when the computer has no default printer. | +| **CdlPDReturnDC**{: #CdlPDReturnDC } | `&H100` | The dialog returns a device context for the selected printer in [**hDC**](../CommonDialog#hdc). | +| **CdlPDReturnIC**{: #CdlPDReturnIC } | `&H200` | The dialog returns an information context for the selected printer in [**hDC**](../CommonDialog#hdc). | +| **CdlPDReturnDefault**{: #CdlPDReturnDefault } | `&H400` | The dialog does not appear. The printer properties receive the settings of the default printer. | +| **CdlPDHelpButton**{: #CdlPDHelpButton } | `&H800` | Shows a Help button. A click raises the [**Help**](../CommonDialog#help) event, but only when the dialog has an owner window. Only [**ShowPrinter**](../CommonDialog#showprinter) uses it. | +| **CdlPDUseDevModeCopies**{: #CdlPDUseDevModeCopies } | `&H40000` | Disables the **Copies** box when the printer does not support several copies. When the printer does, the dialog returns the number of copies in the printer settings, and [**Copies**](../CommonDialog#copies) holds it. | +| **CdlPDUseDevModeCopiesAndCollate**{: #CdlPDUseDevModeCopiesAndCollate } | `&H40000` | Has the same value as **CdlPDUseDevModeCopies**, and the two names mean the same. When the printer settings select collation, the class sets **CdlPDCollate** in [**Flags**](../CommonDialog#flags). | +| **CdlPDDisablePrintToFile**{: #CdlPDDisablePrintToFile } | `&H80000` | Disables the **Print to file** check box. | +| **CdlPDCurrentPage**{: #CdlPDCurrentPage } | `&H400000` | The **Current Page** option is selected when the dialog opens, and the dialog returns the flag when the user chose it. Only [**ShowPrinterEx**](../CommonDialog#showprinterex) uses it. | +| **CdlPDHidePrintToFile**{: #CdlPDHidePrintToFile } | `&H100000` | Hides the **Print to file** check box. | +| **CdlPDNoNetworkButton**{: #CdlPDNoNetworkButton } | `&H200000` | Hides and disables the Network button. Only [**ShowPrinter**](../CommonDialog#showprinter) uses it. | +| **CdlPDNoCurrentPage**{: #CdlPDNoCurrentPage } | `&H800000` | Disables the **Current Page** option. Only [**ShowPrinterEx**](../CommonDialog#showprinterex) uses it. | + +## Used by + +- [**CommonDialog**](../CommonDialog) class: [**Flags**](../CommonDialog#flags) (for [**ShowPrinter**](../CommonDialog#showprinter) and [**ShowPrinterEx**](../CommonDialog#showprinterex)) + +## See Also + +- [Enumerations](.) -- all the enumerations of the package +- [CommonDialog](../CommonDialog) class +- [CdlPDResultConstants](CdlPDResultConstants) enumeration diff --git a/docs/Reference/Contributed/VBComDlg/Enumerations/CdlPDResultConstants.md b/docs/Reference/Contributed/VBComDlg/Enumerations/CdlPDResultConstants.md new file mode 100644 index 00000000..3eb58f92 --- /dev/null +++ b/docs/Reference/Contributed/VBComDlg/Enumerations/CdlPDResultConstants.md @@ -0,0 +1,29 @@ +--- +title: CdlPDResultConstants +parent: Enumerations +grand_parent: VBComDlg Package +permalink: /tB/Packages/Contributed/VBComDlg/Enumerations/CdlPDResultConstants +--- + +# CdlPDResultConstants enumeration +{: .no_toc } + +Names the button that closed the extended Print dialog. + +The enumeration is declared inside the [**CommonDialog**](../CommonDialog) class. Its members are used without a qualifier, or with the name of the enumeration. The values are those of the Windows `PD_RESULT_` constants of the `PRINTDLGEX` structure. + +| Member | Value | Description | +|:-------|:------|:------------| +| **CdlPDResultCancel**{: #CdlPDResultCancel } | `&H0` | The user clicked **Cancel**. When [**CancelError**](../CommonDialog#cancelerror) is **True**, the method raises error `CdlCancel` instead of returning this value. | +| **CdlPDResultPrint**{: #CdlPDResultPrint } | `&H1` | The user clicked **Print**. | +| **CdlPDResultApply**{: #CdlPDResultApply } | `&H2` | The user clicked **Apply**. | + +## Used by + +- [**CommonDialog**](../CommonDialog) class: [**ShowPrinterEx**](../CommonDialog#showprinterex) (the return value) + +## See Also + +- [Enumerations](.) -- all the enumerations of the package +- [CommonDialog](../CommonDialog) class +- [CdlPDConstants](CdlPDConstants) enumeration diff --git a/docs/Reference/Contributed/VBComDlg/Enumerations/CdlPRBNConstants.md b/docs/Reference/Contributed/VBComDlg/Enumerations/CdlPRBNConstants.md new file mode 100644 index 00000000..1124e8c8 --- /dev/null +++ b/docs/Reference/Contributed/VBComDlg/Enumerations/CdlPRBNConstants.md @@ -0,0 +1,40 @@ +--- +title: CdlPRBNConstants +parent: Enumerations +grand_parent: VBComDlg Package +permalink: /tB/Packages/Contributed/VBComDlg/Enumerations/CdlPRBNConstants +--- + +# CdlPRBNConstants enumeration +{: .no_toc } + +Selects the paper source (bin) of the printer. + +The enumeration is declared inside the [**CommonDialog**](../CommonDialog) class. Its members are used without a qualifier, or with the name of the enumeration. Each member has the value of the Windows `DMBIN_` constant for the same bin, which is also the value of the VB6 [**PrinterObjectConstants_PaperBin**](../../../VBRUN/Constants/PrinterObjectConstants_PaperBin) constant of the same name without the **Cdl** prefix. + +The [**PaperBin**](../CommonDialog#paperbin) property accepts these members and any other integer from 1 to 32767, so a bin that only the printer driver defines can be selected. A printer offers only some of the bins. + +| Member | Value | Description | +|:-------|:------|:------------| +| **CdlPRBNUpper**{: #CdlPRBNUpper } | `1` | The upper bin. | +| **CdlPRBNLower**{: #CdlPRBNLower } | `2` | The lower bin. | +| **CdlPRBNMiddle**{: #CdlPRBNMiddle } | `3` | The middle bin. | +| **CdlPRBNManual**{: #CdlPRBNManual } | `4` | Manual feed. | +| **CdlPRBNEnvelope**{: #CdlPRBNEnvelope } | `5` | The envelope feeder. | +| **CdlPRBNEnvManual**{: #CdlPRBNEnvManual } | `6` | Manual feed of envelopes. | +| **CdlPRBNAuto**{: #CdlPRBNAuto } | `7` | The printer chooses the bin. This is the default of the property. | +| **CdlPRBNTractor**{: #CdlPRBNTractor } | `8` | The tractor feeder. | +| **CdlPRBNSmallFmt**{: #CdlPRBNSmallFmt } | `9` | The bin for small-format paper. | +| **CdlPRBNLargeFmt**{: #CdlPRBNLargeFmt } | `10` | The bin for large-format paper. | +| **CdlPRBNLargeCapacity**{: #CdlPRBNLargeCapacity } | `11` | The large-capacity bin. | +| **CdlPRBNCassette**{: #CdlPRBNCassette } | `14` | The cassette. | + +## Used by + +- [**CommonDialog**](../CommonDialog) class: [**PaperBin**](../CommonDialog#paperbin) + +## See Also + +- [Enumerations](.) -- all the enumerations of the package +- [CommonDialog](../CommonDialog) class +- [CdlPRPSConstants](CdlPRPSConstants) enumeration diff --git a/docs/Reference/Contributed/VBComDlg/Enumerations/CdlPRCMConstants.md b/docs/Reference/Contributed/VBComDlg/Enumerations/CdlPRCMConstants.md new file mode 100644 index 00000000..681c0ee7 --- /dev/null +++ b/docs/Reference/Contributed/VBComDlg/Enumerations/CdlPRCMConstants.md @@ -0,0 +1,29 @@ +--- +title: CdlPRCMConstants +parent: Enumerations +grand_parent: VBComDlg Package +permalink: /tB/Packages/Contributed/VBComDlg/Enumerations/CdlPRCMConstants +--- + +# CdlPRCMConstants enumeration +{: .no_toc } + +Selects monochrome or color printing. + +The enumeration is declared inside the [**CommonDialog**](../CommonDialog) class. Its members are used without a qualifier, or with the name of the enumeration. Each member has the value of the Windows `DMCOLOR_` constant of the same meaning, which is also the value of the VB6 [**PrinterObjectConstants_ColorMode**](../../../VBRUN/Constants/PrinterObjectConstants_ColorMode) constant of the same name without the **Cdl** prefix. + +The [**ColorMode**](../CommonDialog#colormode) property accepts only these two members; any other value raises run-time error 380. + +| Member | Value | Description | +|:-------|:------|:------------| +| **CdlPRCMMonochrome**{: #CdlPRCMMonochrome } | `1` | Prints in monochrome. | +| **CdlPRCMColor**{: #CdlPRCMColor } | `2` | Prints in color. This is the default of the property. | + +## Used by + +- [**CommonDialog**](../CommonDialog) class: [**ColorMode**](../CommonDialog#colormode) + +## See Also + +- [Enumerations](.) -- all the enumerations of the package +- [CommonDialog](../CommonDialog) class diff --git a/docs/Reference/Contributed/VBComDlg/Enumerations/CdlPRDPConstants.md b/docs/Reference/Contributed/VBComDlg/Enumerations/CdlPRDPConstants.md new file mode 100644 index 00000000..e9bde774 --- /dev/null +++ b/docs/Reference/Contributed/VBComDlg/Enumerations/CdlPRDPConstants.md @@ -0,0 +1,31 @@ +--- +title: CdlPRDPConstants +parent: Enumerations +grand_parent: VBComDlg Package +permalink: /tB/Packages/Contributed/VBComDlg/Enumerations/CdlPRDPConstants +--- + +# CdlPRDPConstants enumeration +{: .no_toc } + +Selects one-sided or two-sided (duplex) printing. + +The enumeration is declared inside the [**CommonDialog**](../CommonDialog) class. Its members are used without a qualifier, or with the name of the enumeration. Each member has the value of the VB6 [**PrinterObjectConstants_Duplex**](../../../VBRUN/Constants/PrinterObjectConstants_Duplex) constant of the same name without the **Cdl** prefix. The class passes the value to the printer unchanged. + +The [**Duplex**](../CommonDialog#duplex) property accepts only these three members; any other value raises run-time error 380. + +| Member | Value | Description | +|:-------|:------|:------------| +| **CdlPRDPSimplex**{: #CdlPRDPSimplex } | `1` | Prints on one side of the paper. This is the default of the property. | +| **CdlPRDPHorizontal**{: #CdlPRDPHorizontal } | `2` | Prints on both sides, with the pages bound on the long edge. The value is that of the Windows constant `DMDUP_VERTICAL`. | +| **CdlPRDPVertical**{: #CdlPRDPVertical } | `3` | Prints on both sides, with the pages bound on the short edge. The value is that of the Windows constant `DMDUP_HORIZONTAL`. | + +## Used by + +- [**CommonDialog**](../CommonDialog) class: [**Duplex**](../CommonDialog#duplex) + +## See Also + +- [Enumerations](.) -- all the enumerations of the package +- [CommonDialog](../CommonDialog) class +- [CdlPRORConstants](CdlPRORConstants) enumeration diff --git a/docs/Reference/Contributed/VBComDlg/Enumerations/CdlPRORConstants.md b/docs/Reference/Contributed/VBComDlg/Enumerations/CdlPRORConstants.md new file mode 100644 index 00000000..fa0755c0 --- /dev/null +++ b/docs/Reference/Contributed/VBComDlg/Enumerations/CdlPRORConstants.md @@ -0,0 +1,30 @@ +--- +title: CdlPRORConstants +parent: Enumerations +grand_parent: VBComDlg Package +permalink: /tB/Packages/Contributed/VBComDlg/Enumerations/CdlPRORConstants +--- + +# CdlPRORConstants enumeration +{: .no_toc } + +Selects the orientation of the paper. + +The enumeration is declared inside the [**CommonDialog**](../CommonDialog) class. Its members are used without a qualifier, or with the name of the enumeration. Each member has the value of the Windows `DMORIENT_` constant of the same meaning, which is also the value of the VB6 [**PrinterObjectConstants_Orientation**](../../../VBRUN/Constants/PrinterObjectConstants_Orientation) constant of the same name without the **Cdl** prefix. + +The [**Orientation**](../CommonDialog#orientation) property accepts only these two members; any other value raises run-time error 380. + +| Member | Value | Description | +|:-------|:------|:------------| +| **CdlPRORPortrait**{: #CdlPRORPortrait } | `1` | Portrait: the paper is taller than it is wide. This is the default of the property. | +| **CdlPRORLandscape**{: #CdlPRORLandscape } | `2` | Landscape: the paper is wider than it is tall. | + +## Used by + +- [**CommonDialog**](../CommonDialog) class: [**Orientation**](../CommonDialog#orientation) + +## See Also + +- [Enumerations](.) -- all the enumerations of the package +- [CommonDialog](../CommonDialog) class +- [CdlPRPSConstants](CdlPRPSConstants) enumeration diff --git a/docs/Reference/Contributed/VBComDlg/Enumerations/CdlPRPQConstants.md b/docs/Reference/Contributed/VBComDlg/Enumerations/CdlPRPQConstants.md new file mode 100644 index 00000000..06fff226 --- /dev/null +++ b/docs/Reference/Contributed/VBComDlg/Enumerations/CdlPRPQConstants.md @@ -0,0 +1,32 @@ +--- +title: CdlPRPQConstants +parent: Enumerations +grand_parent: VBComDlg Package +permalink: /tB/Packages/Contributed/VBComDlg/Enumerations/CdlPRPQConstants +--- + +# CdlPRPQConstants enumeration +{: .no_toc } + +Presets for the print quality (the resolution) of the printer. + +The enumeration is declared inside the [**CommonDialog**](../CommonDialog) class. Its members are used without a qualifier, or with the name of the enumeration. Each member has the value of the Windows `DMRES_` constant of the same meaning, which is also the value of the VB6 [**PrinterObjectConstants_PrintQuality**](../../../VBRUN/Constants/PrinterObjectConstants_PrintQuality) constant of the same name without the **Cdl** prefix. The values are negative, because a positive value is a resolution in dots per inch. + +The [**PrintQuality**](../CommonDialog#printquality) property accepts these members, and also an integer from 0 to 32767, which is a resolution in dots per inch. Any other value raises run-time error 380. + +| Member | Value | Description | +|:-------|:------|:------------| +| **CdlPRPQHigh**{: #CdlPRPQHigh } | `-4` | High quality. This is the default of the property. | +| **CdlPRPQMedium**{: #CdlPRPQMedium } | `-3` | Medium quality. | +| **CdlPRPQLow**{: #CdlPRPQLow } | `-2` | Low quality. | +| **CdlPRPQDraft**{: #CdlPRPQDraft } | `-1` | Draft quality, the lowest. | + +## Used by + +- [**CommonDialog**](../CommonDialog) class: [**PrintQuality**](../CommonDialog#printquality) + +## See Also + +- [Enumerations](.) -- all the enumerations of the package +- [CommonDialog](../CommonDialog) class +- [CdlPRCMConstants](CdlPRCMConstants) enumeration diff --git a/docs/Reference/Contributed/VBComDlg/Enumerations/CdlPRPSConstants.md b/docs/Reference/Contributed/VBComDlg/Enumerations/CdlPRPSConstants.md new file mode 100644 index 00000000..a683966a --- /dev/null +++ b/docs/Reference/Contributed/VBComDlg/Enumerations/CdlPRPSConstants.md @@ -0,0 +1,71 @@ +--- +title: CdlPRPSConstants +parent: Enumerations +grand_parent: VBComDlg Package +permalink: /tB/Packages/Contributed/VBComDlg/Enumerations/CdlPRPSConstants +--- + +# CdlPRPSConstants enumeration +{: .no_toc } + +Selects the paper size. + +The enumeration is declared inside the [**CommonDialog**](../CommonDialog) class. Its members are used without a qualifier, or with the name of the enumeration. Each member has the value of the Windows `DMPAPER_` constant for the same size, which is also the value of the VB6 [**PrinterObjectConstants_PaperSize**](../../../VBRUN/Constants/PrinterObjectConstants_PaperSize) constant of the same name without the **Cdl** prefix. + +The [**PaperSize**](../CommonDialog#papersize) property accepts these members and any other integer from 1 to 32767, so a size that only the printer driver defines can be selected. A printer supports only some of the sizes. Without an assignment, the property is **CdlPRPSA4** on a system with the metric measurement system and **CdlPRPSLetter** on a US system. + +| Member | Value | Description | +|:-------|:------|:------------| +| **CdlPRPSLetter**{: #CdlPRPSLetter } | `1` | Letter, 8.5 x 11 in. | +| **CdlPRPSLetterSmall**{: #CdlPRPSLetterSmall } | `2` | Letter Small, 8.5 x 11 in. | +| **CdlPRPSTabloid**{: #CdlPRPSTabloid } | `3` | Tabloid, 11 x 17 in. | +| **CdlPRPSLedger**{: #CdlPRPSLedger } | `4` | Ledger, 17 x 11 in. | +| **CdlPRPSLegal**{: #CdlPRPSLegal } | `5` | Legal, 8.5 x 14 in. | +| **CdlPRPSStatement**{: #CdlPRPSStatement } | `6` | Statement, 5.5 x 8.5 in. | +| **CdlPRPSExecutive**{: #CdlPRPSExecutive } | `7` | Executive, 7.25 x 10.5 in. | +| **CdlPRPSA3**{: #CdlPRPSA3 } | `8` | A3, 297 x 420 mm. | +| **CdlPRPSA4**{: #CdlPRPSA4 } | `9` | A4, 210 x 297 mm. | +| **CdlPRPSA4Small**{: #CdlPRPSA4Small } | `10` | A4 Small, 210 x 297 mm. | +| **CdlPRPSA5**{: #CdlPRPSA5 } | `11` | A5, 148 x 210 mm. | +| **CdlPRPSB4**{: #CdlPRPSB4 } | `12` | B4 (JIS), 250 x 354 mm. | +| **CdlPRPSB5**{: #CdlPRPSB5 } | `13` | B5 (JIS), 182 x 257 mm. | +| **CdlPRPSFolio**{: #CdlPRPSFolio } | `14` | Folio, 8.5 x 13 in. | +| **CdlPRPSQuarto**{: #CdlPRPSQuarto } | `15` | Quarto, 215 x 275 mm. | +| **CdlPRPS10x14**{: #CdlPRPS10x14 } | `16` | 10 x 14 in. | +| **CdlPRPS11x17**{: #CdlPRPS11x17 } | `17` | 11 x 17 in. | +| **CdlPRPSNote**{: #CdlPRPSNote } | `18` | Note, 8.5 x 11 in. | +| **CdlPRPSEnv9**{: #CdlPRPSEnv9 } | `19` | Envelope #9, 3.875 x 8.875 in. | +| **CdlPRPSEnv10**{: #CdlPRPSEnv10 } | `20` | Envelope #10, 4.125 x 9.5 in. | +| **CdlPRPSEnv11**{: #CdlPRPSEnv11 } | `21` | Envelope #11, 4.5 x 10.375 in. | +| **CdlPRPSEnv12**{: #CdlPRPSEnv12 } | `22` | Envelope #12, 4.75 x 11 in. | +| **CdlPRPSEnv14**{: #CdlPRPSEnv14 } | `23` | Envelope #14, 5 x 11.5 in. | +| **CdlPRPSCSheet**{: #CdlPRPSCSheet } | `24` | C size sheet. | +| **CdlPRPSDSheet**{: #CdlPRPSDSheet } | `25` | D size sheet. | +| **CdlPRPSESheet**{: #CdlPRPSESheet } | `26` | E size sheet. | +| **CdlPRPSEnvDL**{: #CdlPRPSEnvDL } | `27` | Envelope DL, 110 x 220 mm. | +| **CdlPRPSEnvC5**{: #CdlPRPSEnvC5 } | `28` | Envelope C5, 162 x 229 mm. | +| **CdlPRPSEnvC3**{: #CdlPRPSEnvC3 } | `29` | Envelope C3, 324 x 458 mm. | +| **CdlPRPSEnvC4**{: #CdlPRPSEnvC4 } | `30` | Envelope C4, 229 x 324 mm. | +| **CdlPRPSEnvC6**{: #CdlPRPSEnvC6 } | `31` | Envelope C6, 114 x 162 mm. | +| **CdlPRPSEnvC65**{: #CdlPRPSEnvC65 } | `32` | Envelope C65, 114 x 229 mm. | +| **CdlPRPSEnvB4**{: #CdlPRPSEnvB4 } | `33` | Envelope B4, 250 x 353 mm. | +| **CdlPRPSEnvB5**{: #CdlPRPSEnvB5 } | `34` | Envelope B5, 176 x 250 mm. | +| **CdlPRPSEnvB6**{: #CdlPRPSEnvB6 } | `35` | Envelope B6, 176 x 125 mm. | +| **CdlPRPSEnvItaly**{: #CdlPRPSEnvItaly } | `36` | Italian envelope, 110 x 230 mm. | +| **CdlPRPSEnvMonarch**{: #CdlPRPSEnvMonarch } | `37` | Envelope Monarch, 3.875 x 7.5 in. | +| **CdlPRPSEnvPersonal**{: #CdlPRPSEnvPersonal } | `38` | Envelope Personal, 3.625 x 6.5 in. | +| **CdlPRPSFanfoldUS**{: #CdlPRPSFanfoldUS } | `39` | US standard fanfold, 14.875 x 11 in. | +| **CdlPRPSFanfoldStdGerman**{: #CdlPRPSFanfoldStdGerman } | `40` | German standard fanfold, 8.5 x 12 in. | +| **CdlPRPSFanfoldLglGerman**{: #CdlPRPSFanfoldLglGerman } | `41` | German legal fanfold, 8.5 x 13 in. | +| **CdlPRPSUser**{: #CdlPRPSUser } | `256` | A user-defined size. | + +## Used by + +- [**CommonDialog**](../CommonDialog) class: [**PaperSize**](../CommonDialog#papersize) + +## See Also + +- [Enumerations](.) -- all the enumerations of the package +- [CommonDialog](../CommonDialog) class +- [CdlPRBNConstants](CdlPRBNConstants) enumeration +- [CdlPRORConstants](CdlPRORConstants) enumeration diff --git a/docs/Reference/Contributed/VBComDlg/Enumerations/CdlPSDConstants.md b/docs/Reference/Contributed/VBComDlg/Enumerations/CdlPSDConstants.md new file mode 100644 index 00000000..365e0bcf --- /dev/null +++ b/docs/Reference/Contributed/VBComDlg/Enumerations/CdlPSDConstants.md @@ -0,0 +1,41 @@ +--- +title: CdlPSDConstants +parent: Enumerations +grand_parent: VBComDlg Package +permalink: /tB/Packages/Contributed/VBComDlg/Enumerations/CdlPSDConstants +--- + +# CdlPSDConstants enumeration +{: .no_toc } + +Options of the Page Setup dialog, combined with **Or** in the [**Flags**](../CommonDialog#flags) property. + +The enumeration is declared inside the [**CommonDialog**](../CommonDialog) class. Its members are used without a qualifier, or with the name of the enumeration. The values are those of the Windows `PSD_` constants of the `PAGESETUPDLG` structure. + +When the [**HookEvents**](../CommonDialog#hookevents) property is **True**, the class adds the Windows flag that switches on its hook procedure (`PSD_ENABLEPAGESETUPHOOK`) and removes it from **Flags** again when the dialog closes, so it is not a member. + +| Member | Value | Description | +|:-------|:------|:------------| +| **CdlPSDDefaultMinMargins**{: #CdlPSDDefaultMinMargins } | `&H0` | The minimum margins are the ones the printer allows. The value is zero, so this is the behavior whenever **CdlPSDMinMargins** is not set. | +| **CdlPSDMinMargins**{: #CdlPSDMinMargins } | `&H1` | The dialog takes the minimum margins from [**PageLeftMinMargin**](../CommonDialog#pageleftminmargin), [**PageTopMinMargin**](../CommonDialog#pagetopminmargin), [**PageRightMinMargin**](../CommonDialog#pagerightminmargin) and [**PageBottomMinMargin**](../CommonDialog#pagebottomminmargin), and does not let the user enter smaller margins. The class does not update these properties when the dialog closes. | +| **CdlPSDMargins**{: #CdlPSDMargins } | `&H2` | The dialog opens with the margins in [**PageLeftMargin**](../CommonDialog#pageleftmargin), [**PageTopMargin**](../CommonDialog#pagetopmargin), [**PageRightMargin**](../CommonDialog#pagerightmargin) and [**PageBottomMargin**](../CommonDialog#pagebottommargin). Without it the dialog starts with margins of one inch. | +| **CdlPSDInThousandthsOfInches**{: #CdlPSDInThousandthsOfInches } | `&H4` | The margins are in thousandths of an inch. | +| **CdlPSDInHundredthsOfMillimeters**{: #CdlPSDInHundredthsOfMillimeters } | `&H8` | The margins are in hundredths of a millimeter. When neither this flag nor **CdlPSDInThousandthsOfInches** is set, the unit follows the measurement system of the user. | +| **CdlPSDDisableMargins**{: #CdlPSDDisableMargins } | `&H10` | Disables the part of the dialog for the margins. | +| **CdlPSDDisablePrinter**{: #CdlPSDDisablePrinter } | `&H20` | Disables the **Printer** button. | +| **CdlPSDNoWarning**{: #CdlPSDNoWarning } | `&H80` | The dialog shows no warning when the computer has no default printer. | +| **CdlPSDDisableOrientation**{: #CdlPSDDisableOrientation } | `&H100` | Disables the part of the dialog for the orientation. | +| **CdlPSDDisablePaper**{: #CdlPSDDisablePaper } | `&H200` | Disables the part of the dialog for the paper size and source. | +| **CdlPSDReturnDefault**{: #CdlPSDReturnDefault } | `&H400` | The dialog does not appear. The printer properties receive the settings of the default printer. | +| **CdlPSDHelpButton**{: #CdlPSDHelpButton } | `&H800` | Shows a Help button. A click raises the [**Help**](../CommonDialog#help) event, but only when the dialog has an owner window. | +| **CdlPSDDisablePagePainting**{: #CdlPSDDisablePagePainting } | `&H80000` | The dialog does not draw the contents of its sample page. | +| **CdlPSDNoNetworkButton**{: #CdlPSDNoNetworkButton } | `&H200000` | Hides and disables the Network button. | + +## Used by + +- [**CommonDialog**](../CommonDialog) class: [**Flags**](../CommonDialog#flags) (for [**ShowPageSetup**](../CommonDialog#showpagesetup)) + +## See Also + +- [Enumerations](.) -- all the enumerations of the package +- [CommonDialog](../CommonDialog) class diff --git a/docs/Reference/Contributed/VBComDlg/Enumerations/index.md b/docs/Reference/Contributed/VBComDlg/Enumerations/index.md new file mode 100644 index 00000000..c59937f7 --- /dev/null +++ b/docs/Reference/Contributed/VBComDlg/Enumerations/index.md @@ -0,0 +1,74 @@ +--- +title: Enumerations +parent: VBComDlg Package +permalink: /tB/Packages/Contributed/VBComDlg/Enumerations/ +has_children: true +has_toc: false +nav_order: 99 +--- + +# VBComDlg Enumerations +{: .no_toc } + +The 17 public enumerations of the package, in groups by dialog. All of them are declared inside the [**CommonDialog**](../CommonDialog) class, and their members can be written with or without the name of the enumeration, as in `CdlOFNFileMustExist` or `CdlOFNConstants.CdlOFNFileMustExist`. + +Most of them are sets of flags for the [**Flags**](../CommonDialog#flags) property, with the values of the Windows constants of the same names (`OFN_FILEMUSTEXIST` for **CdlOFNFileMustExist**, `CC_FULLOPEN` for **CdlCCFullOpen**). The members are combined with **Or**. + +## File dialogs +{: .no_toc } + +The File Open and File Save dialogs. + +- [CdlOFNConstants](CdlOFNConstants) -- options of the File Open and File Save dialogs +- [CdlOFNShareViResultConstants](CdlOFNShareViResultConstants) -- how the dialog answers a sharing violation + +## Color dialog +{: .no_toc } + +- [CdlCCConstants](CdlCCConstants) -- options of the Color dialog + +## Font dialog +{: .no_toc } + +- [CdlCFConstants](CdlCFConstants) -- options of the Font dialog + +## Print dialogs +{: .no_toc } + +The Print dialog and the extended Print dialog. + +- [CdlPDConstants](CdlPDConstants) -- options of the Print and extended Print dialogs +- [CdlPDResultConstants](CdlPDResultConstants) -- the button that closed the extended Print dialog + +## Page Setup dialog +{: .no_toc } + +- [CdlPSDConstants](CdlPSDConstants) -- options of the Page Setup dialog + +## Printer settings +{: .no_toc } + +The values of the printer properties that the Print, extended Print and Page Setup dialogs read and return. + +- [CdlPRBNConstants](CdlPRBNConstants) -- paper sources (bins) +- [CdlPRCMConstants](CdlPRCMConstants) -- monochrome or color printing +- [CdlPRDPConstants](CdlPRDPConstants) -- one-sided or two-sided printing +- [CdlPRORConstants](CdlPRORConstants) -- portrait or landscape orientation +- [CdlPRPQConstants](CdlPRPQConstants) -- print quality presets +- [CdlPRPSConstants](CdlPRPSConstants) -- paper sizes + +## Folder Browser dialog +{: .no_toc } + +- [CdlBIFConstants](CdlBIFConstants) -- options of the Folder Browser dialog + +## Find and Replace dialogs +{: .no_toc } + +- [CdlFRConstants](CdlFRConstants) -- options and results of the Find and Replace dialogs + +## Help and errors +{: .no_toc } + +- [CdlHelpConstants](CdlHelpConstants) -- commands for the WinHelp viewer +- [CdlErrorConstants](CdlErrorConstants) -- run-time error numbers that the dialogs raise diff --git a/docs/Reference/Contributed/VBComDlg/index.md b/docs/Reference/Contributed/VBComDlg/index.md index 371a1b6e..4dca1c97 100644 --- a/docs/Reference/Contributed/VBComDlg/index.md +++ b/docs/Reference/Contributed/VBComDlg/index.md @@ -19,6 +19,10 @@ The **VBComDlg** contributed package provides the **CommonDialog** class, which - [CommonDialog](CommonDialog) -- provides access to the Windows common dialogs: File Open, File Save, Color, Font, Print, Page Setup, Folder Browser, Find, and Replace. +## Enumerations + +- [Enumerations](Enumerations/) -- the 17 enumerations of the **CommonDialog** class: the flags of each dialog, the printer settings, the help commands and the error numbers. + ## Test cases The notes and warnings of this section are checked by the test cases in [VBComDlg-tests.twinproj](VBComDlg-tests.twinproj), a twinBASIC project. It uses VBComDlg as a [linked package](../../../../Features/Packages/Linked#manual-management): put the package's `.twinpack` in `%APPDATA%\twinBASIC\packages`, then run the project, and each case prints whether it passes. diff --git a/test/package-tests/VBComDlg/Sources/DialogDriver.twin b/test/package-tests/VBComDlg/Sources/DialogDriver.twin index 6e32d93d..2a0794e3 100644 --- a/test/package-tests/VBComDlg/Sources/DialogDriver.twin +++ b/test/package-tests/VBComDlg/Sources/DialogDriver.twin @@ -126,5 +126,141 @@ Module DialogDriver If hDlg = 0 Then Exit Function Exists = (IsWindow(hDlg) <> 0) End Function + ' ---- the Folder Browser dialog + + Private Declare PtrSafe Function EnumChildWindows Lib "user32" (ByVal hWndParent As LongPtr, ByVal lpEnumFunc As LongPtr, ByVal lParam As LongPtr) As Long + + Private Type TVITEMW + mask As Long + hItem As LongPtr + state As Long + stateMask As Long + pszText As LongPtr + cchTextMax As Long + iImage As Long + iSelectedImage As Long + cChildren As Long + lParam As LongPtr + End Type + + Private Const TVM_EXPAND As Long = &H1102 + Private Const TVM_GETITEMW As Long = &H113E + Private Const TVM_GETNEXTITEM As Long = &H110A + Private Const TVM_SELECTITEM As Long = &H110B + Private Const TVGN_ROOT As Long = 0 + Private Const TVGN_NEXT As Long = 1 + Private Const TVGN_CHILD As Long = 4 + Private Const TVGN_CARET As Long = 9 + Private Const TVE_EXPAND As Long = 2 + Private Const TVIF_TEXT As Long = 1 + + Private mBrowseTimer As LongPtr + Private mBrowseTicks As Long + Private mBrowsePath As String + Private mBrowseDone As Boolean + Private mBrowseOpened As Long + Private mBrowseTree As LongPtr + Private mBrowseSelected As String + + ' Arms a timer which, while the next ShowFolderBrowser runs, follows Path through the tree of + ' the dialog, selects the item it reaches and presses OK. Path names the items from the root + ' of the tree, separated by backslashes, and "*" stands for the first item below an item: "*" + ' alone is the first item below the root. The dialog is closed when the item is not found or + ' OK stays disabled for ten seconds. StopSelecting returns how many Folder Browser dialogs + ' were open. + Public Sub StartSelecting(Optional ByVal Path As String = "*") + mBrowseDone = False + mBrowsePath = Path + mBrowseTree = 0 + mBrowseTicks = 0 + mBrowseOpened = 0 + mBrowseSelected = "" + mBrowseTimer = SetTimer(0, 0, 250, AddressOf BrowseTick) + End Sub + + Public Function StopSelecting() As Long + If mBrowseTimer <> 0 Then KillTimer 0, mBrowseTimer + mBrowseTimer = 0 + StopSelecting = mBrowseOpened + End Function + + ' The text of the item the test selected, empty when it found none. + Public Function SelectedItem() As String + SelectedItem = mBrowseSelected + End Function + + Private Sub BrowseTick(ByVal hWnd As LongPtr, ByVal uMsg As Long, ByVal idEvent As LongPtr, ByVal dwTime As Long) + mBrowseTicks = mBrowseTicks + 1 + If mBrowseTicks > 40 Then + EnumThreadWindows GetCurrentThreadId(), AddressOf DismissWindow, 0 + Exit Sub + End If + If mBrowseDone Then Exit Sub + EnumThreadWindows GetCurrentThreadId(), AddressOf BrowseWindow, 0 + End Sub + + ' Called at each tick while the dialog is open and OK is not pressed. A folder that lists its + ' items in the background has none at the first tick, and OK is enabled a moment after the + ' selection changes, so each tick follows the path again from the root. + Private Function BrowseWindow(ByVal hWnd As LongPtr, ByVal lParam As LongPtr) As Long + BrowseWindow = 1 + Dim cls As String + cls = Space$(64) + Dim n As Long + n = GetClassNameW(hWnd, StrPtr(cls), 64) + If Left$(cls, n) <> "#32770" Then Exit Function + If IsWindowVisible(hWnd) = 0 Then Exit Function + mBrowseTree = 0 + EnumChildWindows hWnd, AddressOf FindTree, 0 + If mBrowseTree = 0 Then Exit Function + If mBrowseOpened = 0 Then mBrowseOpened = 1 + Dim hCur As LongPtr, hItem As LongPtr + hCur = SendMessageW(mBrowseTree, TVM_GETNEXTITEM, TVGN_ROOT, 0) + If hCur = 0 Then Exit Function + Dim steps() As String, s As Long, wanted As String, found As Boolean + steps = Split(mBrowsePath, "\") + For s = 0 To UBound(steps) + SendMessageW mBrowseTree, TVM_EXPAND, TVE_EXPAND, hCur + wanted = steps(s) + found = False + hItem = SendMessageW(mBrowseTree, TVM_GETNEXTITEM, TVGN_CHILD, hCur) + Do While hItem <> 0 + If wanted = "*" Or LCase$(ItemText(hItem)) = LCase$(wanted) Then + hCur = hItem + found = True + Exit Do + End If + hItem = SendMessageW(mBrowseTree, TVM_GETNEXTITEM, TVGN_NEXT, hItem) + Loop + If found = False Then Exit Function + Next s + SendMessageW mBrowseTree, TVM_SELECTITEM, TVGN_CARET, hCur + mBrowseSelected = ItemText(hCur) + If Press(hWnd, 1) Then mBrowseDone = True + End Function + + Private Function FindTree(ByVal hWnd As LongPtr, ByVal lParam As LongPtr) As Long + FindTree = 1 + Dim cls As String + cls = Space$(64) + Dim n As Long + n = GetClassNameW(hWnd, StrPtr(cls), 64) + If Left$(cls, n) = "SysTreeView32" Then + mBrowseTree = hWnd + FindTree = 0 + End If + End Function + + Private Function ItemText(ByVal hItem As LongPtr) As String + Dim tvi As TVITEMW + Dim buf As String + buf = Space$(256) + tvi.mask = TVIF_TEXT + tvi.hItem = hItem + tvi.pszText = StrPtr(buf) + tvi.cchTextMax = 256 + SendMessageW mBrowseTree, TVM_GETITEMW, 0, VarPtr(tvi) + ItemText = Left$(buf, InStr(buf & vbNullChar, vbNullChar) - 1) + End Function End Module diff --git a/test/package-tests/VBComDlg/Sources/FolderBrowserTests.twin b/test/package-tests/VBComDlg/Sources/FolderBrowserTests.twin new file mode 100644 index 00000000..9babdba0 --- /dev/null +++ b/test/package-tests/VBComDlg/Sources/FolderBrowserTests.twin @@ -0,0 +1,30 @@ +' CommonDialog.ShowFolderBrowser: what it returns for an item that is not a file system path. +' +' The dialog is modal, so DialogDriver selects the item and presses OK from a timer which the +' dialog's own message loop delivers. The tree of the printers is the dialog with CSIDL_PRINTERS +' (4) as its root folder. +[TestFixture] +Module FolderBrowserTests + + [TestCase] + Public Sub BrowseForPrinter_SelectedPrinterIsReturned() + Expect.Begin + Dim dlg As New CommonDialog + dlg.Flags = CdlBIFBrowseForPrinter Or CdlBIFNewDialogStyle + dlg.RootFolder = 4 + Dim shown As Boolean, n As Long, opened As Long + On Error Resume Next + DialogDriver.StartSelecting "*" + shown = dlg.ShowFolderBrowser + n = Err.Number + opened = DialogDriver.StopSelecting() + On Error GoTo 0 + Expect.AreEqual 1, opened, "Folder Browser dialogs open while ShowFolderBrowser ran (needs one installed printer)" + Expect.IsTrue Len(DialogDriver.SelectedItem()) > 0, "the test selected the first printer in the dialog" + Expect.AreEqual 0, n, "Err.Number from ShowFolderBrowser with CdlBIFBrowseForPrinter after OK" + ' correct: the call reports that nothing was chosen, or FileName names the printer + Expect.IsTrue (shown = False) Or (Len(dlg.FileName) > 0), "ShowFolderBrowser with CdlBIFBrowseForPrinter, after OK with a printer selected, returns False or sets FileName to the printer (it returned " & shown & ", FileName " & IIf(Len(dlg.FileName) = 0, "empty", "set") & ")" + Expect.Done + End Sub + +End Module diff --git a/test/package-tests/VBComDlg/Sources/RunAll.twin b/test/package-tests/VBComDlg/Sources/RunAll.twin index 51ab80a0..29a8958e 100644 --- a/test/package-tests/VBComDlg/Sources/RunAll.twin +++ b/test/package-tests/VBComDlg/Sources/RunAll.twin @@ -5,7 +5,7 @@ Module RunAll Public Sub Main() - Expect.StartRun "VBComDlg 1.0.13.0: 57 test cases" + Expect.StartRun "VBComDlg 1.0.13.0: 58 test cases" On Error Resume Next Expect.StartCase Err.Clear @@ -117,6 +117,10 @@ Module RunAll Expect.EndCase "FindReplaceTests.ReplaceAll_ButtonRaisesNoOtherEvent", Err.Number, Err.Description Expect.StartCase Err.Clear + FolderBrowserTests.BrowseForPrinter_SelectedPrinterIsReturned + Expect.EndCase "FolderBrowserTests.BrowseForPrinter_SelectedPrinterIsReturned", Err.Number, Err.Description + Expect.StartCase + Err.Clear PropertyTests.Action_Read_Raises394 Expect.EndCase "PropertyTests.Action_Read_Raises394", Err.Number, Err.Description Expect.StartCase diff --git a/test/package-tests/VBComDlg/expect.json b/test/package-tests/VBComDlg/expect.json index ceb1074b..86c19d7d 100644 --- a/test/package-tests/VBComDlg/expect.json +++ b/test/package-tests/VBComDlg/expect.json @@ -6,6 +6,9 @@ }, "FindReplaceTests.ReplaceAll_MessageRaisesEvent": { "fails": "1 of 1 checks failed: ReplaceAll events raised by the message a Replace All press sends (FR_REPLACEALL): expected 1, got 0" + }, + "FolderBrowserTests.BrowseForPrinter_SelectedPrinterIsReturned": { + "fails": "1 of 4 checks failed: ShowFolderBrowser with CdlBIFBrowseForPrinter, after OK with a printer selected, returns False or sets FileName to the printer (it returned True, FileName empty): expected True, got False" } } } From 6bc5241e2666a98b7fee382d92f7ce923ede8ff3 Mon Sep 17 00:00:00 2001 From: Kuba Sunderland-Ober Date: Thu, 15 Oct 2026 15:42:21 +0200 Subject: [PATCH 4/6] BUGS-TO-REPORT: a GoSub in an LLVM-built exe ends it with an access violation (BETA 1005, win32 and win64; reproducer bugs/gosub-llvm-exe-crash); WARNINGs on the LLVM page and GoSub...Return --- BUGS-TO-REPORT.md | 53 +++++++++++++++ WIP.md | 2 +- .../gosub-llvm-exe-crash.twinproj | Bin 0 -> 2941 bytes bugs/gosub-llvm-exe-crash/repro.json | 13 ++++ bugs/gosub-llvm-exe-crash/src/Settings | 61 ++++++++++++++++++ .../src/Sources/Startup.twin | 32 +++++++++ docs/LLVM/Getting-Started.md | 3 + docs/Reference/Core/GoSub-Return.md | 3 + 8 files changed, 166 insertions(+), 1 deletion(-) create mode 100644 bugs/gosub-llvm-exe-crash/gosub-llvm-exe-crash.twinproj create mode 100644 bugs/gosub-llvm-exe-crash/repro.json create mode 100644 bugs/gosub-llvm-exe-crash/src/Settings create mode 100644 bugs/gosub-llvm-exe-crash/src/Sources/Startup.twin diff --git a/BUGS-TO-REPORT.md b/BUGS-TO-REPORT.md index 8afc0548..c1deb424 100644 --- a/BUGS-TO-REPORT.md +++ b/BUGS-TO-REPORT.md @@ -5034,3 +5034,56 @@ Each line gives what it asks for, as its neighbours do: a help context of 2000, The import is not the cause: it keeps every `Attribute` line of a `.bas` and a `.cls` byte for byte, and those of a `.frm`, `.ctl` and `.pag` inside the class it writes. The type information a class has at run time in the IDE carries no flags and no descriptions for any member, whichever way they are written, so the built DLL is where to look. `[NonBrowsable]` on a public field leaves it without `nonbrowsable` as well. A VB6 build of the same class was not made: VB6 registers an ActiveX DLL as it builds it. Severity: medium for anyone moving a VB6 component to twinBASIC under binary compatibility; nothing fails, and the loss shows only to the component's users, in their object browsers and data-binding dialogs. + +--- + +## A `GoSub` in an exe built with LLVM ends the program with an access violation + +**Describe the bug** +In an exe built with LLVM turned on, a procedure that runs `GoSub