Hi,
How can I turn the decimals off when using pixel as unit?
I always get a n.5 position when drawing guides and images.
IE. Trying to draw a 50px square in x=100px y=100px I get 100.5/100.5 instead. Using guidelines I get the 100/100 position but a 50.5x50.5 square.
What am I making wrong? Specially because decimals in pixels is absurd.
Thank you
How to turn decimals off when working with pixels?
-
Simon
- Mitglied
- Beiträge: 40
- Registriert: Do 23 Jan 2014 21:35
How to turn decimals off when working with pixels?
Zuletzt geändert von Simon am Mi 04 Feb 2015 16:47, insgesamt 1-mal geändert.
-
Martin Huber
- Entwickler

- Beiträge: 4298
- Registriert: Di 19 Nov 2002 15:49
Re: How to turn decimals off when working with pixels?
People usually turn on a 1 pixel grid, if they need pixel-aligned positions (in the Preferences "Display > Grid" and in the menu "View > Alignment Helpers > Align To Grid").Simon hat geschrieben:How can I turn the decimals off when using pixel as unit?
What does "draw images" mean? Creating an image using the Layer Tool?Simon hat geschrieben:I always get a n.5 position when drawing guides and images.
I think there is something missing.Simon hat geschrieben:(...) Using I get the 100/100 position but a 50.5x50.5 px square.
Sub-pixel precision is needed quite often, especially if you are creating print documents, icons or things like that.Simon hat geschrieben:What am I making wrong? Specially because decimals in pixels is absurd.
Martin
-
Simon
- Mitglied
- Beiträge: 40
- Registriert: Do 23 Jan 2014 21:35
Re: How to turn decimals off when working with pixels?
Thank you, here is the trick: Edit > Options > Display > Grid > Grid DistanceMartin Huber hat geschrieben:People usually turn on a 1 pixel grid, if they need pixel-aligned positions (in the Preferences "Display > Grid" and in the menu "View > Alignment Helpers > Align To Grid").
Do you know what is the Grid Offset for?
Yes and moving guide lines.Martin Huber hat geschrieben:What does "draw images" mean? Creating an image using the Layer Tool?
Fixed, I used guidelines.Martin Huber hat geschrieben:I think there is something missing.Simon hat geschrieben:(...) Using I get the 100/100 position but a 50.5x50.5 px square.
Some programs allow to define the number of decimals with every unit available in it, specially pixels, that way you can simply set it to none or to many for the working styles that you suggest. This function is more efficient than pixel grids because all the things you do are fixed, very useful for Web design, otherwise, you have to be aware to avoid the decimals created by mistake.Martin Huber hat geschrieben:Sub-pixel precision is needed quite often, especially if you are creating print documents, icons or things like that.
It would be nice to set the decimals per unit in PhotoLine.
-
Herbert123
- Mitglied
- Beiträge: 2452
- Registriert: Sa 12 Mai 2012 21:38
Re: How to turn decimals off when working with pixels?
I agree with Martin that sub-pixel positioning can be valuable, even for web and screen work.
Having said that, creating a 1px grid is not really a solution: nudging an object still shifts objects by a decimal increment. And Simon is correct in saying that for web and screen design having an option to position all layer types and transforms to the pixel grid. Grids are meant to be used for GRIDS, not to emulate a pixel grid - using the regular grid to do so limits our options as well: because we can no longer create a modular grid to base our designs on. (Guides would then have to be abused to create such a grid, and then we can no longer set overall guides without creating a real mess in terms of alignment and organization.)
We can already do this for vector layers, and it would be great to have this option amended to include guides, bitmap, and text layers as well. Because often web, game, and screen designers require bitmap layers to be positioned and transformed according to the pixel grid.
Then again, having an option for a pixel grid is quite valuable to designers as well.
In short, ideally we would:
1) have an option to display a pixel grid automatically when zooming in (this is what Photoshop and other image editors also offer);
2) need the possibility to turn on pixel grid alignment for guides, bitmaps and text layers identical to what we can already do with vector shape layers. And no more decimal values at all ought to be allowed after activating a layers pixel grid alignment and/or document pixel grid alignment.
A secondary problem is visible with vector shapes: snapping a rectangle to a perfect square grid or four guides, for example, results in the 1px stroke to be partly drawn inside, and partly outside. It would be great to be able to have an option to draw a stroke on the outside, inside, and the center of a stroke to mitigate and control these type of issues.
These additions would be extremely useful. I mentioned it before: for bitmap layers with sharp edged artwork I am now forced to manually check and remove the decimals for each bitmap I include in a web, game level, or app layout I design. That has become utterly tiresome indeed and is prone to errors .
Having said that, creating a 1px grid is not really a solution: nudging an object still shifts objects by a decimal increment. And Simon is correct in saying that for web and screen design having an option to position all layer types and transforms to the pixel grid. Grids are meant to be used for GRIDS, not to emulate a pixel grid - using the regular grid to do so limits our options as well: because we can no longer create a modular grid to base our designs on. (Guides would then have to be abused to create such a grid, and then we can no longer set overall guides without creating a real mess in terms of alignment and organization.)
We can already do this for vector layers, and it would be great to have this option amended to include guides, bitmap, and text layers as well. Because often web, game, and screen designers require bitmap layers to be positioned and transformed according to the pixel grid.
Then again, having an option for a pixel grid is quite valuable to designers as well.
In short, ideally we would:
1) have an option to display a pixel grid automatically when zooming in (this is what Photoshop and other image editors also offer);
2) need the possibility to turn on pixel grid alignment for guides, bitmaps and text layers identical to what we can already do with vector shape layers. And no more decimal values at all ought to be allowed after activating a layers pixel grid alignment and/or document pixel grid alignment.
A secondary problem is visible with vector shapes: snapping a rectangle to a perfect square grid or four guides, for example, results in the 1px stroke to be partly drawn inside, and partly outside. It would be great to be able to have an option to draw a stroke on the outside, inside, and the center of a stroke to mitigate and control these type of issues.
These additions would be extremely useful. I mentioned it before: for bitmap layers with sharp edged artwork I am now forced to manually check and remove the decimals for each bitmap I include in a web, game level, or app layout I design. That has become utterly tiresome indeed and is prone to errors .
/*---------------------------------------------*/
System: Win10 64bit - i7 920@3.6Ghz, p6t Deluxe v1, 48gb (6x8gb RipjawsX), Nvidia GTX1080 8GB, Revodrive X2 240gb, e-mu 1820, 2XSamsung SA850 (2560*1440) and 1XHP2408H 1920*1200 portrait
System: Win10 64bit - i7 920@3.6Ghz, p6t Deluxe v1, 48gb (6x8gb RipjawsX), Nvidia GTX1080 8GB, Revodrive X2 240gb, e-mu 1820, 2XSamsung SA850 (2560*1440) and 1XHP2408H 1920*1200 portrait
-
greenmorpher
- Mitglied
- Beiträge: 943
- Registriert: Di 29 Mai 2007 14:42
- Wohnort: Rabaul, Papua New Guinea
Re: How to turn decimals off when working with pixels?
I'm with Herbert on this. It would be to advantage to be able to specify in ANY measurement whether we want to use whole numbers only or decimals, and if decimals, to how many places. What it means is that if, for example, you resize a figure or an image, it goes to the nearest whole number or whatever you have specified.
In addition, being able to specify whether a line is on the outside of an edge, straddling the edge or inside the edge can be extremely important if you are doing stuff that has to fit together exactly.
Both these facilities are available, and always have been so far as I can remember, in the good old Canvas X (on Mac; something rather higher on Windows) since about the beginning of time and very handy they are too.
cheers, geoff
In addition, being able to specify whether a line is on the outside of an edge, straddling the edge or inside the edge can be extremely important if you are doing stuff that has to fit together exactly.
Both these facilities are available, and always have been so far as I can remember, in the good old Canvas X (on Mac; something rather higher on Windows) since about the beginning of time and very handy they are too.
cheers, geoff
-
Herbert123
- Mitglied
- Beiträge: 2452
- Registriert: Sa 12 Mai 2012 21:38
Re: How to turn decimals off when working with pixels?
I am worried that Photoline uses a SVG based library for its vector tools. If that is the case, adding support for inside and outside strokes may be either very difficult or even impossible, because the SVG specification does not support these stroke options.greenmorpher hat geschrieben: In addition, being able to specify whether a line is on the outside of an edge, straddling the edge or inside the edge can be extremely important if you are doing stuff that has to fit together exactly.
/*---------------------------------------------*/
System: Win10 64bit - i7 920@3.6Ghz, p6t Deluxe v1, 48gb (6x8gb RipjawsX), Nvidia GTX1080 8GB, Revodrive X2 240gb, e-mu 1820, 2XSamsung SA850 (2560*1440) and 1XHP2408H 1920*1200 portrait
System: Win10 64bit - i7 920@3.6Ghz, p6t Deluxe v1, 48gb (6x8gb RipjawsX), Nvidia GTX1080 8GB, Revodrive X2 240gb, e-mu 1820, 2XSamsung SA850 (2560*1440) and 1XHP2408H 1920*1200 portrait
-
Simon
- Mitglied
- Beiträge: 40
- Registriert: Do 23 Jan 2014 21:35
Re: How to turn decimals off when working with pixels?
This feature is available using;Herbert123 hat geschrieben:It would be great to be able to have an option to draw a stroke on the outside, inside, and the center of a stroke to mitigate and control these type of issues.
Layer Style > Outline outside
Layer Style > Outline inside
It is a different approach than that used by Canvas but works brilliant and raster features in PL are superior.
There are many ways to produce the control over decimals, at least in pixels, from those already mentioned to provide more attributes in View>Pixel Mode.
Hopefully we will be able to enjoy it in near future.