strokeWeight are scaled in Processing 2.1

edited November 2013 in Using Processing

Capture

As you can see from the picture above, the box after the scale() operation has a scaled thickness. This never happened in previous versions as far as I can remember. Also, it does not apply to points. Anyone else experiencing this?

It happens both in Mac iOS 10.7.5 and Windows 7.

I have managed to maintain thicknesses by inverse-scaling them, but I hope display thickness will be scale-independent again in the next release. :)

Comments

  • It's intended for stroke weight to scale. As you discovered, the inverse technique is the way around: strokeWeight(1/scalar)

  • Good to know, just took me a while to figure it out looking at some of my old sketches. I most cases it feels like its complicating things. At least for me... having to change strokeWeight for every element. I understand the intention though. Might be good to be able to turn it on and off by setting a scaleMode() or something that let you decide if scaling is applied to visual styles like the strokeWeight as well...

  • It does apply to points, and is quite a nuisance.

    I'm using Processing 2.1 and the Default Renderer to plot some graphs, using substantially different scaling factors in x and y.

    Here is the matrix 054.2857 000.0000 410.0000 000.0000 -000.1667 700.0000

    Under these conditions point() is plotting long horizontal lines, not points. There is no way of inverse scaling the strokeWeight to correct this.

    A solution would be for strokeWeight to take into account the matrix applying at the time it is called, and apply the appropriate inverses automatically. At present it seems only to deliver the required thickness in pixels when a unit matrix is in force.

Sign In or Register to comment.