zoukankan      html  css  js  c++  java
  • CoreGraphics --- 翻转坐标系

    1. 由于CoreGraphics 的坐标系与手机屏幕坐标系的Y轴是相反的, 所以在我们开发的时候, 需要翻转坐标系;

    - (void)drawRect:(CGRect)rect
    {
        CGContextRef context = UIGraphicsGetCurrentContext();
        CGContextTranslateCTM(context, 0, self.height);
        CGContextTranslateCTM(context, 1.0f, -1.0f);
        [self.viewToMagnify.layer renderInContext:context];
    }
  • 相关阅读:
    11
    TSP-test
    TSP-SA_TSP
    TSP-PathLength
    TSP-OutputPath
    TSP-NewAnswer
    TSP-
    TSp-dsxy2figxy
    TSP-DrawPath
    TSP-Distanse
  • 原文地址:https://www.cnblogs.com/guangleijia/p/5086452.html
Copyright © 2011-2022 走看看