Code Monkey home page Code Monkey logo

Comments (13)

Base2526 avatar Base2526 commented on July 19, 2024

Pls, help

i want example source code show 2 pages in 2 page mode

or you how much will it cost. Actually need it.

thx,
Email : [email protected]

from android-pagecurl.

harism avatar harism commented on July 19, 2024

Hiya,

I can't give you exact instructions but in gereral you should introduce 2
textures per page. And instead of rendering translucent background you ought
to use this backsiding texture.

Hope this helps.

H
On Aug 3, 2011 7:50 AM, "sOt0nGx" <
[email protected]>
wrote:

How do I show 2 pages in 2 page mode instead of translucent left page?

As per the title.

It is great in 1 page mode but in 2 page, if I want to show 2 pages at a
time e.g. 1&2, flip a page to 3&4... how do I do that?

Reply to this email directly or view it on GitHub:
#11

from android-pagecurl.

Base2526 avatar Base2526 commented on July 19, 2024

thx,
if i want rendering translucent background between ACTION_MOVE [PAGE Mesh] , I have to do it.

Android Programmer.

from android-pagecurl.

sOt0nGx avatar sOt0nGx commented on July 19, 2024

I managed to make the right side show only even numbered pages in landscape but
which class/function attaches the image to the left page?

Thanks

from android-pagecurl.

Neo1975 avatar Neo1975 commented on July 19, 2024

I'm interested into this issue, I'm also would like to work about it but I doesn't have experience about OpenGL so I doesn't know where to start, I will to search some text about OpenGL but I'm not sure is possible to apply 2 texture: frontside and backside to a single mesh.

from android-pagecurl.

csname avatar csname commented on July 19, 2024

I'm also interested.

@harism: It would be great if you could provide some code for this.

Thank you!!

from android-pagecurl.

mguerra88 avatar mguerra88 commented on July 19, 2024

Hi everyone,

First of all thanks for this great API harism ;) I'm also implementing a "book like effect" and I need to show pages side by side instead of the transculent backpage. So far I managed to draw the back side texture. However, it doesn't draw quite right... Only one quarter of the image is rendered as you can see in the snapshot below:

http://imageshack.us/photo/my-images/594/device20120410175255.png/

My OpenGL knowledge is limited and I have no clue what am I doing wrong... I use the following code to draw the backside texture (on draw() method from CurlMesh class):

        if (DRAW_TEXTURE && mBitmapBack != null) 
    {
        gl.glBindTexture(GL10.GL_TEXTURE_2D, mTextureIds[1]);
        GLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, mBitmapBack, 0);
        mBitmapBack = null;
    }

    if (DRAW_TEXTURE)
    {
        gl.glBindTexture(GL10.GL_TEXTURE_2D, mTextureIds[1]);
    }

    int backStartIdx = Math.max(0, mVerticesCountFront - 2);
    int backCount = mVerticesCountFront + mVerticesCountBack - backStartIdx;

        // Draw blank / 'white' front facing vertices.
    gl.glDrawArrays(GL10.GL_TRIANGLE_STRIP, backStartIdx, backCount);
    // Draw back facing texture.
    if (DRAW_TEXTURE) 
    {
        gl.glEnable(GL10.GL_BLEND);
        gl.glEnable(GL10.GL_TEXTURE_2D);
        gl.glBlendFunc(GL10.GL_SRC_ALPHA, GL10.GL_ONE_MINUS_SRC_ALPHA);
        gl.glDrawArrays(GL10.GL_TRIANGLE_STRIP, backStartIdx, backCount);
        gl.glDisable(GL10.GL_TEXTURE_2D);
        gl.glDisable(GL10.GL_BLEND);
    } 

If anyone can tell me what am I doing wrong I would appreciate it... This the only thing missing in my project :(

Regards,
Mark

from android-pagecurl.

cags12 avatar cags12 commented on July 19, 2024

hey guys, I managed to resolve this issue, 2 pages landscape and 1 page portraid, I'm new to git so when I figured out how to create a fork and make a pull request I'll share it to you. BTW harism, great job!

a little preview here
http://www.youtube.com/watch?v=iwu7P5PCpsw

from android-pagecurl.

cags12 avatar cags12 commented on July 19, 2024

Done, pull request in course, check my profile in case it´s not accepted.

from android-pagecurl.

harism avatar harism commented on July 19, 2024

Sorry it took me so long time but I did a "automated pull" just seconds ago. I didn't take a proper look on this patch though but I'm hoping it works as expected. I've got some ideas how to do whole Bitmap querying totally differently but it'll take a while before getting there.

Thanks, Christian.

from android-pagecurl.

cags12 avatar cags12 commented on July 19, 2024

Hi, so far I´ve tested, it works as expected. The only concern I have and maybe you can help me is described at CurlMesh Class Line 818 at SwapSheet method. I would like to optimize it. Check it out when you have some time. I´m going to be working in some other functionality I´d like to add

Regards

from android-pagecurl.

cags12 avatar cags12 commented on July 19, 2024

Harism, Hi, I saw the changes you made to the code. Testing it on my phone and the emulator, it doesn´t show the 2 pages as expected. It show always a back gray facing no matter is in landscape or portraid. see the picture

http://img821.imageshack.us/img821/4204/photoneva.jpg

EDIT: Forgeit. I see the Note you made about the BitmapProvider, It works now. Thanks for the code update.

from android-pagecurl.

bindumadhaviboya avatar bindumadhaviboya commented on July 19, 2024

I want to add graphs to the bookview. I have integrated your code but unable to add charts. Please help me, how can I add Charts to the PageProvider Class

Thanks in advance.

from android-pagecurl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.