Hacking my way through
-
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. :)
Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix
-
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. :)
Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix
Pizza can fix a lot of things. So can a rubber duck. It seems like you should invest in one. :-D
Robust Services Core | Software Techniques for Lemmings | Articles
The fox knows many things, but the hedgehog knows one big thing. -
Pizza can fix a lot of things. So can a rubber duck. It seems like you should invest in one. :-D
Robust Services Core | Software Techniques for Lemmings | Articles
The fox knows many things, but the hedgehog knows one big thing.Greg Utas wrote:
So can a rubber duck.
Aye! :thumbsup: /ravi
My new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com
-
Pizza can fix a lot of things. So can a rubber duck. It seems like you should invest in one. :-D
Robust Services Core | Software Techniques for Lemmings | Articles
The fox knows many things, but the hedgehog knows one big thing.Greg Utas wrote:
So can a rubber duck. It seems like you should invest in one
Tired of hearing from me, eh? :laugh:
Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix
-
Greg Utas wrote:
So can a rubber duck. It seems like you should invest in one
Tired of hearing from me, eh? :laugh:
Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix
Ohhh! We're the rubber duck!
-
Ohhh! We're the rubber duck!
-
Greg Utas wrote:
So can a rubber duck. It seems like you should invest in one
Tired of hearing from me, eh? :laugh:
Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix
Nah. Your streams of consciousness are usually interesting. :-D But a duck interacts with you, so you wouldn't have to anticipate all the details that you must first explain!
Robust Services Core | Software Techniques for Lemmings | Articles
The fox knows many things, but the hedgehog knows one big thing.