android original handwriting handwriting

android studio pen stroke

Brush is a special pen, brush to achieve good results, there are a few rather special, need to be considered.

1. within the same strokes, lines of different thickness throughout.

2. within the same strokes, different lines throughout transparency.

3. Have the effect of stroke.

  Realization of ideas:

Let me talk about the effect of stroke. The effect of treatment of stroke, usually in the sum of the beginning and at the end of special treatment, in particular the horizontal and vertical strokes.

Besides the transparency of the line. In general, the write speed is slow, getting a heavy force of local, line color darker; fast write speed, write light power of local lines lighter in color.

Besides the line thickness. In general, the write speed is slow, getting a heavy force of local, thicker lines; fast write speed, write light power of local, narrow lines.

And using the point on the curve corresponding to the calculated round pen width, graphics module using a circular filler filling effect;

Processing contour: contour for each stroke of the current point and a point on the magnitude of the slope K different color to draw the wire length, wire

Depth will be gradual;

By curve fitting algorithm and the circular contour filling algorithm rough brush effect has been realized, pen tablet increased writing experience copybook

Here is a demo map, running platform for Android, development language android studio. But it seems to have a pretty cool. It can be applied to electronic whiteboard, calligraphy, signature, paperless office software scene.

 

Welcome exchanges and cooperation: QQ77211022 13762930029 micro letter of the same number

Guess you like

Origin www.cnblogs.com/etfsoft/p/12120925.html