Click here to Skip to main content
15,889,034 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.

 
GeneralRe: I never liked writing graphics libraries Pin
W Balboos, GHB11-Mar-21 8:12
W Balboos, GHB11-Mar-21 8:12 
GeneralRe: I never liked writing graphics libraries Pin
Rick York11-Mar-21 11:00
mveRick York11-Mar-21 11:00 
GeneralRe: I never liked writing graphics libraries Pin
honey the codewitch12-Mar-21 3:38
mvahoney the codewitch12-Mar-21 3:38 
GeneralRe: I never liked writing graphics libraries Pin
Rick York12-Mar-21 6:15
mveRick York12-Mar-21 6:15 
GeneralRe: I never liked writing graphics libraries Pin
honey the codewitch12-Mar-21 8:22
mvahoney the codewitch12-Mar-21 8:22 
GeneralRe: I never liked writing graphics libraries Pin
Daniel Pfeffer11-Mar-21 22:21
professionalDaniel Pfeffer11-Mar-21 22:21 
GeneralRe: I never liked writing graphics libraries Pin
honey the codewitch12-Mar-21 3:29
mvahoney the codewitch12-Mar-21 3:29 
GeneralRe: I never liked writing graphics libraries Pin
Gary R. Wheeler12-Mar-21 10:35
Gary R. Wheeler12-Mar-21 10:35 
honey the codewitch wrote:
I love coding for these little things because you're so close to the metal, but when you want to go your own way with something, because existing offerings are too heavy or limited, you have to start over from scratch.
Something about cake and eating it too comes to mind Big Grin | :-D .

I've implemented a couple graphics libraries in my time. Instead of run-time polymorphism, try build-time polymorphism. Instead of a device 'driver' that has to be all things to all people, have a device-specific bottom layer with an interface that's sufficiently generic for the graphics library's purposes, but no more than that. This device layer provides only essential primitives: line drawing, curve drawing if you need it, region fills, essentially only the device coordinate primitives you might want. A lot of Bresenham's algorithms are useful here. I've not implemented significant text capabilities, but there are primitive operations for that the device layer can provide (draw a block of pixels, for example). Since footprint is a concern, the device layer should be granular in a way that lets the linker prune parts that aren't used.

Needless to say, K.I.S.S. should be your guide here.
Software Zen: delete this;

GeneralRe: I never liked writing graphics libraries Pin
honey the codewitch12-Mar-21 10:46
mvahoney the codewitch12-Mar-21 10:46 
GeneralStart baking a pie Pin
Cp-Coder11-Mar-21 4:54
Cp-Coder11-Mar-21 4:54 
GeneralRe: Start baking a pie Pin
OriginalGriff11-Mar-21 5:15
mveOriginalGriff11-Mar-21 5:15 
GeneralRe: Start baking a pie Pin
Cp-Coder11-Mar-21 5:29
Cp-Coder11-Mar-21 5:29 
GeneralRe: Start baking a pie Pin
OriginalGriff11-Mar-21 5:46
mveOriginalGriff11-Mar-21 5:46 
GeneralRe: Start baking a pie Pin
DRHuff11-Mar-21 6:51
DRHuff11-Mar-21 6:51 
GeneralRe: Start baking a pie Pin
theoldfool11-Mar-21 5:57
professionaltheoldfool11-Mar-21 5:57 
GeneralRe: Start baking a pie Pin
W Balboos, GHB11-Mar-21 6:22
W Balboos, GHB11-Mar-21 6:22 
GeneralRe: Start baking a pie Pin
DRHuff11-Mar-21 6:49
DRHuff11-Mar-21 6:49 
GeneralRe: Start baking a pie Pin
Richard MacCutchan11-Mar-21 6:25
mveRichard MacCutchan11-Mar-21 6:25 
JokeRe: Start baking a pie Pin
PIEBALDconsult11-Mar-21 5:15
mvePIEBALDconsult11-Mar-21 5:15 
GeneralRe: Start baking a pie Pin
OriginalGriff11-Mar-21 5:47
mveOriginalGriff11-Mar-21 5:47 
GeneralRe: Start baking a pie Pin
Eddy Vluggen11-Mar-21 6:29
professionalEddy Vluggen11-Mar-21 6:29 
GeneralRe: Start baking a pie Pin
Sander Rossel11-Mar-21 8:44
professionalSander Rossel11-Mar-21 8:44 
GeneralRe: Start baking a pie Pin
jeron111-Mar-21 9:40
jeron111-Mar-21 9:40 
GeneralRe: Start baking a pie Pin
Sander Rossel11-Mar-21 20:49
professionalSander Rossel11-Mar-21 20:49 
GeneralRe: Start baking a pie Pin
jeron112-Mar-21 5:45
jeron112-Mar-21 5:45 

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.