From 7b02207537d35bfa1714bf8beafc921f717d100a Mon Sep 17 00:00:00 2001
From: 单军华
Date: Wed, 11 Jul 2018 10:47:42 +0800
Subject: [PATCH] 首次上传

---
 screendisplay/screendisplay/Classes/ThirdClass/JHChart/JHChart.h |  128 ++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 128 insertions(+), 0 deletions(-)

diff --git a/screendisplay/screendisplay/Classes/ThirdClass/JHChart/JHChart.h b/screendisplay/screendisplay/Classes/ThirdClass/JHChart/JHChart.h
new file mode 100755
index 0000000..0801470
--- /dev/null
+++ b/screendisplay/screendisplay/Classes/ThirdClass/JHChart/JHChart.h
@@ -0,0 +1,128 @@
+//
+//  JHChart.h
+//  JHChartDemo
+//
+//  Created by cjatech-������ on 16/4/10.
+//  Copyright �� 2016��� JH. All rights reserved.
+//
+
+
+#import <UIKit/UIKit.h>
+#import <Foundation/Foundation.h>
+
+#define P_M(x,y) CGPointMake(x, y)
+
+#define weakSelf(weakSelf)  __weak typeof(self) weakself = self;
+
+@interface JHChart : UIView
+
+
+/**
+ *  The margin value of the content view chart view
+ */
+@property (nonatomic, assign) UIEdgeInsets contentInsets;
+
+
+/**
+ *  The origin of the chart is different from the meaning of the origin of the chart. 
+    As a pie chart and graph center ring. The line graph represents the origin.
+ */
+@property (assign, nonatomic)  CGPoint chartOrigin;
+
+
+/**
+ *  Name of chart. The name is generally not displayed, just reserved fields
+ */
+@property (copy, nonatomic) NSString * chartTitle;
+
+
+/**
+ *  Start drawing chart.
+ */
+- (void)showAnimation;
+
+/**
+ *  Clear current chart when refresh
+ */
+- (void)clear;
+
+
+/**
+ *  Draw a line according to the conditions
+ *  @param start���Draw Starting Point
+ *  @param end���Draw Ending Point
+ *  @param isDotted���Is the dotted line
+ *  @param color���Line color
+ */
+- (void)drawLineWithContext:(CGContextRef )context
+               andStarPoint:(CGPoint )start
+                andEndPoint:(CGPoint)end
+            andIsDottedLine:(BOOL)isDotted
+                   andColor:(UIColor *)color;
+
+
+/**
+ *  Draw a piece of text at a point
+ *  @param point���Draw position
+ *  @param color���TextColor
+ *  @param fontSize���Text font size
+ */
+- (void)drawText:(NSString *)text
+      andContext:(CGContextRef )context
+         atPoint:(CGPoint )point
+       WithColor:(UIColor *)color
+     andFontSize:(CGFloat)fontSize;
+
+
+
+/**
+ *  Similar to the above method
+ *
+ */
+- (void)drawText:(NSString *)text
+         context:(CGContextRef )context
+         atPoint:(CGRect )rect
+       WithColor:(UIColor *)color
+            font:(UIFont*)font;
+
+
+
+/**
+ *  Determine the width of a certain segment of text in the default font.
+ */
+- (CGFloat)getTextWithWhenDrawWithText:(NSString *)text;
+
+
+
+/**
+ *  Draw a rectangle at a point
+ *  p:Draw position
+ *
+ */
+- (void)drawQuartWithColor:(UIColor *)color
+             andBeginPoint:(CGPoint)p
+                andContext:(CGContextRef)contex;
+
+
+/**
+ *  Draw a circle at a point
+ *  @param redius���Circle redius
+ *  @param p:Draw position
+ *
+ */
+- (void)drawPointWithRedius:(CGFloat)redius
+                   andColor:(UIColor *)color
+                   andPoint:(CGPoint)p
+                 andContext:(CGContextRef)contex;
+
+
+/**
+ *  According to the relevant conditions to determine the width of the text
+ *  @param maxSize���Maximum range of text
+ *  @param textFont���Text font
+ *  @param aimString:Text that needs to be measured
+ */
+- (CGSize)sizeOfStringWithMaxSize:(CGSize)maxSize
+                         textFont:(CGFloat)fontSize
+                        aimString:(NSString *)aimString;
+@end

--
Gitblit v1.8.0