feat: put_pixel #9
No reviewers
Labels
No Label
Kind/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority/Critical
Priority/High
Priority/Low
Priority/Medium
Reviewed/Confirmed
Reviewed/Duplicate
Reviewed/Invalid
Reviewed/Won't Fix
Status/Abandoned
Status/Blocked
Status/Need More Info
Type/DLL
Type/High API
Type/Modules
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Rust/Core#9
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "kohsine/Core:feature/put_pixel"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Mini PR to help out my GSoC app a bit and just for funsies.
You have a lot of unused imports and button handler. Also, Kolibri's API supports rectangle drawing: #13
Strange, my rust-analyzer isn't warning me about unused imports. Also didn't know there was a rectangle API. Guess drawing a line would be redundant too then. Would a circle be better then? Or remove the example entirely?
The rectangle API can't invert colors though. My example does show the color inversion working.
Oh, I see. Then can you replace L42-L46 with rectangle drawing? It'll be cool
@ -39,6 +39,12 @@ pub fn define_window(start: Dot, size: Size, params: WindowParams<'_>) {
}
}
pub fn put_pixel(pos: Dot, color: Option<Color>, invert: Option<bool>) {
And
invert
's type better to replace with just bool, 'cuz anyway there are 2 options:None
orSome(true)
Hm, there are two another options: draw a pixel with given color or invert, so better do inversion if
color
is nullYa I like this
Ok let me write a better example. I admit the square example was kind of low effort. I'm thinking a wall of text and a button to invert the colors to show off a kind of basic dark mode.