Skip to content

Commit cd16d46

Browse files
committed
support crop filter in version 1.4.1.0
1 parent 7827002 commit cd16d46

File tree

5 files changed

+14
-7
lines changed

5 files changed

+14
-7
lines changed

README-en.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ allprojects {
4343
4444
// module build.gradle
4545
dependencies {
46-
implementation 'com.github.ChillingVan:android-openGL-canvas:v1.4.0.0'
46+
implementation 'com.github.ChillingVan:android-openGL-canvas:v1.4.1.0'
4747
}
4848
```
4949

@@ -129,6 +129,7 @@ It has sync and async modes.
129129
This is kind of heavy so I do not update call this for every drawn.
130130

131131
## Latest Update
132+
* Support cut bitmap with CropFilter
132133
* Add MultiTexOffScreenCanvas, GLMultiTexProducerView, GLMultiTexConsumerView to support producing multiple textures and consume multiple textures
133134
* Add AndroidCanvasHelper and its example for drawing text.
134135

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ allprojects {
4848
4949
// module build.gradle
5050
dependencies {
51-
implementation 'com.github.ChillingVan:android-openGL-canvas:v1.4.0.0'
51+
implementation 'com.github.ChillingVan:android-openGL-canvas:v1.4.1.0'
5252
}
5353
```
5454

@@ -139,6 +139,7 @@ public class MyGLView extends GLView {
139139

140140

141141
## 最近更新
142+
* 支持裁切图片的CropFilter
142143
* 增加 MultiTexOffScreenCanvas, GLMultiTexProducerView, GLMultiTexConsumerView,支持提供多张纹理的和消化多张纹理
143144
* 增加AndroidCanvasHelper及其绘制文本的例子
144145

@@ -152,7 +153,8 @@ public class MyGLView extends GLView {
152153
http://www.apache.org/licenses/LICENSE-2.0
153154

154155
Unless required by applicable law or agreed to in writing, software
155-
distributed under the License is distributed on an "AS IS" BASIS,
156+
distributed under the License is distributed on
157+
an "AS IS" BASIS,
156158
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
157159
See the License for the specific language governing permissions and
158160
limitations under the License.

canvasgl/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ android {
2828
defaultConfig {
2929
minSdkVersion 14
3030
targetSdkVersion 27
31-
versionCode 104000
32-
versionName "1.4.0.0"
31+
versionCode 104010
32+
versionName "1.4.1.0"
3333
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
3434
}
3535
buildTypes {

canvasglsample/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ android {
2828
applicationId "com.chillingvan.canvasglsample"
2929
minSdkVersion 15
3030
targetSdkVersion 27
31-
versionCode 3
31+
versionCode 4
3232
versionName "1.4"
3333

3434
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

canvasglsample/src/main/java/com/chillingvan/canvasglsample/compareCanvas/CompareGLView.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
import com.chillingvan.canvasgl.ICanvasGL;
3333
import com.chillingvan.canvasgl.glcanvas.GLPaint;
3434
import com.chillingvan.canvasgl.glview.GLView;
35+
import com.chillingvan.canvasgl.textureFilter.CropFilter;
3536
import com.chillingvan.canvasglsample.R;
3637

3738
/**
@@ -41,6 +42,7 @@
4142
public class CompareGLView extends GLView {
4243

4344
private Bitmap baboon;
45+
private CropFilter cropFilter;
4446

4547
public CompareGLView(Context context) {
4648
super(context);
@@ -55,6 +57,8 @@ protected void init() {
5557
super.init();
5658

5759
baboon = BitmapFactory.decodeResource(getResources(), R.drawable.baboon);
60+
61+
cropFilter = new CropFilter(0.5f, 0.5f, 1, 1);
5862
}
5963

6064
@Override
@@ -72,7 +76,7 @@ protected void onGLDraw(ICanvasGL canvas) {
7276
matrix.reset();
7377
matrix.translate(28, 19);
7478
matrix.rotateZ(30);
75-
canvas.drawBitmap(BitmapFactory.decodeResource(getResources(), R.drawable.lenna), matrix);
79+
canvas.drawBitmap(BitmapFactory.decodeResource(getResources(), R.drawable.lenna), matrix, cropFilter);
7680

7781

7882
GLPaint paint = new GLPaint();

0 commit comments

Comments
 (0)