Skip to content

Commit

Permalink
Fix some tutorial typos
Browse files Browse the repository at this point in the history
  • Loading branch information
ehopperdietzel committed Nov 13, 2023
1 parent 658fd0a commit 6cfbf7c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion doxygen/md/tutorial/04.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Chapter 4: Compositor Initialization

In this chapter, we will explore how to customize the initialization of Louvre::LCompositor. This includes setting up parameters like they keyboard map and output arrangements. This customization will serve as a foundation for overriding the behavior of other classes in upcoming chapters.
In this chapter, we will explore how to customize the initialization of Louvre::LCompositor. This includes setting up parameters like the keyboard map and output arrangements. This customization will serve as a foundation for overriding the behavior of other classes in upcoming chapters.

To begin, let's create a new Louvre::LCompositor subclass named `ECompositor` (with the "E" prefix denoting "Example Compositor"):

Expand Down
2 changes: 1 addition & 1 deletion doxygen/md/tutorial/05.md
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ Buffer coordinates represent the maximum granularity within an object, independe

### Surface Coordinates

Surface coordinates are a concept from the Wayland protocol but are not exclusive to surfaces. For instance, if one of your outputs has a resolution of 1000x1000px and you assigned it a scale of 2 (because it is HiDPI), the size of the output in buffer coordinates (Louvre::LOutput::sizeB()) would be the same (1000x1000), but in surface coordinates (Louvre::LOutput::size()), it would be 500x500. Surface coordinates are essentially defined as buffer coordinates divided by the buffer scale of the object. Using surface coordinates simplifies continuous transformations between scales and allows you to work in an consistent system while rendering.
Surface coordinates are a concept from the Wayland protocol but are not exclusive to surfaces. For instance, if one of your outputs has a resolution of 1000x1000px and you assigned it a scale factor of 2 (because it is HiDPI), the size of the output in buffer coordinates (Louvre::LOutput::sizeB()) would be the same (1000x1000), but in surface coordinates (Louvre::LOutput::size()), it would be 500x500. Surface coordinates are essentially defined as buffer coordinates divided by the scale factor of the object. Using surface coordinates simplifies continuous transformations across different scales and allows you to work in an consistent system while rendering.

In the draw operation, for instance, we use buffer coordinates to define the texture's subrect we want to draw and surface coordinates to define the destination rectangle on the output where we want to draw it. This approach ensures that if you're working with multiple outputs with different scales, the image gets automatically scaled by Louvre::LPainter, eliminating the need to handle transformations manually each time.

Expand Down

0 comments on commit 6cfbf7c

Please sign in to comment.