×

Discussion Board

Results 1 to 10 of 10
  1. #1
    Regular Contributor
    Join Date
    Sep 2006
    Posts
    54

    draw large image on screen and scroll

    Hi All,

    i want to load an image larger than screen resolution(360x640)(nokia 5800) and need to scroll that image to view all parts of image. after that i want to draw something on that image and store back. can anybody help me in this regard.
    drawing and saving image is ready, only scrolling and editing is needed.

    Thanks in advance,
    Vinay.

  2. #2
    Super Contributor
    Join Date
    Jun 2006
    Location
    India
    Posts
    3,037

    Re: draw large image on screen and scroll

    Hi,

    Check the link migth be helpful to you.
    Use [URL="http://qt.nokia.com/products/qt-quick/"]Qt-Quick[/URL] to make your application UI more attractive.

    [URL="http://store.ovi.com/content/271896"]http://store.ovi.com/content/271896[/URL] | [URL="http://store.ovi.com/content/276199"]http://store.ovi.com/content/276199[/URL] |[URL="http://store.ovi.com/content/276202"] http://store.ovi.com/content/276202[/URL] | [URL="http://store.ovi.com/content/280827"]http://store.ovi.com/content/280827[/URL]

  3. #3
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,751

    Re: draw large image on screen and scroll

    If you have the image in the memory, a simple "BitBlt(const TPoint &aPoint, const CFbsBitmap *aBitmap, const TRect &aSourceRect)" can scroll it to you: fix aPoint to 0,0, and specify aSourceRect moving aroung in your bitmap.

  4. #4
    Regular Contributor
    Join Date
    Sep 2006
    Posts
    54

    Re: draw large image on screen and scroll

    kkrish
    u mean i hav to scale image to screen resoluition draw on it and rescale to original size and save?

    wizard
    can u please explain in detail
    now im drawing image by bitblt(tpoint, cfbsbitmap)
    furhter wht i need to do achieve scrolling?

  5. #5
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,751

    Re: draw large image on screen and scroll

    Depending on how it works internally, the simple BitBlt(TPoint,CFbsBitmap) can be efficient too.
    Anyway, you obviously need something which triggers scrolling, either modify coordinates and issue DrawNow in your OfferKeyEventL, or use a timer (if you want it to be automatic).

  6. #6
    Regular Contributor
    Join Date
    Sep 2006
    Posts
    54

    Re: draw large image on screen and scroll

    im working in S60 5th edition.
    Can we create one scrollable container and draw image in that?
    any api for creating scrollable container?

  7. #7
    Super Contributor
    Join Date
    Mar 2004
    Location
    Bangalore,India
    Posts
    2,146

    Re: draw large image on screen and scroll

    Cheers,
    Mayank

  8. #8
    Regular Contributor
    Join Date
    Sep 2006
    Posts
    54

    Re: draw large image on screen and scroll

    i tried first link, but scrollbars are not visible.
    just adding CEikScrollBarFrame instance in Container::ConstructL()
    is enought to get scrollbars?
    scrollbars can be visible in container of no controls?

  9. #9
    Regular Contributor
    Join Date
    Sep 2006
    Posts
    54

    Re: draw large image on screen and scroll

    by using these lines of code i got horizontal n vertical scrolls in container

    iScrollBarFrame = new ( ELeave ) CEikScrollBarFrame( this, this, ETrue );
    iScrollBarFrame->CreateDoubleSpanScrollBarsL( ETrue, EFalse );
    iScrollBarFrame->SetTypeOfVScrollBar( CEikScrollBarFrame::EDoubleSpan );
    iScrollBarFrame->SetScrollBarVisibilityL( CEikScrollBarFrame::EOn,
    CEikScrollBarFrame::EOn );
    iVDsSbarModel.SetScrollSpan(4);
    iVDsSbarModel.SetWindowSize(1);
    iVDsSbarModel.SetFocusPosition(0);

    iHDsSbarModel.SetScrollSpan(3);
    iHDsSbarModel.SetWindowSize(1);
    iHDsSbarModel.SetFocusPosition(0);

    TEikScrollBarFrameLayout layout;
    layout.iTilingMode = TEikScrollBarFrameLayout::EInclusiveRectConstant;
    TRect rect = Rect();
    iScrollBarFrame->TileL(&iHDsSbarModel,&iVDsSbarModel,rect,rect,layout);
    iScrollBarFrame->SetVFocusPosToThumbPos(iVDsSbarModel.FocusPosition());

  10. #10
    Registered User
    Join Date
    Aug 2008
    Location
    Hyderabad
    Posts
    35

    Re: draw large image on screen and scroll

    Hai ,
    If you want to draw a large image do the following.
    i) Divide the image into some parts
    ii) a) For suppose the size of image is 700 units.
    b) Divide the image by some constant units i.e by amount you want to scroll for suppose by 20 units
    c) Now you will get the number of parts you can scroll i.e 700/20+ 700%20 (reminder part if anything is left).
    d) Then assign the values to the scroll bar based on your requirement.
    e) You can create an impression to the user that you are scrolling by moving the image to negative y-axis.
    f) Initially you can draw the image to particular height i.e 600 units from TPoint(0,0)
    So you draw the image to that height using DrawBitmap and you will show only few parts for suppose 30.
    Now when you scroll down you want to remove the first part and show the 31st part. To show this draw the image from TPoint(0,-20) i.e negative y-axis so that the first part wont be visible and the 31st part will be visible.
    Similarly to show 32nd part move the drawing co-ordinate to TPoint(0,-40).

    In this way you can draw a large image. Please let me know for any concerns.
    B V N S Gangadhar Rao

Similar Threads

  1. Vertical scrolling in editor over a large image
    By hclemson in forum Symbian User Interface
    Replies: 2
    Last Post: 2012-02-23, 11:17
  2. scroll bars are not visible
    By smanikandan14 in forum Symbian User Interface
    Replies: 1
    Last Post: 2008-12-09, 12:42
  3. how to scroll horizontally ....the full screen
    By priya83 in forum Symbian User Interface
    Replies: 0
    Last Post: 2006-10-07, 07:42
  4. Replies: 0
    Last Post: 2004-08-06, 04:56
  5. Scroll Image
    By haieklu in forum Mobile Java General
    Replies: 3
    Last Post: 2003-11-11, 12:59

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×