Core AnimationAboutQuartz2DIs the content to be introduced in this article, mainly throughQuartz2DTo learn how to develop a graph for IOS.Quartz2DTo see the details.
1. Quartz2D is a lightweight 2D rendering engine at the underlying layer. It supports iOS and Mac OS and multiple devices.
2. Supports creating, displaying, and parsing layers, Vector Plotting, color management, reverse samples, and PDF.
3. Painter Model: paint to canvas, called page. Objects drawn on the canvas cannot be changed except when they are overwritten by other objects.
4. Graphics Context: draws the Context, including drawing parameters and device settings.
Bitmap Context: draws RGB, CMYK, or grayscale images.
PDF Context: Draw a PDF file. Multiple pages, automatic identification of different devices, resolution unchanged.
Windows Context: draws a window.
Layer Context: draws objects offline.
PostScript Graphic Context: print.
5. Quartz2D object type:
Path: Specifies the Path object for Vector Plotting.
Image: a bitmap object.
Layer: draws a Layer Object Offline.
Pattern: draws a template object.
Shading/Gradient: draws a special effect object.
Function: callback Function object, used to draw special effects.
Color/Color Space: Color and Color Space objects.
Image Source/Destination: the object to which Image data is moved.
Font: Text object.
PDF dictionary/Object/page/data stream/array object.
PDF content/browsing object.
Post Script object for printing.
6. Drawing status: Stack management is used. When Context is created, the State is empty. Call CGContextSaveGState to execute the push State operation. CGContextRestoreGState calls the pop State operation. States include:
1) current transformation matrix CTM
2) Crop range
3) Line Style: width, connection, Line header, Dot, Angle
4) curve drawing settings
5) Anti-sample settings
6) Fill mode and stroke mode
7) translucent Mode
8) Draw intent
Text: font, size, spacing, Mode
Hybrid mode
7. Coordinate System: the lower left is the origin, and the upper right is the destination. Opposite to UIKit. Test Based on different context and operating system)
8. Memory Management: Ref-counted.
The create/copy object must hold a refcount and release.
Use corresponding functions to manage corresponding objects.
Summary: DetailsCore AnimationAboutQuartz2DI hope this article will help you!