Commit graph

337 commits

Author SHA1 Message Date
Simon Hausmann
9da1bc7eb6 tutorial: separate out the rust code into .rs files
That way even the "incomplete" snippets can be compile tested as only
the anchors will be pulled into the docs but the complete file can be
compile-tested in the future.
2021-06-15 19:08:08 +02:00
Simon Hausmann
fbf011abf2 Fix formatting
Don't use xml entity encoding for >
2021-06-15 17:33:16 +02:00
Simon Hausmann
cf54d56177 Add missing license header 2021-06-15 15:51:48 +02:00
Simon Hausmann
8f55c493b8 Fix link to video 2021-06-15 15:30:45 +02:00
Simon Hausmann
810a753cb9 Add .60 syntax highlighting 2021-06-15 15:30:26 +02:00
Simon Hausmann
1a3c879ee9 Add the last two missing "chapters" from the tutorial blog post 2021-06-15 15:20:48 +02:00
Simon Hausmann
ae0a08ecdd Initial conversion of the memory game tutorial to mdbook
This is the Rust version and it's still missing the wasm chapter.
There's also other bits missing, such as syntax checking, highlighting, etc.
2021-06-15 14:38:40 +02:00
Olivier Goffart
ee00c9eb92 Rename maximum- and minimum- properties to max- and min-
Issue #259
2021-06-14 10:28:30 +02:00
Olivier Goffart
2483425d57 Add abs() 2021-06-11 14:17:47 +02:00
Simon Hausmann
410376a916 Fix doc typo 2021-06-08 09:07:27 +02:00
Olivier Goffart
ce34ff87d0 Finish support for callback aliases
cc #111
2021-06-07 20:40:36 +02:00
Olivier Goffart
6a4cd0087f Apply suggestions from code review
Co-authored-by: Simon Hausmann <simon.hausmann@sixtyfps.io>
2021-06-07 10:48:09 +02:00
Olivier Goffart
715d38903f Allow to omit the type of aliases 2021-06-07 10:48:09 +02:00
Simon Hausmann
ea8e8318b6 Trim the text example a little
So that perhaps we can avoid the horizontal scrollbar
2021-05-25 12:58:13 +02:00
Simon Hausmann
843a2c9e7a Fix doc syntax error 2021-05-25 11:48:28 +02:00
Simon Hausmann
d7a8d03475 Attempt at improving the Text docs
Try to clarify the line breaking behavior with an example.
2021-05-25 11:31:05 +02:00
Olivier Goffart
8c6eb65f1c Few adaptations of the renamed viewer 2021-05-22 09:30:57 +02:00
Simon Hausmann
cc9d5e09f0 Add support for clip on Path elements
This allows clipping the viewbox conveniently.
2021-05-21 19:51:00 +02:00
Simon Hausmann
11ab32f54f Fix typo in viewbox docs 2021-05-21 19:51:00 +02:00
Simon Hausmann
e7bc91c804 Add support for specifying the viewbox of path elements 2021-05-21 19:51:00 +02:00
Simon Hausmann
a7ce64657c Restore source compatibility for drop-shadow-blur
Let's keep source compatibility and define `drop-shadow-blur` to be a radius.
The CSS spec says that the standard deviation is half of the radius.

We just need to scale again and increase the shadow rect to make sure that no borders are visible.
2021-05-20 12:14:05 +02:00
Simon Hausmann
bb7b301b10 GL backend: new box drop shadow implementation
This replaces the box gradient with a new implementation that
behaves like the HTML Canvas element, by applying a gaussian
blur to the alpha of the rectangle to shadow.

