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

fix rounded rect translation issue #229

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy