Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Java
  4. Piccolo with Java Drawing & Positioning

Piccolo with Java Drawing & Positioning

Scheduled Pinned Locked Moved Java
questionjavagraphicshelp
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    massaslayer
    wrote on last edited by
    #1

    Hello! First question: I need to draw something like this in Piccolo, and I don't have a clue to get started with that: Image Second question: I have a moving node on

    m_canvas.getCamera().addChild(node);

    I move it (scale it) by using the following code:

    m_canvas.getCamera().animateToPositionScaleRotation(-1,-1, m_canvas.getCamera().getScale()+0.2,0, 1000);

    It scales fine but it always moves position like x +10 & y+10 and I can't figure out a way to get it scale in the same place. And when the scale reaches a certain point it has to be replaces with another node so I just do

    m_canvas.getCamera().removeAllChildren();

    is that the correct way? Final questions - Is there a way for restricting the area where objects may go? So that the an node can't get dragged off screen? - What is the right way to draw a line in the middle of the canvas so I can split the Window in 2 seperate areas? (This line can't be scalled) Thanks a lot to anyone who can help! Greetz!

    D 1 Reply Last reply
    0
    • M massaslayer

      Hello! First question: I need to draw something like this in Piccolo, and I don't have a clue to get started with that: Image Second question: I have a moving node on

      m_canvas.getCamera().addChild(node);

      I move it (scale it) by using the following code:

      m_canvas.getCamera().animateToPositionScaleRotation(-1,-1, m_canvas.getCamera().getScale()+0.2,0, 1000);

      It scales fine but it always moves position like x +10 & y+10 and I can't figure out a way to get it scale in the same place. And when the scale reaches a certain point it has to be replaces with another node so I just do

      m_canvas.getCamera().removeAllChildren();

      is that the correct way? Final questions - Is there a way for restricting the area where objects may go? So that the an node can't get dragged off screen? - What is the right way to draw a line in the middle of the canvas so I can split the Window in 2 seperate areas? (This line can't be scalled) Thanks a lot to anyone who can help! Greetz!

      D Offline
      D Offline
      David Skelly
      wrote on last edited by
      #2

      Your question seems pretty specific to the Piccolo framework and my guess is that there probably aren't too many people on this forum who have used it a lot. Have you tried posting your question on the Piccolo Users' group? You may have more chance of getting an answer there. http://code.google.com/p/piccolo2d/[^]

      M 1 Reply Last reply
      0
      • D David Skelly

        Your question seems pretty specific to the Piccolo framework and my guess is that there probably aren't too many people on this forum who have used it a lot. Have you tried posting your question on the Piccolo Users' group? You may have more chance of getting an answer there. http://code.google.com/p/piccolo2d/[^]

        M Offline
        M Offline
        massaslayer
        wrote on last edited by
        #3

        Thanks for the info!

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups