processing / processing/processing4
Cursor translucency problem?
还没有人认领这个 Issue。
- 主要语言
- Java
- 星标
- 494
- 派生
- 183
- 平均合并
- 4 小时 39 分钟
- 30 天内合并 PR
- 3
描述
Created by: lenrik1589
Description
Inconsistent blending of cursor image when using translucency in the image
Expected Behavior
Using cursor(img, x, y) and exporting the image and using it with X should produce same visual result
Current Behavior
System:
P2D:
(colored sections are 100/255 alpha)
(colored sections are 10/255 alpha)
Steps to Reproduce
- create image with translucency
- apply using
cursor(img, x, y) - observe how translucent colors interact with the backdrop
- export the image.save(file)
- create left_ptr using xcursorgen
- import as a cursor into the system and apply
- observe as cursor now blends differently with the background
(might include code a little later, when come home)
Your Environment
- Processing version: 4.3 (imported through gradle as
implementation("com.github.micycle1:processing-core-4:4.+")) - Operating System and OS version: Linux (gemeric arch, kernel 6.6.7)
- Other information:
- Wayland Plasma 6.0 Beta 1
- kwin 5.90.0
- Xwayland 23.2.3-1
- mesa 23.3.1
- Java: 21
Note: the discrepancy existed even when i was using a native x11 session with stable Plasma 5 and processing 3.5 in the processing editor
IIRC there might be a workaround, of using a different renderer, but i can not use it as i found no way to consistently resize a window after initialization or programmatically close other windows (produced by the same program but different PApplet) with anything other than P2D or P3D as i currently use reflection to gain access internal resize method and ((PSurfaceJOGL)surface).finish() ((GLWindow)surface.native).dispose() to close windows
(the older version of description
particularly,
i am running into issue that using P2D (xwayland + opengl) as the renderer for all my sketch windows and other graphics, my custom cursor (using cursor(img, hotspotX, hotspotY)) seems to render incorrectly compared to cursor theme made by exporting the same images as png files, and assembling into a xcursor image to be used with the system
)
Possible Causes / Solutions
It might be a discrepancy between how OpenGL and KWin handle cursors
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先,在报告的 Linux 环境中使用 Processing 4.3、P2D 渲染器和 cursor(img, x, y) 重现该问题。将半透明光标与通过 xcursorgen 组装的导出图像进行比较,包括不同的 alpha 示例。当 sketch 中的光标和系统光标都能与背景一致地混合时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- java
- 领域
- computer-graphics, desktop
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 25/100