Skip to content

error when calling smooth() on PGraphics #272

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
processing-bot opened this issue Sep 23, 2021 · 7 comments
Closed

error when calling smooth() on PGraphics #272

processing-bot opened this issue Sep 23, 2021 · 7 comments

Comments

@processing-bot
Copy link
Collaborator

In GitLab by @grauwald on Sep 23, 2021, 23:31

Description

When attempting to set smooth() on a PGraphics instance an error is thrown.

Expected Behavior

The processing JavaDocs show that a PGraphics instance can receive smooth()

Current Behavior

Calling smooth() on a PGraphics instance throws the following error:

Syntax error on token ".", invalid VariableDeclarator

Steps to Reproduce

  1. Run the following code
PGraphics gfx;

void setup() {
 
  gfx = createGraphics(width, height);
  gfx.smooth();
}

void draw() {
}
  1. Behold the error

Your Environment

  • Processing version: Processing 4.0b1
  • Operating System and OS version: Mac OS X 11.5.1 (20G80)
  • Other information: iMac (Retina 5K, 27-inch, 2019) Radeon Pro 570X 4 GB

Possible Causes / Solutions

smooth() works fine when applied to the top level of the app and seems to apply itself to subsequent PGraphics within. There is some mention that in Processing 3+ that smooth() can only be run once during setup. Perhaps there is a usage issue with smooth() and that it should be removed from the PGraphics spec.

@processing-bot
Copy link
Collaborator Author

Created by: KevinWorkman

I noticed the same problem, but with noSmooth() instead of smooth().

I filed a bug in the old repo before I realized this new repo existed, maybe it'll help with debugging: processing/processing#6227

@processing-bot
Copy link
Collaborator Author

Created by: KevinWorkman

Also, I just confirmed that going back to Processing 3 gets rid of the error.

@processing-bot
Copy link
Collaborator Author

Created by: benfry

@sampottinger is this a preprocessor regression?

@processing-bot
Copy link
Collaborator Author

In GitLab by @pavlus1 on Oct 7, 2021, 20:53

Seems to originate here:

protected void handleNoSmoothCall(ParserRuleContext ctx) {

@processing-bot
Copy link
Collaborator Author

Created by: sampottinger

It might be @benfry ill take a look

@processing-bot
Copy link
Collaborator Author

Created by: sampottinger

Sorry for the delay @benfry and @pavlus. Please see #288.

@processing-bot
Copy link
Collaborator Author

Created by: github-actions[bot]

This issue has been automatically locked. To avoid confusion with reports that have already been resolved, closed issues are automatically locked 30 days after the last comment. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant