processing / processing/processing4
loadShape() problems with SVGs that have . starting a number in a path
オープン
まだ誰も着手していません。
has attachment
help wanted
- 主要言語
- Java
- スター
- 494
- フォーク
- 183
- 平均マージ
- 4時間 39分
- マージ済み PR(30日)
- 3
説明
Created by: benfry
Re-saving the SVG in 1.0 format with Illustrator instead of 1.1 will fix the issue, but the problem seems to be that a leading . in the SVG path code won't render properly, for instance:
M3,.6– parse toM,3,.6(may be fixed with https://github.com/processing/processing4/commit/9ef40ba48c284ae52e7eae759af325486ca85f1e)M.6.7– parse toM,.6, and.7- …etc
This caused a problem with the variable icons, which was fixed commit 805306fd1b4eeeac35bf1c29693d751edf349f57, so using the previous version of the SVGs should do the trick for testing.
Test code:
static final String[] names = {
"array", "boolean", "byte", "char", "double", "float",
"integer", "long", "object", "short", "string"
};
void setup() {
size(250, 550);
textAlign(LEFT, CENTER);
textSize(24);
fill(0);
int each = 50;
int pos = 0;
for (String name : names) {
PShape s = loadShape(name + ".svg");
shape(s, 0, pos, each, each);
text(name, 60, pos + each/2);
pos += each;
}
saveFrame("issue.png");
}

コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
loadShape() と SVG パスの解析エントリーポイントから始め、Issue で言及されている以前の SVG バージョンを使って、提供されたスケッチを再現します。M3,.6 や M.6.7 のようなパスのトークン化を確認します。先頭が小数点の座標が正しく解析され、可変アイコンが期待どおりに描画されれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java
- 領域
- computer-graphics
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 38/100