Comment on "For the More Curious: Core Graphics"


#1

Comment on the CoreGrpahics info that I feel is worth sharing…

The paragraph that discussed the drawRect: method and how AFTER that method is completed it is “MOVED” from a system layer to the screen layer in the Java Swing world is called ‘Double-Buffering’.

docs.oracle.com/javase/tutorial/ … lebuf.html

Basically your graphics code does NOT write directly to the screen. Doing so could cause flicker on lower end systems. You write to the buffer. When your rectangle has finished and all rectangles have drawn into the system ‘frame’ that buffer is then “copied” to a buffer that renders the entire view to the display.

Another item which I’m SURPRISED it was omitted. :frowning:

The iOS UI Kit uses ULO and the CoreGraphics (Mac OSX) uses LLO. For you pour souls who are as old as me OS/2 used LLO. :wink:

ULO means that 0,0 starts in the TOP (Upper) Left corner of the screen.
LLO means that 0,0 starts in the BOTTOM (Lower) Left corner of the screen.

Also worth pointing out is when you are ‘drawing’ it is relative to your CONTAINER and NOT the ‘main frame’ or view’.

Nothing more enjoyable than wasting time figuring out… your drawRect() code works great you just can’t see it. =)

Cheers,

Ed Tidwell
Charlotte, NC