processing / processing/processing4

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

未关闭
#557 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

has attachment
主要语言
Java
星标
494
派生
183
平均合并
4 小时 39 分钟
30 天内合并 PR
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. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先使用 JAVA2D 渲染器运行提供的 sketch,并将 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 摘要。