aboutsummaryrefslogtreecommitdiffstats
path: root/doc/c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2022-05-28 23:11:51 -0400
committerDavid Robillard <d@drobilla.net>2022-05-28 23:14:05 -0400
commit4dd1eac7c46f7be257ce10cb2ce6b79939650938 (patch)
tree608f9ff2b4622b0f237d959ed112f390545c49b1 /doc/c
parent574bf1e11d73059ec5e6099e6806d919e1ac22b0 (diff)
downloadpugl-4dd1eac7c46f7be257ce10cb2ce6b79939650938.tar.gz
pugl-4dd1eac7c46f7be257ce10cb2ce6b79939650938.tar.bz2
pugl-4dd1eac7c46f7be257ce10cb2ce6b79939650938.zip
Update documentation
Diffstat (limited to 'doc/c')
-rw-r--r--doc/c/view.rst11
1 files changed, 6 insertions, 5 deletions
diff --git a/doc/c/view.rst b/doc/c/view.rst
index 12f146d..016c4e3 100644
--- a/doc/c/view.rst
+++ b/doc/c/view.rst
@@ -28,13 +28,14 @@ For example:
.. code-block:: c
- const double defaultWidth = 1920.0;
- const double defaultHeight = 1080.0;
+ const PuglSpan defaultWidth = 1920;
+ const PuglSpan defaultHeight = 1080;
puglSetWindowTitle(view, "My Window");
- puglSetDefaultSize(view, defaultWidth, defaultHeight);
- puglSetMinSize(view, defaultWidth / 4.0, defaultHeight / 4.0);
- puglSetAspectRatio(view, 1, 1, 16, 9);
+ puglSetSizeHint(view, PUGL_DEFAULT_SIZE, 1920, 1080);
+ puglSetSizeHint(view, PUGL_MIN_SIZE, 640, 480);
+ puglSetSizeHint(view, PUGL_MIN_ASPECT, 1, 1);
+ puglSetSizeHint(view, PUGL_MAX_ASPECT, 16, 9);
There are also several :enum:`hints <PuglViewHint>` for basic attributes that can be set: