×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Feb 2010
    Posts
    45

    Question Storing the drawing region

    Code:
    if(first==1)
      g.drawRegion(flashmap, rowclip[0], colclip[0], 42, 60, 0, row[0], col[0], Graphics.TOP|Graphics.LEFT); //1st Row 1st Col
    	
    if(first==2)
      g.drawRegion(flashmap, rowclip[4], colclip[4], 100, 60, 0, row[4], col[4], Graphics.TOP|Graphics.LEFT);//2nd Row 2nd Col
    		
    if(first==3)
      g.drawRegion(flashmap, rowclip[2], colclip[2], 60, 60, 0, row[2], col[2], Graphics.TOP|Graphics.LEFT);//1st Row 3rd Col

    Now in the above mention condition whichever is true i want to store it somewhere so that by referring it i can use it whenever i need so how can i do it. I want to store the drawing region so how can i do that.

  2. #2
    Super Contributor
    Join Date
    Mar 2008
    Location
    The Capital of INDIA
    Posts
    4,328

    Re: Storing the drawing region

    Hey,

    Come on, you can use the Boolean flags and can set one out of them as true. And alter you can check that flag, if this is true then you have so and so drawn area else you do not.
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

  3. #3
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,087

    Re: Storing the drawing region

    Code:
    if(first==1)
    g.drawRegion(flashmap, rowclip[0], colclip[0], 42, 60, 0, row[0], col[0], Graphics.TOP|Graphics.LEFT); //1st Row 1st Col

    if(first==2)
    g.drawRegion(flashmap, rowclip[4], colclip[4], 100, 60, 0, row[4], col[4], Graphics.TOP|Graphics.LEFT);//2nd Row 2nd Col

    if(first==3)
    g.drawRegion(flashmap, rowclip[2], colclip[2], 60, 60, 0, row[2], col[2], Graphics.TOP|Graphics.LEFT);//1st Row 3rd Col
    Now in the above mention condition whichever is true i want to store it somewhere so that by referring it i can use it whenever i need so how can i do it. I want to store the drawing region so how can i do that.
    Instead of drawing directly on the Canvas, create a blank image (of the canvas size ) and draw it on the image first (fetcfhing the Graphics g from the blank image instaed of Canvas) and then place it on the Canvas and you can keep that Image in memory to display anytime alter in your app any where.

    thanks,
    ~Amitabh

Similar Threads

  1. ERROR
    By bharathibodepudi in forum Symbian
    Replies: 4
    Last Post: 2009-11-20, 11:09
  2. create Dynamic SettingItemList
    By CSB in forum Symbian
    Replies: 5
    Last Post: 2009-08-27, 09:11
  3. Problem to call audio recorder example in view
    By FrankTheFox in forum Symbian
    Replies: 9
    Last Post: 2009-03-04, 14:18
  4. how to cut some part of Image
    By mshouab in forum Mobile Java Media (Graphics & Sounds)
    Replies: 2
    Last Post: 2006-08-04, 09:05

Posting Permissions

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