The drop-shadow-blur property is changed to be now just a "level", like
the HTML Canvas shadowBlur property, which is defined to be half of the
standard deviation of the gaussian blur to be applied.
2021-05-20 08:50:02 +02:00
Olivier Goffart
1f8c9169c8
Update install_qt.md 2021-05-19 12:26:10 +02:00
Simon Hausmann
60e8554b74
Add missing question mark in docs 2021-05-19 12:16:50 +02:00
Olivier Goffart
f84a4a54d3 Doc and changelog upgrade 2021-05-18 10:23:06 +02:00
Olivier Goffart
fbdbe69fe7 Window: make hight and width fixed size, preferred-* property set the initial size
Issue #227
2021-05-18 10:23:06 +02:00
Olivier Goffart
91ed04a72c Make length (still the default for all property) be the logical length
And a new `physical_length` is now the physical_length unit

Note: this does not change the runtime part yet
2021-04-21 17:15:19 +02:00
Olivier Goffart
f76a33319c Document the opacity 2021-04-15 15:13:19 +02:00
Simon Hausmann
dc12a22780 Add small comment to the image docs regarding image-fit and aspect ratio 2021-04-15 08:28:22 +02:00
Olivier Goffart
ce6aa06964 Fix the doc test
A newline is required so it can match the end of the snippet
2021-04-14 18:52:36 +02:00
Simon Hausmann
7a681001cd Provide a short example for the custom font import 2021-04-14 18:28:24 +02:00
Simon Hausmann
595d1dbac0 Add documentation to the language reference about font handling
... and specifically custom fonts
2021-04-14 11:22:19 +02:00
Simon Hausmann
6a1191c5a5 Add Window.default-font-weight
This completes the font properties that can be set as default.
2021-04-14 11:16:22 +02:00
Olivier Goffart
80b236489e Add a clip property that can be set to the Rectangle 2021-04-12 18:48:43 +02:00
Olivier Goffart
e67deebc76 Make rgb() and rgba() a macro that can take 3 or 4 arguments
and that accept both percent or integer

Closes #139
2021-04-12 15:19:15 +02:00
Seo Sanghyeon
0a76f40093 Add rgb function 2021-04-12 13:24:46 +02:00
Simon Hausmann
e69c9b1487 Document the image-fit and size behavior
Closes #168
2021-04-09 15:19:20 +02:00
Olivier Goffart
287670c140 CI: Split the C++ test driver in a different run
This allows to paralelize better.
And also to remove the cpp from the default workspace so it is
not build by default and the ffi feature will not be build by default
2021-03-16 16:55:49 +01:00
Olivier Goffart
87ad4fe59e Rename Object to Struct in the language reference 2021-03-16 12:32:24 +01:00
Olivier Goffart
c840b046ae Rename the "resource" type to "image" 2021-03-10 17:24:31 +01:00
Simon Hausmann
b591f7de2c Add Window.default-font-size
This allows getting rid of the `DemoText` element in the printer demo
2021-03-02 13:33:43 +01:00
Simon Hausmann
27bdb4d481 Added Window.default-font-family
One step towards getting rid of `DemoText` in the printer demo
2021-03-02 13:25:21 +01:00
Simon Hausmann
391d0152f0 Add Color::brighter/darker functions
These are exposed in .60 as well as in Rust and C++ and implemented by
converting to HSV color space and adjusting the brightness (value).
2021-02-24 10:49:27 +01:00
Olivier Goffart
5727a4cf02 implement square root 2021-02-20 08:53:08 +01:00
Simon Hausmann
7cea088a2c Add support for letter-spacing in text
This is conveniently supported by femtovg and Qt
2021-02-16 22:14:50 +01:00
Simon Hausmann
2dd5ea61bb Add support for Path.fill-rule
For some reason it's not working with the Qt renderer though
2021-02-10 14:08:32 +01:00
Simon Hausmann
f64f3f6804 Prospective doc and link warning fix
Try to use the correct anchor
2021-02-10 11:42:21 +01:00
Olivier Goffart
f7a76dc352 Add ImageFit::cover, and fix ImageFit::contain 2021-02-09 10:52:04 +01:00
Olivier Goffart
431ce88326 sin/cos/tan and asin/acos/atan 2021-02-08 12:23:31 +01:00
Olivier Goffart
49c7300907 Support for if else in statements 2021-02-05 13:53:37 +01:00