Jump to content
You must now use your email address to sign in [click for more info] ×

[Solved] There's a way to fill rectangle depends of percentage??


Recommended Posts

I would like to fill up a rectangle depending of percent..
 

Let's say I want a rectangle and I want it to fill it up to 50%, I can do it creating 2 rectangles, 1 transparent and the another which will be the color, if I want it 50% I can use the snapping tool and resize it untill half, but there's a way that I can do it with numbers instead resizing it using the mouse?? 
Let's say I have another rectangle but I want it fill it up up to 28%, using the mouse I can maybe guess an average, but it wouldn't be exact, u know...
Like I would like to do multiple rectangles, like a bar, and in top of each ones write up top the percentage number and the rectangle will show it the percentage graphically, Idk if I explained well.

Link to comment
Share on other sites

You can probably do that with a linear gradient fill but getting a ‘clean’ non-gradient transition between the colours can be tricky – see attached screenshot. You need to create extra gradient stops and then slide two over each other carefully.

image.thumb.png.14ab33d53aec0102772d68fc6c556e7a.png

 

Edited by GarryP
Added better screenshot.
Link to comment
Share on other sites

10 minutes ago, Marc L said:


Yes, you can put a percentage, watch my video 😉 (It's easier, my English is not great...)

 

 

Woow, that's what I was looking for, so damn easy and I didn't know about that feature. Thanks so much.

I didn't heard anything on the video, if what you mean about ur English is what you wrote, your English is perfect.

 

Thanks again.

Link to comment
Share on other sites

34 minutes ago, N.P.M. said:

To add to this;

You can simply put in the percentage into the transformfield, so no need to add it to the end

But I think, if you put just the percentage by it self, it will calculate the X% of the canvas maybe.. In the case of the video you multiply the object size (in this case the rectanlge) by the percentage you want. In that way technically you sayin "I want the X percentage of this number" and it return the size. 

Link to comment
Share on other sites

Other example…

In Numbers (or Excel) you can easily create a graphic from the data you have, and then you can copy that graphic in PDF format.

After that, you can easily paste it in an affinity document…

Another way of doing… I think easier if you have plenty of bars…

image.thumb.jpeg.7e5b99a5df1059e9114dd3af9af9753f.jpeg

MacBook Pro 16 pouces (3456 × 2234), 2021 / Apple M1 Pro / 16 Go / macOS Ventura Version 13.4.1 (22F82)
+ 31,5 pouces (2560 × 1440) + 27 pouces (1080 × 1920) + iPad (8th generation) / iPadOS 17.2 + Apple Pencil + 

Macmini6,2 Quad-Core Intel Core i7 16 Go / macOS Catalina version 10.15.7 (19H2026)
MacBookAir6,2 Intel Core i5 double cœur 4 Go / macOS Big Sur version 11.7.7 (20G1345)

Licence Universelle Affinity V2 updated to 2.3.0

Link to comment
Share on other sites

17 hours ago, GarryP said:

Did you try it?

The ipad version don’t have a way to write percent symbol. But tried the math though. I also have the desktop version, but didn’t try in there yet. If it work by just writing the percentage number, my apology for doubt.

Link to comment
Share on other sites

This is the first mention (which I can see in this thread) that you are using an iPad (in a Desktop questions section of the forums).
Does the iPad keyboard not have a percentage symbol?
When you are entering a value, what options do you have for typing values?
(I don’t have an iPad so I don’t know how things work on that sort of thing.)

Link to comment
Share on other sites

5 hours ago, GarryP said:

Does the iPad keyboard not have a percentage symbol?

It does have a % symbol. On my US English version, it is the shifted Z key & can be entered in text fields by swiping down on the Z or alternately by tapping the ".?123" key (the shift operator that changes the keyboard to show the shifted characters of the default keys).

All 3 1.10.8, & all 3 V2.4.1 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.8; Affinity Designer 1.108; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

7 hours ago, GarryP said:

This is the first mention (which I can see in this thread) that you are using an iPad (in a Desktop questions section of the forums).
Does the iPad keyboard not have a percentage symbol?
When you are entering a value, what options do you have for typing values?
(I don’t have an iPad so I don’t know how things work on that sort of thing.)

Yeah, I also have the desktop version, but been busy to turn on the pc..

 

When you tap the value area to start typing a value, instead show you the iPad keyboard, it popup a small calculator ane simple calculator, it have numbers and the operation symbols (/, *, +, -). It have no percentage symbol.

Link to comment
Share on other sites

8 minutes ago, djjss said:

When you tap the value area to start typing a value, instead show you the iPad keyboard, it popup a small calculator ane simple calculator, it have numbers and the operation symbols (/, *, +, -). It have no percentage symbol.

OK, for that instead of a percent you can tap the division or multiplication symbol followed by a number, so for example if the initial value is 45px, leave the 45 in place & then enter "/2" or "*.5"  & tap OK to get 22.25 px.

All 3 1.10.8, & all 3 V2.4.1 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.8; Affinity Designer 1.108; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

3 hours ago, R C-R said:

OK, for that instead of a percent you can tap the division or multiplication symbol followed by a number, so for example if the initial value is 45px, leave the 45 in place & then enter "/2" or "*.5"  & tap OK to get 22.25 px.

Yes, that's what I did.. It works like I expected..

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.