Crate gfx_types

Crate gfx_types 

Source
Expand description

§GFX Types - Core Graphics Types for RedstoneOS

Esta biblioteca define os tipos gráficos fundamentais compartilhados entre:

  • Kernel (Forge): Driver de display, syscalls de framebuffer
  • Compositor (Firefly): Window management, composição
  • SDK (Redpowder): API de alto nível para aplicações

§Módulos

MóduloDescrição
geometryPrimitivas geométricas (Point, Size, Rect, etc.)
colorSistema de cores e formatos de pixel
bufferBuffers de pixels e descritores
displayInformações de display e output
windowFlags e tipos de janela
damageDamage tracking para composição
renderComandos e operações de renderização
inputTipos de cursor e input
textTipografia básica

§Exemplo

use gfx_types::prelude::*;

let rect = Rect::new(10, 20, 100, 50);
let color = Color::rgb(255, 128, 0);
let point = Point::new(50, 30);

assert!(rect.contains_point(point));

Re-exports§

pub use geometry::Circle;
pub use geometry::Ellipse;
pub use geometry::Insets;
pub use geometry::Line;
pub use geometry::LineF;
pub use geometry::Point;
pub use geometry::PointF;
pub use geometry::Rect;
pub use geometry::RectF;
pub use geometry::RoundedRect;
pub use geometry::Size;
pub use geometry::SizeF;
pub use geometry::Transform2D;
pub use color::AlphaMode;
pub use color::BlendMode;
pub use color::Color;
pub use color::ColorF;
pub use color::PixelFormat;
pub use buffer::BufferDescriptor;
pub use buffer::BufferHandle;
pub use buffer::BufferRegion;
pub use buffer::BufferUsage;
pub use display::DisplayInfo;
pub use display::DisplayMode;
pub use display::VsyncMode;
pub use window::LayerType;
pub use window::WindowEffects;
pub use window::WindowFlags;
pub use window::WindowState;
pub use window::WindowType;
pub use damage::DamageRegion;
pub use input::CursorHotspot;
pub use input::CursorType;
pub use text::FontStyle;
pub use text::FontWeight;
pub use text::GlyphId;
pub use text::GlyphMetrics;
pub use text::TextAlign;
pub use text::TextBaseline;

Modules§

buffer
Buffer Module
color
Color Module
damage
Damage Module
display
Display Module
geometry
Geometry Module
input
Input Module
prelude
Prelude contendo os tipos mais usados.
render
Render Module
text
Text Module
window
Window Module