rasterToAmigaBasicShape {AmigaFFH} | R Documentation |
Convert a grDevices raster object into an AmigaBasicShape class object.
Description
Convert a raster()
object into an AmigaBasicShape()
class object.
Usage
rasterToAmigaBasicShape(
x,
type = c("blitter object", "sprite"),
palette,
shadow,
collision,
...
)
Arguments
x |
A |
type |
A |
palette |
A |
shadow |
An optional layer that could be stored with the graphics. This layer could be used for specific
shadow effects when blitting the graphics to the screen. It needs to be a |
collision |
An optional layer that could be stored with the graphics. This layer could be used for collision
detection between graphical objects. It needs to be a |
... |
Arguments passed onto |
Details
This method can be used to turn any graphics into an AmigaBasicShape()
class object. In order to do
so, the colours of the input image (a raster()
object) will be quantized to a
limited palette. This palette can be forced as an argument to this function. Otherwise, it will be based on
the input image.
Value
Returns an AmigaBasicShape()
class object based on x
.
Author(s)
Pepijn de Vries
See Also
Other AmigaBasicShape.operations:
AmigaBasicShape
,
read.AmigaBasicShape()
,
write.AmigaBasicShape()
Other raster.operations:
AmigaBitmapFont
,
as.raster.AmigaBasicShape()
,
bitmapToRaster()
,
dither()
,
index.colours()
,
rasterToAmigaBitmapFont()
,
rasterToBitmap()
,
rasterToHWSprite()
,
rasterToIFF()
Examples
## Not run:
## get a raster image:
ilbm <- as.raster(read.iff(system.file("ilbm8lores.iff", package = "AmigaFFH")))
## convert to an Amiga Basic blitter object:
bob <- rasterToAmigaBasicShape(ilbm, "blitter object")
## End(Not run)