Screenshot
A class in Root.Township, Alta.Utilities.
Takes a photo through a hand camera into a texture and saves it as a PNG (Windows) or to the gallery (Android). Client only.
- Listed in Utilities and other Alta namespaces
Constructors
| Member | What it is |
|---|---|
Screenshot(HandCamera camera, int width = 1920, int height = 1080) | Creates a Screenshot from camera, width and height. |
Fields
Properties
| Member | What it is |
|---|---|
HandCamera Camera { get; } | The hand camera the photo is taken through. |
int Height { get; } | Photo height in pixels (1080 by default). |
bool IsTransparent { get; set; } | Meant to pick a transparent texture format, but the texture is made in the constructor, so setting it later has no effect. |
Texture2D LastPhoto { get; } | Texture holding the last photo taken. |
int Width { get; } | Photo width in pixels (1920 by default). |
string WindowsPath { get; } | Folder photos are saved to: the launcher's camera photos path, or a Screenshots folder in storage if that is empty or missing. |
Methods
| Member | What it is |
|---|---|
bool Take() | Renders the camera into a temporary texture, reads it into LastPhoto and saves it. A blocked camera reads its current texture and skips saving. |
5 private and internal methods
Used in
Members of other types that take, return or hold a Screenshot: