# 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**](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Graphics.md) object draws, a [**Pen**](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Pen.md) or a brush such as [**SolidBrush**](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/SolidBrush.md) says how, a [**Bitmap**](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Bitmap.md) 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**](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Bitmap.md#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**](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/SolidBrush.md), [**Pen**](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Pen.md), [**Graphics.Clear**](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Graphics.md#clear), [**HatchBrush**](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/HatchBrush.md) 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**](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Types/Color.md). See [Colours](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/IBrush.md#colours) and [**Color**](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Types/Color.md#windows-colours).
> - [**Image.Save**](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Image.md#save) and **Bitmap.Save** cannot pass encoder parameters: the call returns an error, ignores them, or stops the program.
> - [**InstalledFontCollection**](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/InstalledFontCollection.md#creating) and [**PrivateFontCollection**](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/PrivateFontCollection.md#creating) cannot be created, so no font collection can be used.
> - Some calls never return: the function form of [**HatchBrush**](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/HatchBrush.md#creating), the array forms of [**SetBlend**](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/LinearGradientBrush.md#setblend) and [**SetInterpolationColors**](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/LinearGradientBrush.md#setinterpolationcolors) of the gradient brushes, the stroke cap setters of [**CustomLineCap**](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/CustomLineCap.md#setstrokecaps) and of [**ArrowCap**](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/ArrowCap.md).
> - Some calls end the program: [**Graphics.DrawImage**](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Graphics.md#drawimage) with a destination rectangle (in a 32-bit program) and with an array of points and a source part, [**Graphics.IsVisible**](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Graphics.md#isvisible) with a **GpPointF** (in a 32-bit program), the methods **TestControlForceBilinear** and **TestControlNoICM** of [**GdiPlusUser**](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/GdiPlusUser.md#methods), drawing an image that was given a [**GdiPlusAbort**](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/GdiPlusAbort.md), and [**InitializePalette**](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Helpers.md#initializepalette).
> - The [**Metafile**](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Metafile.md#creating) constructors that take a file name, and the ones that record, raise error 13.
> - The [effects](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Effect.md#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**](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Graphics.md#transform), a [**Pen**](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Pen.md#transform) or a brush returns **Nothing**. A **Graphics** and the brushes have [**GetTransform**](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/ITransformable.md#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**](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/GdiPlusUser.md).

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**](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Types/GpPointF.md) and [**GpRect**](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Types/GpRect.md), 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`](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Image.md) and [`GdiPlus.Font`](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Font.md); the constructor functions `Image(...)` and `Font(...)` need no prefix.

### Drawing on a bitmap

The sample above draws on a [**Bitmap**](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Bitmap.md): `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**](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Graphics.md#bufferedgraphicsfromhwnd), draws, and releases it, which copies the picture to the window. [Painting a window or a form](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Graphics.md#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**](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Graphics.md#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**](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Enumerations/GpStatus.md) 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**](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/GdiPlusBase.md) 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**](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Helpers.md#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](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/GdiPlusUser.md) -- starts GDI+; one instance must exist while the package is used
- [GdiPlusBase](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/GdiPlusBase.md) -- the base class of the classes: **LastResult**, the status text and the error handling
- [GdiPlusAbort](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/GdiPlusAbort.md) -- an object that GDI+ can ask whether to stop (GDI+ does not use it)
- [Helpers](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Helpers.md) -- the functions and constants that belong to no class: status text, pixel formats, effect IDs, metafile headers, property tags
- [ImageCodec](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/ImageCodec.md) -- the installed encoders and decoders, and the IDs of image formats and encoder parameters

### Drawing

- [Graphics](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Graphics.md) -- the drawing surface: lines, shapes, text and images on a bitmap, a window or a device context
- [VBGraphics](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/VBGraphics.md) -- a **Graphics** that also draws with the `Line`, `Circle` and `PSet` statements of Visual Basic
- [IDeviceContext](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/IDeviceContext.md) -- the interface to hand out a Windows device context
- [ITransformable](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/ITransformable.md) -- the members that classes with a transformation matrix share

### Paths, regions and transformations

- [GraphicsPath](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/GraphicsPath.md) -- a sequence of connected lines, curves and shapes
- [PathIterator](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/PathIterator.md) -- reads the figures and points of a path one part after another
- [PathData](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/PathData.md) -- the points of a path and their types, in memory
- [Region](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Region.md) -- an area of a drawing surface, of any shape
- [Matrix](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Matrix.md) -- a 3 by 3 affine transformation

### Pens and brushes

- [Pen](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Pen.md) -- draws lines and outlines
- [IBrush](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/IBrush.md) -- the interface that every brush implements
- [SolidBrush](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/SolidBrush.md) -- fills with one colour
- [HatchBrush](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/HatchBrush.md) -- fills with a pattern of lines or dots
- [TextureBrush](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/TextureBrush.md) -- fills with tiles of an image
- [LinearGradientBrush](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/LinearGradientBrush.md) -- fills with a colour that changes along a line
- [PathGradientBrush](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/PathGradientBrush.md) -- fills with a colour that changes from a centre to the edge of a path
- [CustomLineCap](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/CustomLineCap.md) -- a line end whose shape is a path
- [ArrowCap](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/ArrowCap.md) -- a line end in the shape of an arrowhead

### Images and effects

- [Image](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Image.md) -- the base class of bitmaps and metafiles: loading, saving, size, frames and properties
- [Bitmap](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Bitmap.md) -- a raster picture that a program can draw on and read pixel by pixel
- [Metafile](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Metafile.md) -- a picture stored as a sequence of drawing commands
- [CachedBitmap](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/CachedBitmap.md) -- a bitmap in the format of one **Graphics**, for fast repeated drawing
- [ImageAttributes](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/ImageAttributes.md) -- colour adjustments that GDI+ applies while it draws an image
- [IImageBytes](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/IImageBytes.md) -- the COM interface for direct access to the bytes of an image in memory
- [Effect](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Effect.md) -- the base class of the image effects
- [Blur](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Blur.md), [Sharpen](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Sharpen.md), [BrightnessContrast](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/BrightnessContrast.md), [HueSaturationLightness](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/HueSaturationLightness.md), [Levels](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Levels.md), [Tint](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Tint.md), [ColorBalance](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/ColorBalance.md), [ColorMatrixEffect](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/ColorMatrixEffect.md), [ColorLUT](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/ColorLUT.md), [ColorCurve](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/ColorCurve.md), [RedEyeCorrection](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/RedEyeCorrection.md) -- the eleven effects

### Text

- [Font](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Font.md) -- a font by family, size, style and unit
- [FontFamily](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/FontFamily.md) -- a set of fonts that share a typeface design
- [FontCollection](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/FontCollection.md) -- the base class of the two collections
- [InstalledFontCollection](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/InstalledFontCollection.md) -- the font families installed on the system
- [PrivateFontCollection](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/PrivateFontCollection.md) -- fonts loaded from files or memory for one program
- [StringFormat](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/StringFormat.md) -- how a string is laid out: alignment, wrapping, trimming, tab stops

## Types

The [Types](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Types/index.md) page lists the structures of the package, in groups:

- colour: [Color](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Types/Color.md), [ColorMatrix](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Types/ColorMatrix.md), [ColorPalette](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Types/ColorPalette.md), [ColorMap](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Types/ColorMap.md), [ColorChannelLUT](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Types/ColorChannelLUT.md)
- geometry: [GpPoint](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Types/GpPoint.md), [GpPointF](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Types/GpPointF.md), [GpSize](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Types/GpSize.md), [GpSizeF](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Types/GpSizeF.md), [GpRect](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Types/GpRect.md), [GpRectF](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Types/GpRectF.md), [CharacterRange](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Types/CharacterRange.md)
- paths: [PathPointType](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Types/PathPointType.md), [PathType](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Types/PathType.md), [TypedPoint](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Types/TypedPoint.md), [TypedPoints](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Types/TypedPoints.md), [SubPath](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Types/SubPath.md), [Marker](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Types/Marker.md)
- images and metafiles: [BitmapData](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Types/BitmapData.md), [MetafileHeader](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Types/MetafileHeader.md), [GpPropertyItem](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Types/GpPropertyItem.md), [GpImageCodecInfo](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Types/GpImageCodecInfo.md), [GpEncoderParameter](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Types/GpEncoderParameter.md)
- starting GDI+: [GdiplusStartupInput](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Types/GdiplusStartupInput.md), [GdiplusStartupOutput](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Types/GdiplusStartupOutput.md)
- the parameters of the effects: [BlurParams](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Types/BlurParams.md), [SharpenParams](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Types/SharpenParams.md) and the others

## Enumerations

The [Enumerations](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Enumerations/index.md) 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](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Enumerations/GpUnit.md), [GpSmoothingMode](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Enumerations/GpSmoothingMode.md), [GpFontStyle](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Enumerations/GpFontStyle.md), [PixelFormat](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Enumerations/PixelFormat.md) and [GpStatus](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Enumerations/GpStatus.md). [CColor](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Enumerations/CColor.md) 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](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Graphics.md) class -- the drawing surface
- [Bitmap](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Bitmap.md) class -- a picture to draw on
- [Experimental Packages](/twinBASIC-docs/tB/Packages/Experimental/index.md) -- the packages from TWINSERV that are not yet ready for use in a program

## Test cases

The notes and warnings of this section are checked by the test cases in [GdiPlus-tests.twinproj](GdiPlus-tests.twinproj), a twinBASIC project. It uses GdiPlus as a [linked package](/twinBASIC-docs/Features/Packages/Linked.md#manual-management): put the package's `.twinpack` in `%APPDATA%\twinBASIC\packages`, then run the project, and each case prints whether it passes.
