diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2017-04-22 07:53:17 -0700 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2017-04-22 07:53:17 -0700 |
commit | 4c6e8e280ba8f540bf1691ec1b427ad1d52401aa (patch) | |
tree | 9feba131d0530c812cb69268a3afa56dd6aa8f8b /src/modules/julia | |
parent | 406495a01b1de41abc1b9240096da3741155b6fd (diff) |
fb: add frame_{width,height} to fb_fragment_t
Modules need to know the overall dimensions of the frame the fragment
they're rendering is part of. Previously it wasn't really necessary
since the fragments supplied to the modules had always been the full
page, but that's changing.
This commit also changes the julia module to use the frame dimensions,
others will need updating as well.
Diffstat (limited to 'src/modules/julia')
-rw-r--r-- | src/modules/julia/julia.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/modules/julia/julia.c b/src/modules/julia/julia.c index 9e3dba2..ed8e30c 100644 --- a/src/modules/julia/julia.c +++ b/src/modules/julia/julia.c @@ -86,7 +86,7 @@ static void julia_render_fragment(fb_fragment_t *fragment) unsigned stride = fragment->stride / 4, width = fragment->width, height = fragment->height; uint32_t *buf = fragment->buf; float real, imag; - float realstep = 3.6f / (float)width, imagstep = 3.6f / (float)height; + float realstep = 3.6f / (float)fragment->frame_width, imagstep = 3.6f / (float)fragment->frame_height; /* Rather than just sweeping creal,cimag from -2.0-+2.0, I try to keep things confined * to an interesting (visually) range. TODO: could certainly use refinement. |