Size (src/lib.rs)

photocraft · crates/geom/src/lib.rs · rust · Apache-2.0
files

! Geometry primitives shared by every PhotoCraft crate. ! ! Document space is integer pixels with the origin at the canvas top-left. ! Layers may extend beyond the canvas (negative coordinates are valid). ![forbid(unsafe_code)] ![deny(clippy::unwrap_used, clippy::expect_used, cli

// Source: https://github.com/storytold/photocraft | License: Apache-2.0 | Copyright 2026 ArtCraft Team and the PhotoCraft contributors
// Provided via justclaw.it.com; keep this notice with the code.
//! Geometry primitives shared by every PhotoCraft crate.
//!
//! Document space is integer pixels with the origin at the canvas top-left.
//! Layers may extend beyond the canvas (negative coordinates are valid).
#![forbid(unsafe_code)]
#![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic, clippy::unimplemented, clippy::todo, clippy::unreachable)]

use serde::{Deserialize, Serialize};

pub mod warp;

/// Edge length of a raster tile in pixels.
pub const TILE_SIZE: i32 = 256;

#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub struct Size {
    p

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key