Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
react-native-geek-image-editor
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
huanglu
react-native-geek-image-editor
Commits
5d5c3dfc
Commit
5d5c3dfc
authored
Mar 18, 2020
by
huanglu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
558a0b6f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
32 deletions
+31
-32
LFDrawView.m
.../class/LFPhotoEditingController/view/subView/LFDrawView.m
+31
-32
No files found.
ios/LFMediaEditingController/LFMediaEditingController/class/LFPhotoEditingController/view/subView/LFDrawView.m
View file @
5d5c3dfc
...
@@ -110,7 +110,6 @@ NSString *const kLFDrawViewData = @"LFDrawViewData";
...
@@ -110,7 +110,6 @@ NSString *const kLFDrawViewData = @"LFDrawViewData";
CGPoint
point
=
[
touch
locationInView
:
self
];
CGPoint
point
=
[
touch
locationInView
:
self
];
//设置线宽
//设置线宽
path
.
lineWidth
=
4
.
0
f
;
path
.
lineWidth
=
4
.
0
f
;
path
.
lineCapStyle
=
kCGLineCapRound
;
//线条拐角
path
.
lineCapStyle
=
kCGLineCapRound
;
//线条拐角
path
.
lineJoinStyle
=
kCGLineJoinRound
;
//终点处理
path
.
lineJoinStyle
=
kCGLineJoinRound
;
//终点处理
[
path
moveToPoint
:
point
];
[
path
moveToPoint
:
point
];
...
@@ -187,37 +186,37 @@ NSString *const kLFDrawViewData = @"LFDrawViewData";
...
@@ -187,37 +186,37 @@ NSString *const kLFDrawViewData = @"LFDrawViewData";
[
self
setNeedsDisplay
];
[
self
setNeedsDisplay
];
}
}
//
-(void)drawRect:(CGRect)rect{
-
(
void
)
drawRect
:
(
CGRect
)
rect
{
//
//
if (self.lineArray.count) {
if
(
self
.
lineArray
.
count
)
{
//
for (LFDrawBezierPath *path in self.lineArray) {
for
(
LFDrawBezierPath
*
path
in
self
.
lineArray
)
{
//
if (path.isErase) {
if
(
path
.
isErase
)
{
//
//
[self.backgroundColor setStroke];
[
self
.
backgroundColor
setStroke
];
//
//
}else{
}
else
{
//
[path.color setStroke];
[
path
.
color
setStroke
];
//
}
}
//
//
//
path.lineCapStyle = kCGLineCapRound;
path
.
lineCapStyle
=
kCGLineCapRound
;
//
path.lineJoinStyle = kCGLineCapRound;
path
.
lineJoinStyle
=
kCGLineCapRound
;
//
if (path.isErase) {
if
(
path
.
isErase
)
{
//
path.lineWidth = 10; // 这里可抽取出来枚举定义
path
.
lineWidth
=
10
;
// 这里可抽取出来枚举定义
//
[path strokeWithBlendMode:kCGBlendModeDestinationIn alpha:1.0];
[
path
strokeWithBlendMode
:
kCGBlendModeDestinationIn
alpha
:
1
.
0
];
//
}else{
}
else
{
// path.lineWidth = 3
;
path
.
lineWidth
=
4
.
0
f
;
//
[path strokeWithBlendMode:kCGBlendModeNormal alpha:1.0];
[
path
strokeWithBlendMode
:
kCGBlendModeNormal
alpha
:
1
.
0
];
//
}
}
//
[path stroke];
[
path
stroke
];
//
//
}
}
//
//
}
}
//
//
//
[super drawRect:rect];
[
super
drawRect
:
rect
];
//
}
}
//- (void)drawRect:(CGRect)rect{
//- (void)drawRect:(CGRect)rect{
// //遍历数组,绘制曲线
// //遍历数组,绘制曲线
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment