processing / processing/processing4

screenX etc. "broken" with pixelDensity(2) combined with JAVA2D renderer

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

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

has attachment
主要言語
Java
スター
494
フォーク
183
平均マージ
4時間 39分
マージ済み PR(30日)
3

説明

Created by: clankill3r

The following code:

void setup() {
  size(600, 600, JAVA2D);
  pixelDensity(2);
  println(screenX(600, 0));
}

prints out 1200.

If I change the pixelDensity to 1 it prints out 600.

For P2D and P3D it will always be 600, no matter the pixelDensity (like it should be).

I compared the screenXImpl here are the results (not sure if this helps):

JAVA2D with pixelDensity 1

_JAVA2D_PD1

JAVA2D with pixelDensity 2

_JAVA2D_PD2

P2D with pixelDensity 1

_P2D_PD1

P2D with pixelDensity 2

_P2D_PD2

My first impression is that the pixelDensity 2 for JAVA2D is bit of a cheap hack. (But what do I know!).

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

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

はじめの一歩

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

調査の方向性

まず、提供されたスケッチをJAVA2Dレンダラーで実行し、pixelDensity 1と2におけるscreenXImplの動作を、issueに記載されたP2Dの結果と比較します。レンダラー固有のscreenXパスを追跡し、ピクセル密度にかかわらずscreenX(600, 0)が600を返すことを確認するとともに、他のレンダラーの既存の動作を維持します。

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

評価

技術スタック
java
領域
computer-graphics
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
42/100

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

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