Skip to contents

Plot AmigaFFH objects using base plotting routines.

Usage

# S3 method for AmigaBasicShape
plot(x, y, ...)

# S3 method for AmigaBitmapFont
plot(x, y, ...)

# S3 method for AmigaBitmapFontSet
plot(x, y, ...)

# S3 method for hardwareSprite
plot(x, y, ...)

# S3 method for IFFChunk
plot(x, y, ...)

# S3 method for IFF.FORM
plot(x, y, ...)

# S3 method for IFF.8SVX
plot(x, y, ...)

# S3 method for IFF.ILBM
plot(x, y, ...)

# S3 method for IFF.ANIM
plot(x, y, ...)

# S3 method for SysConfig
plot(x, y, ...)

# S3 method for AmigaIcon
plot(x, y, asp = 2, ...)

Arguments

x

An AmigaFFH object to be plotted. See usage section for supported object classes. If x is an AmigaBitmapFont() or AmigaBitmapFontSet() class object, it will plot the full bitmap that is used to extract the font glyphs.

y

When x is an AmigaIcon() class object, y can be used as an index. In that case, when y=1 the first icon image is shown. When y=2 the selected icon image is shown.

When x is an AmigaBitmapFontSet() class object, y can be used to plot the bitmap of a specific font height (y).

When x is an AmigaBasicShape() class object, y can be used to select a specific layer of the shape to plot, which can be one of "bitmap", "shadow" or "collision".

...

Parameters passed onto the generic graphics plotting routine.

When x is an AmigaBitmapFont() or an AmigaBitmapFontSet() object, '...' can also be used for arguments that need to be passed onto the as.raster() function.

asp

A numeric value indicating the aspect ratio for the plot. For many AmigaFFH, the aspect ratio will be based on the Amiga display mode when known. For AmigaIcon() objects a default aspect ratio of 2 is used (tall pixels).

When x is an AmigaBitmapFont() or AmigaBitmapFontSet() object, an aspect ratio of 1 is used by default. When the TALLDOT flag is set for that font, the aspect ratio s multiplied by 2. When the WIDEDOT flag is set, it will be divided by 2.

A custom aspect ratio can also be used and will override the ratios specified above.

Value

Returns NULL silently.

Details

A plotting routine is implemented for most AmigaFFH objects. See the usage section for all supported objects.

Author

Pepijn de Vries

Examples

if (FALSE) {
## load an IFF file
example.iff <- read.iff(system.file("ilbm8lores.iff", package = "AmigaFFH"))

## and plot it:
plot(example.iff)

## AmigaIcons can also be plotted:
plot(simpleAmigaIcon())

## As can the cursor from a SysConfig object:
plot(simpleSysConfig())

## As can Amiga fonts:
data(font_example)
plot(font_example)
plot(font_example, text = "foo bar", style = "underlined", interpolate = F)

## As can AmigaBasicShapes:
ball <- read.AmigaBasicShape(system.file("ball.shp", package = "AmigaFFH"))
plot(ball)
}