Estoy creando un proyecto p5 en el que creo texto a partir de una cadena, lo envuelvo con la opción 'PALABRA' y lo agrego al lienzo. Como ejemplo:
let font; function preload() { font = loadFont('SomeFont.otf'); } function setup() { createCanvas(400, 400); background(220); enteredText = 'This is an exmple of a long text that should split'; textWrap(WORD); textSize(30); textAlign(CENTER, CENTER); textFont(font); textLeading(0.83 * 30); rectMode(CENTER); fill(0); noStroke(); text(enteredText, width / 2, height / 2, 20 , 20); } Me gustaría obtener una forma delimitadora para el texto, para agregar algunas imágenes en el marco. ¿Cómo puedo obtener esta forma? Pensé en usar textBounds() , pero tampoco tengo la cadena multilínea ya que textWrap() lo está haciendo por mí. ¿Algunas ideas? textWrap() por mí mismo se siente como una exageración ya que hay muchas propiedades para ello.
¡Gracias!