What's the difference between quartz core, core graphics and quartz 2D?

Source: Internet
Author: User

Reference

[1] http://stackoverflow.com/questions/1877987/whats-the-difference-between-quartz-core-core-graphics-and-quartz-2d


Quartz 2D is part of core graphic. quartz is a set of functions, data types, and objects. It is designed to directly draw views or images in memory.

The quartz 2D API is part of the core graphics framework, so you may see quartz referred to as core graphics
Or, simply, CG.

Quartz core is an interface for processing animation core animation, images, and videos.

This collection
Of documents provides the API reference for the quartz core framework, which supports image processing and video image manipulation.

The default coordinate origin of quartz is in the lower left corner, which is different from that of uiview and uiwindow (in the upper left corner. Although the coordinate system used by quartz does not use the upper left corner as the origin, this is not a problem for many quartz calls. In the call viewdrawRect:Before using this method, uikit automatically configures the plotting environment to make the upper-left corner the origin of the coordinate system. The quartz call in this environment can be correctly traced in the view. The only scenario where you need to consider the differences between different coordinate systems is when you create an environment for Plotting through quartz.


Important:Because the lower-left origin is used for plotting in the bitmap or PDF context, the coordinate system must be compensated when the plotting result is rendered to the view. In other words, if you create an image and callCGContextDrawImageFunction, the image is reversed by default. To correct this problem, you must flip the Y axis of the CTM (multiply this value-1) To move its origin point from the lower left corner to the upper left corner of the view.

If you useUIImageObject To encapsulateCGImageRefType, you do not need to modify the CTM.UIImageThe object will automaticallyCGImageRefType Coordinate System for flip compensation.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.