ILXL / ILXL/cpputils

Text object

オープン
#9 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
C++
スター
4
フォーク
1
PR マージ指標
30日以内にマージされた PR はありません

説明

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.
```

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

リンクされている CImg draw_text の例から始め、Text オブジェクトが size、color、value、およびレンダリング後の寸法をどのように公開すべきかを確認します。開発者がこれらのプロパティを設定し、テキストが指定された領域に収まるか確認するために width と height を取得できれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
cpp
領域
computer-graphics
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。