pygfx.objects.Image
- class pygfx.objects.Image(geometry: Geometry | None = None, material: Material | None = None, *, visible: bool = True, render_order: float = 0, name: str = '')
Bases:
WorldObjectA 2D image.
The geometry for this object consists only of
geometry.grid: a texture with the 2D data.If no colormap is applied to the material, the data are interpreted as colors in sRGB space. To use physical space instead, set the texture’s colorspace property to
"physical".The picking info of an Image (the result of
renderer.get_pick_info()) will for most materials includeindex(tuple of 2 int), andpixel_coord(tuple of float subpixel coordinates, zero at the center of the pixel and 0.5 at the edge).- Parameters:
geometry (Geometry) – The data defining the shape of the object. Must contain at least a “grid” attribute for a 2D texture.
material (Material) – The data defining the appearance of the object.
visible (bool) – Whether the object is visible.
render_order (int) – Affects the order in which objects are rendered.
position (Vector) – The position of the object in the world. Default (0, 0, 0).