processing / processing/libprocessing

Window size discrepancy on HighDPI monitor

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

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

主要言語
Rust
スター
69
フォーク
14
平均マージ
15日 22時間
マージ済み PR(30日)
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. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

提供された sketch の size(640, 360) 呼び出しから始め、2 種類のモニターでのウィンドウ作成と HighDPI の動作を比較します。実装内でウィンドウサイズ設定のエントリーポイントを追跡します。同じ sketch が HighDPI ディスプレイと標準ディスプレイで意図した一貫したウィンドウサイズを生成すれば完了です。

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

評価

技術スタック
python, rust
領域
desktop
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
52/100

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

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