Text object
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- C++
- Estrellas
- 4
- Forks
- 1
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
Design a Text object that allows you to set its size, color, and value. Its most important feature is to retrieve the text width and height so that developers can check whether they fit in a given region. For example, the feature allows you to check whether the text could fit inside a box of a given height and width.
A possible solution would be to create an image object, drawtext on it, then retrieve the objects resulting width and height as described [here](https://stackoverflow.com/questions/24190327/getting-the-dimensions-of-a-rendered-text-in-cimg-library). The suggested code is shown below for reference:
```cpp
CImg imgtext;
unsigned char color = 1;
imgtext.draw_text(0,0,"Hello guys !",&color,0,1,23); // Draw with font height 23.
// Now, imgtext.width() and imgtext.height() gives you the dimensions you want.
```
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Comience con el ejemplo vinculado de CImg draw_text y determine cómo debería exponer un objeto Text size, color, value y las dimensiones renderizadas. Se considera terminado cuando los desarrolladores pueden establecer esas propiedades y recuperar width y height para comprobar si el texto cabe en una región especificada.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- cpp
- Área
- computer-graphics
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100