[−][src]Module breadx::tutorials::drawing
Last time
, we discussed how to create and use colors in breadx
. Today, we'll
use these colors to draw shapes on our window.
The Graphics Context
Drawing is done using the Gcontext
object. Creating one is
relatively simple:
use breadx::{GcParameters, rgb}; let props = GcParameters { foreground: Some(rgb(std::u8::MAX, 0, 0)), ..Default::default() }; let gc = conn.create_gc(window, props)?;
The Expose Event
TODO: the rest of this