Jump to content

Drawing in fabulous world !


Emilio_M

Recommended Posts

Posted

Okay thanks. But now, i want to draw a progress bar, how to calculate the correctly position with the % of the progress bar with distance included. ?

Thanks.

Posted

Here is my idea its also work :

1: You get the x position of the rectangle when the progress is 100%(eg: 345)

2: you do this calculation

100% -> 345

X -> ?

? =( 345÷100)*X

Posted
width = actualWidth - ( actualWidth * (distance/maxDistance) ) 
height = actualHeight - ( actualHeight * (distance/maxDistance) ) 

Thanks it's good !

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...