You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Sketchup.html
+49-3
Original file line number
Diff line number
Diff line change
@@ -1351,7 +1351,7 @@ <h2>
1351
1351
1352
1352
1353
1353
<spanclass="summary_desc"><divclass='inline'>
1354
-
<p>The size_viewport method changes the pixel size of the viewport and SketchUp window.</p>
1354
+
<p>The <spanclass='object_link'><ahref="#resize_viewport-class_method" title="Sketchup.resize_viewport (method)">Sketchup.resize_viewport</a></span> method changes the pixel size of the viewport and SketchUp window.</p>
<p>The size_viewport method changes the pixel size of the viewport and SketchUp window. This can be useful for producing a consistent behavior in automatic testing, regardless of the display resolution.</p>
5901
+
<divclass="note notetag">
5902
+
<strong>Note:</strong>
5903
+
<divclass='inline'>
5904
+
<p>In SketchUp 2024.0 and later this method doesn't behave correctly in all cases on Windows. The passed values are internally converted to logical pixels, rounded and converted back to physical pixels. This means certain sizes, such as 1000 px at 150% scaling, cannot be accurately set.</p>
5905
+
5906
+
<p>As a workaround in you can use sizes that are evenly divisible with common scale factors, if you depend on pixel perfect sizes.</p>
5907
+
5908
+
<preclass="code"><codeclass=""><spanclass='comment'># Changes by 1 px :(
<p>The <spanclass='object_link'><ahref="#resize_viewport-class_method" title="Sketchup.resize_viewport (method)">resize_viewport</a></span> method changes the pixel size of the viewport and SketchUp window. This can be useful for producing a consistent behavior in automatic testing, regardless of the display resolution.</p>
0 commit comments