Skip to content
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

Update p5.Image references #6867

Merged
merged 2 commits into from
Mar 19, 2024
Merged

Conversation

nickmcintyre
Copy link
Member

Preparing references in src/image/p5.Image.js for the new website.

PR Checklist

  • npm run lint passes
  • [Inline documentation] is included / updated

@Qianqianye @davepagurek @limzykenneth

* <a href="#/p5.Image">p5.Image</a> object. Colors are stored as numbers
* representing red, green, blue, and alpha (RGBA) values. `img.pixels` is a
* one-dimensional array for performance reasons.
* An array containing the color of each pixel in the image.
Copy link
Contributor

@Qianqianye Qianqianye Mar 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @nickmcintyre, could you share your thoughts on replacing p5.Image to 'image' in some of the one-line descriptions while keeping p5.Image in others?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Qianqianye my thoughts are "oops!" I suggest we use "image" in the one-line description and refer/link to p5.Image objects when it's helpful to clarify types in the long description.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @nickmcintyre.
I'd like to get @limzykenneth and @davepagurek's input on this. Since we are considering the possibility of surfacing the instance method references to the main reference page, would it be more or less confusing to include p5.Image in the references?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For cases where it is referencing things like type of value passed as arguments, I think it is probably better to use p5.Image to avoid ambiguity (eg. There is an Image constructor that creates HTMLImageElement and a selected <image> element for example). If the use is just descriptive or self-describing, such as in this case, I think it should be fine.

@Qianqianye Qianqianye merged commit ec635e2 into processing:main Mar 19, 2024
2 checks passed
@nickmcintyre nickmcintyre deleted the ref-p5-image branch May 6, 2024 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

3 participants