Skip to content

Commit ce0a627

Browse files
committed
Docs: for rtd, upgrade sphinx/breathe versions, use furo theme
I think this looks better. Also a few minor tweaks to typos and misquotes.
1 parent 3b8807d commit ce0a627

File tree

7 files changed

+23
-15
lines changed

7 files changed

+23
-15
lines changed

src/doc/conf.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@
8989
#
9090
#html_theme = 'alabaster'
9191
#html_theme = 'astropy-sphinx-theme'
92-
html_theme = 'sphinx_rtd_theme'
92+
# html_theme = 'sphinx_rtd_theme'
93+
html_theme = 'furo'
9394

9495
# Add any paths that contain custom static files (such as style sheets) here,
9596
# relative to this directory. They are copied after the builtin static files,

src/doc/imagebufalgo.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -850,8 +850,8 @@ Shuffling channels
850850
.. code-tab:: py
851851

852852
# Paste fg.exr on top of bg.exr, offset by (100,100)
853-
Bg ImageBuf("bg.exr")
854-
Fg ImageBuf("fg.exr")
853+
Bg = ImageBuf("bg.exr")
854+
Fg = ImageBuf("fg.exr")
855855
ImageBufAlgo.paste (Bg, 100, 100, 0, 0, Fg)
856856

857857
.. code-tab:: bash oiiotool

src/doc/imageioapi.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,11 @@ and the documentation of individual ImageIO plugins for details).
6969
Non-owning string views: ``string_view``
7070
==========================================
7171

72-
.. doxygenclass:: OIIO::string_view
72+
.. cpp:type:: using string_view = basic_string_view<char>;
73+
74+
`string_view` is a synonym for a non-mutable `string_view<char>`.
75+
76+
.. doxygenclass:: OIIO::basic_string_view
7377
:members:
7478

7579
|

src/doc/oiiotool.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ The usual programming constructs are supported:
246246

247247
* Conditionals : `--if` *condition* `--then` *commands...* `--else` *commands...* `--endif`
248248

249-
* General looping: `--while` *condition* *commands...*
249+
* General looping: `--while` *condition* *commands...* `--endwhile`
250250

251251
* Iteration : `--for` *variable* *range* *commands...* `--endfor`
252252

@@ -2369,8 +2369,8 @@ current top image.
23692369
23702370

23712371
.. option:: --sub
2372-
-- subc <value>
2373-
-- subc <value0,value1,value2...>
2372+
--subc <value>
2373+
--subc <value0,value1,value2...>
23742374

23752375
Replace the *two* top images with a new image that is the pixel-by-pixel
23762376
difference between the first and second images (`--sub`), or subtract a
@@ -2388,8 +2388,8 @@ current top image.
23882388

23892389

23902390
.. option:: --mul
2391-
-- mulc <value>
2392-
-- mulc <value0,value1,value2...>
2391+
--mulc <value>
2392+
--mulc <value0,value1,value2...>
23932393

23942394
Replace the *two* top images with a new image that is the pixel-by-pixel
23952395
multiplicative product of those images (`--mul`), or multiply all pixels
@@ -2419,8 +2419,8 @@ current top image.
24192419
24202420

24212421
.. option:: --div
2422-
-- divc <value>
2423-
-- divc <value0,value1,value2...>
2422+
--divc <value>
2423+
--divc <value0,value1,value2...>
24242424

24252425
Replace the *two* top images with a new image that is the
24262426
pixel-by-pixel, channel-by-channel result of the first image divided by

src/doc/requirements.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
sphinx >= 3.0
2-
breathe == 4.27.0
1+
sphinx >= 5.0
2+
breathe == 4.34.0
33
sphinx-tabs
4+
furo==2022.6.21

src/include/OpenImageIO/span.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,14 @@ OIIO_INLINE_CONSTEXPR oiio_span_size_type dynamic_extent = -1;
4242

4343

4444

45-
/// span<T> is a non-owning, non-copying, non-allocating reference to a
45+
/// `span<T>` is a non-owning, non-copying, non-allocating reference to a
4646
/// contiguous array of T objects known length. A 'span` encapsulates both a
4747
/// pointer and a length, and thus is a safer way of passing pointers around
4848
/// (because the function called knows how long the array is). A function
4949
/// that might ordinarily take a `T*` and a length could instead just take a
5050
/// `span<T>`.
5151
///
52-
/// `A span<T>` is mutable (the values in the array may be modified). A
52+
/// A `span<T>` is mutable (the values in the array may be modified). A
5353
/// non-mutable (i.e., read-only) reference would be `span<const T>`. Thus,
5454
/// a function that might ordinarily take a `const T*` and a length could
5555
/// instead take a `span<const T>`.

src/include/OpenImageIO/string_view.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ OIIO_NAMESPACE_BEGIN
4040
/// and a length. This is analogous to C++17 std::string_view, but supports
4141
/// C++14.
4242
///
43+
/// Note: `string_view` is an alias for `basic_string_view<char>`.
44+
///
4345
/// A function that takes a string input (but does not need to alter the
4446
/// string in place) may use a string_view parameter and accept input that
4547
/// is any of char* (C string), string literal (constant char array), a

0 commit comments

Comments
 (0)