GLRippleView icon indicating copy to clipboard operation
GLRippleView copied to clipboard

Drawing edge of a display is weird

Open r21nomi opened this issue 7 years ago • 4 comments

r21nomi avatar Jul 26 '17 06:07 r21nomi

Hi. This problem still is actual? I think, that problem due to a perspective camera in OpenGl, as a final render does not plane projection of image. Therefore must to change a camera angular view, or - to cut borders of output image )

MrClaus avatar Jun 06 '18 15:06 MrClaus

I was able to find a solution to this by increasing the vertex values used for positioning the bitmap in RippleRenderer from 1.0 to 1.1 and 0.0 to 0.1. This crops the image from the borders ever so slightly but now you do not see the unnecessary blank area on the edges.

Code:

private val VERTICES: FloatArray = floatArrayOf(
                -1.1f, 1.1f, 0.1f,  // ↖ left top︎
                -1.1f, -1.1f, 0.1f, // ↙︎ left bottom
                1.1f, 1.1f, 0.1f,   // ↗︎ right top
                1.1f, -1.1f, 0.1f   // ↘︎ right bottom
        )

Maybe this will help others.

PriyaSindkar avatar Nov 29 '18 07:11 PriyaSindkar

@PriyaSindkar Thank you for sharing your idea. It might be a good solution. Let me think about it.

r21nomi avatar Dec 01 '18 23:12 r21nomi

how can i stop the animation

r4rashid08 avatar Apr 18 '19 11:04 r4rashid08