- sdl_texture ->initialise: from=[image
|size|graphical] - Create with a copy of the pixels of an image or, given a size, with
transparent pixels. Given a graphical, the texture is as large as its
bounding box, including room for, e
.g., a
glow, and holds the graphical drawn with Cairo. If the origin of the
graphical, the point (0,0) of its coordinates, is on the texture, it
becomes
sdl_texture<-hot_spot:
a figure drawn around its origin thus becomes a sprite that rotates
around that point. Without an argument the texture has no pixels until, e.g.,
a camera delivers a frame.
- sdl_texture ->image: image
- Replace the pixels by a copy of those of the image. The size changes to
the size of the image.
- sdl_texture ->draw_in: graphical,
at=[point]
- Paint the graphical onto the pixels using Cairo, at the given position
or else at its own position. As image
->draw_in.
Pixels in another format than ARGB, such as a camera frame, are first
converted to ARGB. The texture is shown again where it is displayed.
- sdl_texture ->changed:
- Show the pixels again wherever the texture is displayed. This is done by
the methods that change the pixels.