zoukankan      html  css  js  c++  java
  • 画椭圆型

     

     

                   let testRad = circleRadius * 40
    
    //                let clip : UIBezierPath = UIBezierPath(arcCenter: pt, radius:
    
    //                    CGFloat(testRad), startAngle: 0, endAngle: 180, clockwise: true)
    
    //                
    
    //                clip.addLineToPoint(pt)
    
    //                clip.closePath()
    
    //                clip.addClip()
    
                    let width = testRad * 2
    
                    let height  = testRad
    
                    let originRect = CGRectMake(pt.x - width/2 , pt.y-height/2 , testRad*2, testRad)
    
                    var arc :UIBezierPath = UIBezierPath(ovalInRect:originRect)
    
                    
    
                    UIColor.redColor().setStroke()
    
                    arc.stroke()
    

      

    let testRad = circleRadius * 20
       
       
      let width = testRad * 2
       
      let height  = testRad
       
      let originRect = CGRectMake(pt.x - width/2 , pt.y-height/2 , testRad*2, testRad)
       
      let arc :UIBezierPath = UIBezierPath(ovalInRect:originRect)
      
      let dashes: [CGFloat] = [2, 2]
      arc.setLineDash(dashes, count: 2, phase: 0)
       
      UIColor.redColor().setStroke()
       
      arc.stroke()
    

      

      

    ios-chart写标签

                        let valOffset = Int(dataSet.circleRadius * 1.75 + height/2)
                                            ChartUtils.drawText(context: context, text:displayLabel, point: CGPoint(x: pt.x, y: pt.y - CGFloat(valOffset) - valueFont.lineHeight), align: .Center, attributes: [NSFontAttributeName: valueFont, NSForegroundColorAttributeName: valueTextColor])
    

      

  • 相关阅读:
    session 、cookie、token的区别
    翻译-In-Stream Big Data Processing 流式大数据处理
    一致性hash算法
    HA 部署wordpress
    HA 高可用mysql集群
    JVM内存监视手段和内存溢出解决方案
    vmware linux NAT CON
    spring SOA architecture
    思路
    cookie和session得区别
  • 原文地址:https://www.cnblogs.com/studyNT/p/5092471.html
Copyright © 2011-2022 走看看