Core Graphics, Chapter 1. The Oracle Method for Drawing
A bitmap as an answer key, and the byte that would not round.
A bitmap as an answer key, and the byte that would not round.
You will be able to describe a bitmap as nothing more than a long block of bytes with a few numbers that say how to read it.
You will be able to say what premultiplied alpha is, in words a child could follow, and compute the stored byte for any color byte and alpha byte, exactly, by hand.
A shape is a list of five kinds of step, and the rules for walking it.
Four points, a handful of straight pieces, and the match that got worse when the cut got finer.
Why an edge pixel has the value it has, and how the context decides what is inside.
You will be able to say, for a line of any width at any position, which pixel rows it lights and with what bytes, and work the answer out by hand.
You will be able to read the six numbers of a transform as three arrows on a sheet of graph paper, and say, for any list of translate, scale and rotate calls, which order they happen in and which six numbers they leave behind.
You will be able to say what a clip is, as a byte for every pixel, and work out the edge pixel of a rectangle clip, of a fill, and of the two together, by hand, to the last byte.
You will be able to say what a gradient is, in words a child could follow: some colors pinned at some places, and a rule for the color in between.
You will be able to say what a blend mode is: for the twelve separable modes, a function of the source pixel and the backdrop pixel, on premultiplied bytes, with one piece that depends on the mode and two that do not.
You will be able to say how drawing an image into a rectangle becomes one question per destination pixel: where in the picture is the center of this pixel, and what color is there.
A rectangle, a stroke, a curve, a gradient and a shadow, written three ways, and a playbook for the whole book.
A line of text as an answer key, and the last digit that two ways of adding disagreed about.
How long is a string, and what is it that a caret sees?
You will be able to say what a font file is: a short directory followed by tables, each found by a four letter tag, an offset and a length.
A glyph is a number that only one font understands, and the map from characters to those numbers has a few surprises.
How wide a glyph is, how a pair of glyphs pulls together, and how space is added on top.
You will be able to say what shaping is: a list of glyph numbers goes in, a rule book written inside the font is applied, and a list of glyph numbers comes out.
Where each character stands when one line holds text that reads in both directions, and how to prove it.
Where a line of text may end, where it does end, and whether that is the best place to end it.
How a framesetter stacks lines of text, where each baseline falls, and why the numbers a font reports are only the start.
Where the leftover room on a line goes, and how to prove it.
What happens between a glyph number and a pixel: the outline in the font, the curves cut into straight pieces, the fill, and the switches that move the result.
Who draws a character the font does not have, what a weight slider does to the width of a letter, and what a line does when its text carries more than one font.
One line of mixed text through every stage, a playbook of symptoms, and the honest edge of what this book measured.
A blur as an answer key, and the extra room that a filter asks for.
You will be able to say what a Core Image picture really is: not a grid of pixels, but a recipe that says how to make them.
You will be able to say what a context is, and what a render of a rectangle writes: floats, half floats or bytes, row by row.
You will be able to explain the region of interest to a child, say what that rectangle is for a color operation and for a blur, and trace it by hand through a small graph.
You will be able to explain a color kernel to a child: a small machine that takes one pixel in and gives one pixel out, with no memory of its neighbors.
You will be able to say what a transfer function is, in words a child could follow, and compute the sRGB pair by hand in both directions.
You will be able to say what compositing is: two images in, one image out, with a rule that works on four premultiplied numbers per pixel.
You will be able to explain a neighborhood filter to a child: every output pixel is a weighted sum of a small window of input pixels.
You will be able to explain resampling to a child: every pixel of the new picture asks where in the old picture it comes from, and the answer is a position that usually falls between pixels.
You will be able to explain a generator to a child: a machine with dials and no slot for a picture, which is really a rule that gives a color for every place.
You will be able to explain a reduction to a child: many pixels go in, a few come out, and the few have a fixed place and a fixed meaning.
You will be able to explain a warp to a child: for each pixel of the output, a rule says which point of the input to read, and a reader mixes the four nearest input pixels.
One graph through every stage, a playbook of symptoms, and the honest edge of what this book measured.
A paused clock as an answer key, and the microsecond an animation never reaches.
A rectangle that is never stored, and a layer with no height whose frame is a square.
A matrix read from the right, a camera that bends one order and not the other, and a round trip that misses by three points.
Two trees, one of which has already moved before a frame is drawn.
Eight numbers, one fraction, and the microsecond that is never read.
A list of values, the times they are reached, and five rules for what happens in between.
A mass on a spring, the time it takes to settle, and an animation whose parameters do not describe it.
Every layer has a clock, every group is a clock, and the recipe for pausing is a conversion.
Where a picture lands in a layer, and the half texel that is not a crop.
One layer is painted in a fixed order, cut once, faded once, and every edge is a ramp of distance, not a count of area.
One ruler laid along the whole path, and a gradient between two reds that comes back with green in it.
Six layers that are not plain layers, and the number each of them owes you.
A playbook for debugging animation, one draw-on stroke taken apart with the clock, the ruler and the witnesses, and the honest edge of what this book measured.
Studying a black box, and counting the invisible.
You will be able to say, in one sentence, what a view is and what it is not.
You will be able to say what a cell is, and the difference between a cell you set from outside and a cell that is computed.
You will be able to explain why a change is announced in two steps, a cheap warning first and a careful check later, and why the warning is allowed to be wrong in one direction only.
First, you will be able to explain where state actually lives, given that the view that declares it is thrown away and rebuilt all the time.
First, you will be able to explain the environment as a dictionary of values attached to a place in the tree, say what a key with a default is, and say which setter wins when two of them disagree.
First, you will be able to say the three steps of the conversation in your own words: the parent proposes a size, the child chooses its own size, and the parent places the child.
First, you will be able to say in plain words what the model says a stack does when it is offered some space, step by step, using only the words first, second, third and so on.
First, you will be able to say why a text has no single size, hand trace how the book's model fills lines with words, and say what a text reports when it is offered too little height.
What a Core Animation layer is, why ten labels are eleven of them, and what happens when you move, fade or change something.
You will be able to say, in plain words, what changes at once when you animate, and what changes over time.
First, you will be able to explain, in plain words, where a spring's overshoot comes from, using a weight, a spring and a pot of honey, and you will be able to write down the one equation that governs it.
First, you will be able to state a seven step order of questions, and say for each step which chapter of this book holds the rules that answer it.
All five books for $210. Save $139.95 against buying them one at a time. With all five audiobooks, $289.
The three books for $160. Save $49.97 against buying them one at a time. With the audiobooks, $219.
Both books for $110. Save $29.98 against buying them one at a time. With both audiobooks, $149.
Where a path becomes pixels. 13 chapters. $69.99, with the audiobook $94.98. Also in Pixels and the Complete Collection.
How a string becomes lines. 13 chapters. $69.99, with the audiobook $94.98. Also in Pixels and the Complete Collection.
Why a filter graph is a recipe and not a bitmap. 13 chapters. $69.99, with the audiobook $94.98. Also in Pixels and the Complete Collection.
Stop the clock, and see the tree. 13 chapters. $69.99, with the audiobook $94.98. Also in Motion and UI and the Complete Collection.
The graph above the layers. 13 chapters. $69.99, with the audiobook $94.98. Also in Motion and UI and the Complete Collection.
Up to 5 readers at one organization. One book $174.98, Pixels $400, Motion and UI $275, Complete $525.
Up to 10 readers at one organization. One book $279.96, Pixels $640, Motion and UI $440, Complete $840.
Up to 50 readers at one organization. One book $699.90, Pixels $1,600, Motion and UI $1,100, Complete $2,100.