Unverified Commit 8c1a146f authored by YUQIAO ZENG's avatar YUQIAO ZENG Committed by GitHub
Browse files

Merge pull request #7 from cmu462/yuqiao

Typo fix: top-left
parents bae9a254 a584ffc8
...@@ -234,7 +234,7 @@ Once you have correctly implemented `set_viewbox()`, your solution will respond ...@@ -234,7 +234,7 @@ Once you have correctly implemented `set_viewbox()`, your solution will respond
In this task, you will implement `rasterize_image()` in `software_renderer.cpp`. In this task, you will implement `rasterize_image()` in `software_renderer.cpp`.
To keep things very simple, we are going to constrain this problem to rasterizing image elements that are positioned on the SVG canvas via translations and scaling, **but not rotations**. Therefore, `rasterize_image()` should render the specified image into an axis-aligned rectangle on screen whose top-level coordinate is `(x0, y0)` and whose bottom-right coordinate is `(x1, y1)`. Your implementation should adhere to the following specification: To keep things very simple, we are going to constrain this problem to rasterizing image elements that are positioned on the SVG canvas via translations and scaling, **but not rotations**. Therefore, `rasterize_image()` should render the specified image into an axis-aligned rectangle on screen whose top-left coordinate is `(x0, y0)` and whose bottom-right coordinate is `(x1, y1)`. Your implementation should adhere to the following specification:
- The image element should cover all screen samples inside the specified rectangle. - The image element should cover all screen samples inside the specified rectangle.
- For each image, texture space spans a [0-1]^2 domain as described in class. That is, given the example above, the mapping from screen-space to texture-space is as follows: `(x0, y0)` in screen space maps to image texture coordinate `(0, 0)` and `(x1, y1)` maps to `(1, 1)`. - For each image, texture space spans a [0-1]^2 domain as described in class. That is, given the example above, the mapping from screen-space to texture-space is as follows: `(x0, y0)` in screen space maps to image texture coordinate `(0, 0)` and `(x1, y1)` maps to `(1, 1)`.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment