rasterToAmigaBasicShape | R Documentation |
Convert a raster()
object into an AmigaBasicShape()
class object.
rasterToAmigaBasicShape(
x,
type = c("blitter object", "sprite"),
palette,
shadow,
collision,
...
)
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 |
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.
Returns an AmigaBasicShape()
class object based on x
.
Pepijn de Vries
Other AmigaBasicShape.operations:
AmigaBasicShape
,
read.AmigaBasicShape()
,
write.AmigaBasicShape()
Other raster.operations:
AmigaBitmapFont
,
as.raster.AmigaBasicShape()
,
bitmapToRaster()
,
dither()
,
index.colours()
,
rasterToAmigaBitmapFont()
,
rasterToBitmap()
,
rasterToHWSprite()
,
rasterToIFF()
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.