Pixels, Percents, and ???

I’m designing something which will take a coordinate value as a percentage or as a pixel. In HTML/CSS, you must explicitly mark pixel values with “px”. However, I do not have that option — pixels are the default.

Currently, I can indicate:

 • 120.5 (pixels)
 • 120.5px (pixels)
 • 120.5% (percent)

But I would also like to specify a simple scalar/multiplier:

 • 1.2 (multiplier)

Does anyone have any suggestion on what I can do to visually mark this as such?
Pixels, percents, and products?

Maybe
1.2x
Although that's too close to px for my liking.

Is this supposed to be user-facing? What do you need to do with the notation?
Last edited on
The "pixels" looks like an absolute value, like in:
1
2
3
void Foo::resize( Size value ) {
   this->bar = value;
}

The "percent" looks like a relative value, like in:
1
2
3
void Foo::resize( Scale value ) {
   this->bar *= value;
}

Multiplier is a relative value too.

Maybe
1.2*

(that your parser can convert to a percent?)
Yes, this is user-facing. And agreed, the x conflicts with stuff in other ways too.

I had come to the same conclusion with 1.2*.

I think I may just require users to say they are using pixels:

120px or $x:px

IDK yet.


[edit] Oh, yeah, this is a binary Tcl/Tk extension.
Last edited on
Topic archived. No new replies allowed.