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 anAmigaBitmapFont()
orAmigaBitmapFontSet()
class object, it will plot the full bitmap that is used to extract the font glyphs.- y
When
x
is anAmigaIcon()
class object,y
can be used as an index. In that case, wheny=1
the first icon image is shown. Wheny=2
the selected icon image is shown.When
x
is anAmigaBitmapFontSet()
class object,y
can be used to plot the bitmap of a specific font height (y
).When
x
is anAmigaBasicShape()
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 anAmigaBitmapFont()
or anAmigaBitmapFontSet()
object, '...
' can also be used for arguments that need to be passed onto theas.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. ForAmigaIcon()
objects a default aspect ratio of2
is used (tall pixels).When
x
is anAmigaBitmapFont()
orAmigaBitmapFontSet()
object, an aspect ratio of 1 is used by default. When theTALLDOT
flag is set for that font, the aspect ratio s multiplied by 2. When theWIDEDOT
flag is set, it will be divided by 2.A custom aspect ratio can also be used and will override the ratios specified above.
Details
A plotting routine is implemented for most AmigaFFH objects. See the usage section for all supported objects.
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)
}