processing / processing/libprocessing

Window size discrepancy on HighDPI monitor

未關閉
#198 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

主要語言
Rust
星號
69
分支
14
平均合併
15 天 22 小時
30 天內合併 PR
3

描述

Running the same sketch on a HighDPI monitor appears to create a larger window than necessary.

4K HighDPI monitor

Image

1080p monitor

Image

Version: mewnala 0.0.7

Code

"""
Redraw. 
  
The redraw() function makes draw() execute once.    
In this example, draw() is executed once every time 
the mouse is clicked. 
"""
from mewnala import *

y = 180

def setup():
    """ 
    The statements in the setup() function 
    execute once when the program begins.
    """
    size(640, 360)    # Size should be the first statement
    stroke(255)         # Set line drawing color to white
    no_loop()


def draw():
    """
    The statements in draw() are executed until the
    program is stopped. Each statement is executed in
    sequence and after the last line is read, the first
    line is executed again.
    """
    global y
    background(0)     # Set the background to black
    y = y - 4
    if (y < 0):
        y = height
    line(0, y, width, y)


def mouse_pressed():
    redraw()

run()

貢獻指南

這個儲存庫沒有索引到貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

從提供的 sketch 中的 size(640, 360) 呼叫開始,比較兩種顯示器類型上的視窗建立和 HighDPI 行為。追蹤實作中的視窗大小設定進入點;當同一個 sketch 在 HighDPI 和標準顯示器上都產生預期且一致的視窗大小時,即表示完成。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
python, rust
領域
desktop
Issue 類型
缺陷
難度
3/5
預估耗時
1-2 天
活躍度
冷清
描述清晰度
基本清楚
新手友好度
52/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。