Skip to content

Commit 63ef911

Browse files
authored
Update README.md
1 parent ceacebc commit 63ef911

File tree

1 file changed

+25
-25
lines changed

1 file changed

+25
-25
lines changed

README.md

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,18 @@ An Android library of 3D style page flip. It needs OpenGL 2.0!
99
* [Usage](#usage)
1010
- [Introduce PageFlip Into Your Project](#simple-steps-for-introducing-pageflip-into-your-project)
1111
- [Configure PageFilp](#configure-pageflip)
12-
- [Page Mode](#page-mode)
13-
- [Click Screen To Flip](#click-screen-to-flip)
14-
- [Area If Clicking To Flip](#area-of-clicking-to-flip)
15-
- [PageFlip Listener](#pageflip-listener)
16-
- [Mesh Pixels](#mesh-pixels)
17-
- [Ratio Of Semi-peremeter](#ration-of-semi-peremeter)
18-
- [Mask Alpha For The Back Of Fold Page](#mask-alpha-for-the-back-of-fold-page)
19-
- [Edge Shadow Color/Alpha Of Fold Page](#edge-shadow-color/alpha-of-fold-page)
20-
- [Base Shadow Color/Alpha Of Fold Page](#base-shadow-color/alpha-of-fold-page)
21-
- [Edge Shadow Width Of Fold Page](#edge-shadow-width-of-fold-page)
22-
- [Base Shadow Width Of Fold Page](#base-shadow-width-of-fold-page)
23-
- [Duration Of Flip Animating](#duration-of-flip-animating)
12+
+ [Page Mode](#1-page-mode)
13+
+ [Click Screen To Flip](#2-click-screen-to-flip)
14+
+ [Area If Clicking To Flip](#3-area-of-clicking-to-flip)
15+
+ [PageFlip Listener](#4-pageflip-listener)
16+
+ [Mesh Pixels](#5-mesh-pixels)
17+
+ [Ratio Of Semi-peremeter](#6-ratio-of-semi-peremeter)
18+
+ [Mask Alpha For The Back Of Fold Page](#7-mask-alpha-for-the-back-of-fold-page)
19+
+ [Edge Shadow Color/Alpha Of Fold Page](#8-edge-shadow-coloralpha-of-fold-page)
20+
+ [Base Shadow Color/Alpha Of Fold Page](#9-base-shadow-coloralpha-of-fold-page)
21+
+ [Edge Shadow Width Of Fold Page](#10-edge-shadow-width-of-fold-page)
22+
+ [Base Shadow Width Of Fold Page](#11-base-shadow-width-of-fold-page)
23+
+ [Duration Of Flip Animating](#12-duration-of-flip-animating)
2424

2525
* [License](#license)
2626

@@ -64,7 +64,7 @@ dependencies {
6464
* **onSurfaceCreated**: notify *PageFlip* object to handle usreface creating event
6565
* **onSurfaceChanged**: notify *PageFlip* object to handle surface changing event
6666

67-
* You may need a message handler to send/receive an end drawing message. Please refer to **PageFlipView** in sample application.
67+
* You may need a message handler to send/receive an drawing message. Please refer to **PageFlipView** in sample application.
6868
* You may need a lock to avoid conflicts between main thread and OpenGL rendering thread. Please refer to **PageFlipView** in sample application.
6969

7070
More details, please take a look **PageFlipView** in sample application.
@@ -73,7 +73,7 @@ More details, please take a look **PageFlipView** in sample application.
7373

7474
**PageFlip** library provides some configurations for customizing its behaviors. For example: shadow color and alpha, mesh pixels and page mode.
7575

76-
* **Page Mode**
76+
#### 1. Page Mode
7777

7878
There are two page modes provided by **PageFlip**:
7979
* **Auto Page Mode**: In this mode, **PageFlip** will automatically determine use single page or double pages to present content on screen. That means single page is used for portrait mode and double pages is used for lanscape mode.
@@ -87,7 +87,7 @@ More details, please take a look **PageFlipView** in sample application.
8787
mPageFlip.enableAutopage(true);
8888
```
8989

90-
* **Click screen to flip**
90+
#### 2. Click screen to flip
9191

9292
You can enable/disable clicking screen to flip
9393

@@ -97,7 +97,7 @@ More details, please take a look **PageFlipView** in sample application.
9797
mPageFlip.enableClickToFlip(true);
9898
```
9999

100-
* **Area of clicking to flip**
100+
#### 3. Area of clicking to flip
101101

102102
You can give a ratio of width from 0 to 0.5f to set an area for reponsing click event to trigger a page flip. The default value is **0.5f**, which means the backfward flip will happen if you click the left half of screen and forward flip will start if you click the right half of screen in single page mode.
103103

@@ -107,7 +107,7 @@ More details, please take a look **PageFlipView** in sample application.
107107
mPageFlip.setWidthRatioOfClickToFlip(0.3f);
108108
```
109109

110-
* **PageFlip listener**
110+
#### 4. PageFlip listener
111111

112112
You can set a listener to tell **PageFlip** if the forward flip or backward flip is allowed to be happened.
113113

@@ -116,7 +116,7 @@ More details, please take a look **PageFlipView** in sample application.
116116
mPageFlip.setListener(mListener);
117117
```
118118

119-
* **Mesh pixels**
119+
#### 5. Mesh pixels
120120

121121
Set how many pixels are used for a mesh. The less pxiels the mesh uses, the more fine the drawing is and the lower the performance is. The default value is 10 pixels.
122122

@@ -125,7 +125,7 @@ More details, please take a look **PageFlipView** in sample application.
125125
mPageFlip.setPixelsOfMesh(5);
126126
```
127127

128-
* **Ratio of semi-peremeter**
128+
#### 6. Ratio of semi-peremeter
129129

130130
When page is curled, it is actually tackled as a semi-cylinder by **PageFlip**. You can set size of the semi-cylinder to change the flip shap. Since the semi-cylinder dependeds on the line length from the touch point to original point(see the below illustration), you need to provide a ratio of this line length to tell **PageFlip** the peremeter of the semi-cylinder. The default value is 0.8f.
131131

@@ -150,7 +150,7 @@ More details, please take a look **PageFlipView** in sample application.
150150
mPageFlip.setSemiPerimeterRatio(0.6f);
151151
```
152152

153-
* **Mask alpha for the back of fold page**
153+
#### 7. Mask alpha for the back of fold page
154154

155155
You can set the mask alpha for the back of fold page when page is curled in single page mode. The default value is 0.6f.
156156

@@ -159,7 +159,7 @@ More details, please take a look **PageFlipView** in sample application.
159159
mPageFlip.setMaskAlphaOfFold(0.5f);
160160
```
161161

162-
* **Edge shadow color/alpha of fold page**
162+
#### 8. Edge shadow color/alpha of fold page
163163

164164
You can set start/end color and start/end alpha for edge shadow of fold page.
165165

@@ -170,7 +170,7 @@ More details, please take a look **PageFlipView** in sample application.
170170
mPageFlip.setShadowColorOfFoldBase(0.1f, 0.2f, 0.5f, 1f);
171171
```
172172

173-
* **Base shadow color/alpha of fold page**
173+
#### 9. Base shadow color/alpha of fold page
174174

175175
You can set start/end color and start/end alpha for base shadow of fold page.
176176

@@ -179,7 +179,7 @@ More details, please take a look **PageFlipView** in sample application.
179179
mPageFlip.setShadowColorOfFoldBase(0.05f, 0.2f, 0.5f, 1f);
180180
```
181181

182-
* **Edge shadow width of fold page**
182+
#### 10. Edge shadow width of fold page
183183

184184
When page is curled, the size of fold page will be changed following the finger movement and its edge shadow width should be changed accordingly. You can set an appropriate width range for shadow width.
185185

@@ -192,7 +192,7 @@ More details, please take a look **PageFlipView** in sample application.
192192
mPageFlip.setShadowWidthOfFoldEdges(5, 40, 0.3f);
193193
```
194194

195-
* **Base shadow width of fold page**
195+
#### 11. Base shadow width of fold page
196196

197197
Like **[Edge shadow width of fold page](edge-shadow-width-of-foldpage)**, You can set an appropriate width range for base shadow of fold page.
198198

@@ -202,7 +202,7 @@ More details, please take a look **PageFlipView** in sample application.
202202
mPageFlip.setShadowWidthOfFoldBase(5, 40, 0.4f);
203203
```
204204

205-
* **Duration of flip animating**
205+
#### 12. Duration of flip animating
206206

207207
You can give a duration for flip animating when you call **onFingerUp** function to handle finger up event.
208208

0 commit comments

Comments
 (0)