Skip to content
This repository was archived by the owner on Dec 5, 2018. It is now read-only.

Conversation

@kaizensoze
Copy link

The result of this commit has two effects:

  1. A rounded rect is no longer unexpectedly translated.
  2. The top and left borders for rects and roundedRects are no longer cut off.

Resolves #219

A few concerns:

  • As I mentioned in test.js error #228, the tests as is fail (33 of them) and an additional one fails as a result of this PR (mega-rect.pde), which I suppose is expected, given how rects are now positioned differently since their borders don't get cut off.
  • Running npm start resulted in changes that aren't my own (the onComplete and undef stuff).
  • The negative translation for both rect and roundedRect doesn't seem to be doing anything.

Some test code to see the changes:

<!doctype html>
<html>
  <head>
    <meta charset="utf8">
    <title>Processing.js</title>
    <script src="processing.js"></script>
  </head>
  <body>
    <h1>Processing.js</h1>
    <script type="text/processing">
      void setup() {
        size(300, 300);
        noLoop();
      }

      void draw() {
        var largerRect = function(x, y, w, h, r1) {
          pushMatrix();
          scale(40);
          rect(x, y, w, h, r1);
          popMatrix();
        };

        strokeWeight(0.05);
        fill(240, 0, 0, 150);
        largerRect(0, 0, 3, 4);
        noFill();
        largerRect(0, 0, 3, 4, 1.5);
      }
    </script>
    <canvas></canvas>
  </body>
</html>

The result of this commit has two effects:

1) A rounded rect is no longer unexpectedly translated.
2) The top and left borders for rects and roundedRects are no longer cut
   off.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant