Skip to content

Example not working correctly in textAlign() reference #6056

@nikhilhvr

Description

@nikhilhvr

Most appropriate sub-area of p5.js?

  • Accessibility
  • Color
  • Core/Environment/Rendering
  • Data
  • DOM
  • Events
  • Image
  • IO
  • Math
  • Typography
  • Utilities
  • WebGL
  • Build Process
  • Unit Testing
  • Internalization
  • Friendly Errors
  • Other (specify if possible)

p5.js version

v1.5.0

Web browser and version

Microsoft Edge Version 110.0.1587.63 (Official build) (64-bit)

Operating System

Windows 10

Steps to reproduce this

Steps:

  1. Go to this website https://p5js.org/reference/#/p5/textAlign
  2. Need to Be Fixed:- The CENTER text not showing up in the center is not visible and the BOTTOM text is at the bottom.The CENTER and BOTTOM text are not visible.

p5js example

Snippet:

textSize(16);
strokeWeight(0.5);

line(0, 12, width, 12);
textAlign(CENTER, TOP);
text('TOP', 0, 12, width);

line(0, 37, width, 37);
textAlign(CENTER);
text('CENTER', 0, 37, width);

line(0, 62, width, 62);
textAlign(CENTER, BASELINE);
text('BASELINE', 0, 62, width);

line(0, 87, width, 87);
textAlign(BOTTOM);
textAlign(CENTER);
text('BOTTOM', 0, 87, width);

describe(`The names of the four vertical alignments (TOP, CENTER, BASELINE,
  and BOTTOM) rendered each showing that alignment's placement relative to a
  horizontal line.`);

Currently

I am working on this Issue

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions