You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+25-25Lines changed: 25 additions & 25 deletions
Original file line number
Diff line number
Diff line change
@@ -9,18 +9,18 @@ An Android library of 3D style page flip. It needs OpenGL 2.0!
9
9
*[Usage](#usage)
10
10
-[Introduce PageFlip Into Your Project](#simple-steps-for-introducing-pageflip-into-your-project)
11
11
-[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)
24
24
25
25
*[License](#license)
26
26
@@ -64,7 +64,7 @@ dependencies {
64
64
***onSurfaceCreated**: notify *PageFlip* object to handle usreface creating event
65
65
***onSurfaceChanged**: notify *PageFlip* object to handle surface changing event
66
66
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.
68
68
* You may need a lock to avoid conflicts between main thread and OpenGL rendering thread. Please refer to **PageFlipView** in sample application.
69
69
70
70
More details, please take a look **PageFlipView** in sample application.
@@ -73,7 +73,7 @@ More details, please take a look **PageFlipView** in sample application.
73
73
74
74
**PageFlip** library provides some configurations for customizing its behaviors. For example: shadow color and alpha, mesh pixels and page mode.
75
75
76
-
***Page Mode**
76
+
#### 1. Page Mode
77
77
78
78
There are two page modes provided by **PageFlip**:
79
79
* **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.
87
87
mPageFlip.enableAutopage(true);
88
88
```
89
89
90
-
***Click screen to flip**
90
+
#### 2. Click screen to flip
91
91
92
92
You can enable/disable clicking screen to flip
93
93
@@ -97,7 +97,7 @@ More details, please take a look **PageFlipView** in sample application.
97
97
mPageFlip.enableClickToFlip(true);
98
98
```
99
99
100
-
***Area of clicking to flip**
100
+
#### 3. Area of clicking to flip
101
101
102
102
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.
103
103
@@ -107,7 +107,7 @@ More details, please take a look **PageFlipView** in sample application.
107
107
mPageFlip.setWidthRatioOfClickToFlip(0.3f);
108
108
```
109
109
110
-
***PageFlip listener**
110
+
#### 4. PageFlip listener
111
111
112
112
You can set a listener to tell **PageFlip** if the forward flip or backward flip is allowed to be happened.
113
113
@@ -116,7 +116,7 @@ More details, please take a look **PageFlipView** in sample application.
116
116
mPageFlip.setListener(mListener);
117
117
```
118
118
119
-
***Mesh pixels**
119
+
#### 5. Mesh pixels
120
120
121
121
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.
122
122
@@ -125,7 +125,7 @@ More details, please take a look **PageFlipView** in sample application.
125
125
mPageFlip.setPixelsOfMesh(5);
126
126
```
127
127
128
-
***Ratio of semi-peremeter**
128
+
#### 6. Ratio of semi-peremeter
129
129
130
130
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.
131
131
@@ -150,7 +150,7 @@ More details, please take a look **PageFlipView** in sample application.
150
150
mPageFlip.setSemiPerimeterRatio(0.6f);
151
151
```
152
152
153
-
***Mask alpha for the back of fold page**
153
+
#### 7. Mask alpha for the back of fold page
154
154
155
155
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.
156
156
@@ -159,7 +159,7 @@ More details, please take a look **PageFlipView** in sample application.
159
159
mPageFlip.setMaskAlphaOfFold(0.5f);
160
160
```
161
161
162
-
***Edge shadow color/alpha of fold page**
162
+
#### 8. Edge shadow color/alpha of fold page
163
163
164
164
You can set start/end color and start/end alpha for edge shadow of fold page.
165
165
@@ -170,7 +170,7 @@ More details, please take a look **PageFlipView** in sample application.
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.
185
185
@@ -192,7 +192,7 @@ More details, please take a look **PageFlipView** in sample application.
192
192
mPageFlip.setShadowWidthOfFoldEdges(5, 40, 0.3f);
193
193
```
194
194
195
-
***Base shadow width of fold page**
195
+
#### 11. Base shadow width of fold page
196
196
197
197
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.
198
198
@@ -202,7 +202,7 @@ More details, please take a look **PageFlipView** in sample application.
202
202
mPageFlip.setShadowWidthOfFoldBase(5, 40, 0.4f);
203
203
```
204
204
205
-
***Duration of flip animating**
205
+
#### 12. Duration of flip animating
206
206
207
207
You can give a duration for flip animating when you call **onFingerUp** function to handle finger up event.
0 commit comments