Struct orbclient::Window
[−]
[src]
pub struct Window { /* fields omitted */ }A window
Methods
impl Window[src]
fn new(x: i32, y: i32, w: u32, h: u32, title: &str) -> Option<Self>[src]
Create a new window
fn new_flags(
x: i32,
y: i32,
w: u32,
h: u32,
title: &str,
flags: &[WindowFlag]
) -> Option<Self>[src]
x: i32,
y: i32,
w: u32,
h: u32,
title: &str,
flags: &[WindowFlag]
) -> Option<Self>
Create a new window with flags
fn sync_path(&mut self)[src]
fn x(&self) -> i32[src]
Get x
fn y(&self) -> i32[src]
Get y
fn title(&self) -> String[src]
Get title
fn set_pos(&mut self, x: i32, y: i32)[src]
fn set_size(&mut self, width: u32, height: u32)[src]
fn set_title(&mut self, title: &str)[src]
Set title
fn events(&mut self) -> EventIter[src]
Blocking iterator over events
Trait Implementations
impl Renderer for Window[src]
fn width(&self) -> u32[src]
Get width
fn height(&self) -> u32[src]
Get height
fn data(&self) -> &[Color][src]
Access pixel buffer
fn data_mut(&mut self) -> &mut [Color][src]
Access pixel buffer mutably
fn sync(&mut self) -> bool[src]
Flip the window buffer
fn pixel(&mut self, x: i32, y: i32, color: Color)[src]
Draw a pixel
fn arc(&mut self, x0: i32, y0: i32, radius: i32, parts: u8, color: Color)[src]
Draw a piece of an arc. Negative radius will fill in the inside
fn circle(&mut self, x0: i32, y0: i32, radius: i32, color: Color)[src]
Draw a circle. Negative radius will fill in the inside
fn line4points(&mut self, x0: i32, y0: i32, x: i32, y: i32, color: Color)[src]
fn line(&mut self, argx1: i32, argy1: i32, argx2: i32, argy2: i32, color: Color)[src]
Draw a line
fn lines(&mut self, points: &[[i32; 2]], color: Color)[src]
fn draw_path_stroke(&mut self, graphicspath: GraphicsPath, color: Color)[src]
Draw a path (GraphicsPath)
fn char(&mut self, x: i32, y: i32, c: char, color: Color)[src]
Draw a character, using the loaded font
fn set(&mut self, color: Color)[src]
Set entire window to a color
fn clear(&mut self)[src]
Sets the whole window to black
fn rect(&mut self, x: i32, y: i32, w: u32, h: u32, color: Color)[src]
Draw rectangle
fn image(&mut self, start_x: i32, start_y: i32, w: u32, h: u32, data: &[Color])[src]
Display an image
fn linear_gradient(
&mut self,
rect_x: i32,
rect_y: i32,
rect_width: u32,
rect_height: u32,
start_x: i32,
start_y: i32,
end_x: i32,
end_y: i32,
start_color: Color,
end_color: Color
)[src]
&mut self,
rect_x: i32,
rect_y: i32,
rect_width: u32,
rect_height: u32,
start_x: i32,
start_y: i32,
end_x: i32,
end_y: i32,
start_color: Color,
end_color: Color
)
Draw a linear gradient in a rectangular region
fn rounded_rect(
&mut self,
x: i32,
y: i32,
w: u32,
h: u32,
radius: u32,
filled: bool,
color: Color
)[src]
&mut self,
x: i32,
y: i32,
w: u32,
h: u32,
radius: u32,
filled: bool,
color: Color
)
Draw a rect with rounded corners