about summary refs log tree commit diff stats
path: root/src/render/renderdocument.nim
diff options
context:
space:
mode:
Diffstat (limited to 'src/render/renderdocument.nim')
-rw-r--r--src/render/renderdocument.nim10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/render/renderdocument.nim b/src/render/renderdocument.nim
index 27435633..b6bd1743 100644
--- a/src/render/renderdocument.nim
+++ b/src/render/renderdocument.nim
@@ -339,8 +339,8 @@ proc renderBlockBox(grid: var FlexibleGrid, box: BlockBox, x, y: LayoutUnit,
       if box.computed{"background-color"}.a != 0: #TODO color blending
         let ix = toInt(x)
         let iy = toInt(y)
-        let iex = toInt(x + box.width)
-        let iey = toInt(y + box.height)
+        let iex = toInt(x + box.size.w)
+        let iey = toInt(y + box.size.h)
         grid.paintBackground(box.computed{"background-color"}, ix, iy, iex,
           iey, box.node, window)
       if box.computed{"background-image"}.t == CONTENT_IMAGE and box.computed{"background-image"}.s != "":
@@ -348,10 +348,10 @@ proc renderBlockBox(grid: var FlexibleGrid, box: BlockBox, x, y: LayoutUnit,
         let s = "[img]"
         let w = s.len * window.ppc
         var ix = x
-        if box.width < w:
+        if box.size.w < w:
           # text is larger than image; center it to minimize error
           ix -= w div 2
-          ix += box.width div 2
+          ix += box.size.w div 2
         let x = toInt(ix div window.ppc)
         let y = toInt(y div window.ppl)
         if y >= 0 and x + w >= 0:
@@ -360,7 +360,7 @@ proc renderBlockBox(grid: var FlexibleGrid, box: BlockBox, x, y: LayoutUnit,
       if box of ListItemBox:
         let box = ListItemBox(box)
         if box.marker != nil:
-          grid.renderInlineContext(box.marker, x - box.marker.width, y, window)
+          grid.renderInlineContext(box.marker, x - box.marker.size.w, y, window)
 
     if box.inline != nil:
       assert box.nested.len == 0
'n146' href='#n146'>146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226