Improve circle rendering and add antialiasing to rounded rect

This commit is contained in:
2025-04-29 03:30:33 -07:00
parent e81ff0be66
commit cbe54334ca
2 changed files with 40 additions and 21 deletions

View File

@@ -14,8 +14,8 @@ impl WlClient {
self.shm_pool = Some(shm::ShmPool::new(width, height, self.current_id)?);
self.shm_pool.as_mut().unwrap().write(&vec![0xffff0000; width * height], 0);
self.shm_pool.as_mut().unwrap().rectangle(50, 50, 50, 50, 0xff00ff00);
self.shm_pool.as_mut().unwrap().shitty_circle(200, 200, 20, 0xff0000ff);
self.shm_pool.as_mut().unwrap().rounded_rectangle(400, 200, 200, 100, 14, 0xffffff00);
self.shm_pool.as_mut().unwrap().circle(300, 300, 200, 0xff0000ff);
self.shm_pool.as_mut().unwrap().rounded_rectangle(450, 400, 60, 40, 16, 0xffffff00);
let object = self.shm_id.ok_or(UnsetErr("shm_id".to_string()))?;
const OPCODE: u16 = 0;