Click here to Skip to main content
16,016,770 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralWordle 1,206 Pin
GKP199237mins ago
professionalGKP199237mins ago 
GeneralHacking my way through Pin
honey the codewitch5hrs 23mins ago
mvahoney the codewitch5hrs 23mins ago 
So I ran into a bit of a conundrum.

Because of the way my user interface library works, it might draw half your control to a bitmap send that bitmap to the screen, and then repeat the process with the other half.

A canvas is bound to a bitmap, and while I can change the bounds after the canvas is created, it will try to write to areas where the bitmap isn't present. When using callbacks, this is simply a performance issue. When using directing binding to the bitmap, this is an access violation.

One option is to create a new canvas the size of the bitmap in UIX (my user interface lib) every time i refresh that control on the screen, but there are so many problems with this, starting with the size of that backing bitmap being an implementation detail, and that's not counting the performance issue of creating and destroying canvases all the time, when I should just be able to rebind it to a new bitmap.

And the performance issue I mentioned in passing above is a real problem in UIX's case because maybe half the control will be drawn at once and the callbacks will be fired for ALL of it, half of it in vain as they get clipped from the final output.

What I needed was a way to clip the drawing in my vector library, such that I could specify a clipping rectangle that perfectly overlays the backing bitmap. If I do that, the rasterizer never has to touch those "out of bounds" areas, saving time and potentially crashes.

Well, I'm halfway there, but a bit overwhelmed and sort of procrastinating the rest of it.

There's something I want to do after I complete this portion - and that is I want to support direct binds to an RGB565 bitmap. However, it gets a bit weird because there's no alpha channel in that color model. Currently I can only bind directly to an RGBA8888 bitmap, which isn't very practical on embedded in most situations. Situations where I can't bind directly use callbacks to do the final pixel reads/writes.

I'm excited about that part. I want the challenge, but I'm stuck with the clipping problem first.

Pizza incoming. That should fix it. Smile | :)
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix

GeneralRe: Hacking my way through Pin
Greg Utas3hrs 27mins ago
professionalGreg Utas3hrs 27mins ago 
GeneralRe: Hacking my way through Pin
Ravi Bhavnani1 hr 20mins ago
professionalRavi Bhavnani1 hr 20mins ago 
GeneralRe: Hacking my way through Pin
honey the codewitch8mins ago
mvahoney the codewitch8mins ago 
GeneralNo CCC from me on Monday Pin
Pete O'Hanlon7hrs 39mins ago
mvePete O'Hanlon7hrs 39mins ago 
GeneralRe: No CCC from me on Monday Pin
Peter_in_27806hrs 32mins ago
professionalPeter_in_27806hrs 32mins ago 
GeneralI decided to support TinyVG after all Pin
honey the codewitch5-Oct-24 16:14
mvahoney the codewitch5-Oct-24 16:14 
GeneralRe: I decided to support TinyVG after all Pin
PIEBALDconsult5-Oct-24 18:11
mvePIEBALDconsult5-Oct-24 18:11 
GeneralRe: I decided to support TinyVG after all Pin
pkfox16hrs 24mins ago
professionalpkfox16hrs 24mins ago 
GeneralRe: I decided to support TinyVG after all Pin
k505412hrs 19mins ago
mvek505412hrs 19mins ago 
GeneralWordle 1,205 Pin
StarNamer@work5-Oct-24 14:00
professionalStarNamer@work5-Oct-24 14:00 
GeneralRe: Wordle 1,205 Pin
OriginalGriff21hrs 44mins ago
mveOriginalGriff21hrs 44mins ago 
GeneralRe: Wordle 1,205 Pin
PJ Arends21hrs 16mins ago
professionalPJ Arends21hrs 16mins ago 
GeneralRe: Wordle 1,205 - 6 4 me Pin
pkfox21hrs 13mins ago
professionalpkfox21hrs 13mins ago 
GeneralRe: Wordle 1,205 - 6 4 me Pin
Rich Leyshon19hrs ago
Rich Leyshon19hrs ago 
GeneralRe: Wordle 1,205 Pin
Cp-Coder15hrs 29mins ago
Cp-Coder15hrs 29mins ago 
GeneralOh, yeah, that was why... Pin
PIEBALDconsult5-Oct-24 8:11
mvePIEBALDconsult5-Oct-24 8:11 
GeneralRe: Oh, yeah, that was why... Pin
Mircea Neacsu5-Oct-24 10:54
Mircea Neacsu5-Oct-24 10:54 
GeneralRe: Oh, yeah, that was why... Pin
PIEBALDconsult5-Oct-24 11:02
mvePIEBALDconsult5-Oct-24 11:02 
GeneralRe: Oh, yeah, that was why... Pin
Mircea Neacsu5-Oct-24 11:24
Mircea Neacsu5-Oct-24 11:24 
GeneralRe: Oh, yeah, that was why... Pin
Jeremy Falcon5-Oct-24 15:02
professionalJeremy Falcon5-Oct-24 15:02 
GeneralRe: Oh, yeah, that was why... Pin
honey the codewitch5-Oct-24 13:51
mvahoney the codewitch5-Oct-24 13:51 
GeneralRe: Oh, yeah, that was why... Pin
PIEBALDconsult5-Oct-24 14:15
mvePIEBALDconsult5-Oct-24 14:15 
GeneralRe: Oh, yeah, that was why... Pin
honey the codewitch5-Oct-24 14:17
mvahoney the codewitch5-Oct-24 14:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.