Create utils.Rect struct for geometries
Also fixed a crash that I'm really not sure how I didn't have happen before during Output.create() Right now, only Window is updated to use Rect. I'll try updating all instances of x,y,width,height combo to use it.
This commit is contained in:
parent
5922107579
commit
5333b4cbe0
7 changed files with 141 additions and 129 deletions
|
|
@ -12,6 +12,13 @@ pub const RiverColor = struct {
|
|||
alpha: u32,
|
||||
};
|
||||
|
||||
pub const Rect = struct {
|
||||
width: u31,
|
||||
height: u31,
|
||||
x: i32,
|
||||
y: i32,
|
||||
};
|
||||
|
||||
/// Parse a color in the format 0xRRGGBB or 0xRRGGBBAA and convert it to
|
||||
/// 32-bit color values (used by Window.set_borders in rwm).
|
||||
pub fn parseRgba(s: []const u8) !RiverColor {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue