Skip to content

error when calling smooth() on PGraphics #272

Closed
@processing-bot

Description

@processing-bot

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions