On iOS, why do we have to create a layer using an existing Graphics Context?

71 views Asked by At

Possible Duplicate:
On iOS, after we create a layer from context and get the layer's context, how do these contexts relate to each other?

On iOS, we could do a CGLayerCreateWithContext using the existing Graphics Context, and we would get a CGLayer, and we can also get the Graphics Context of this CGLayer using CGLayerGetContext.

Why do we have to create this CGLayer using an existing Graphics Context? Can't we just create it without the presence of any Graphics Context? And when we get the Graphics Context of this layer, how is it related to the original Graphics Context? Couldn't they be just two separate, independent Graphics Contexts?

0

There are 0 answers