… | |
… | |
1317 | PPCODE: |
1317 | PPCODE: |
1318 | { |
1318 | { |
1319 | int line, x; |
1319 | int line, x; |
1320 | |
1320 | |
1321 | pango_layout_index_to_line_x (self->pl, index, trailing, &line, &x); |
1321 | pango_layout_index_to_line_x (self->pl, index, trailing, &line, &x); |
|
|
1322 | #if !PANGO_VERSION_CHECK (1, 17, 3) |
1322 | /* pango bug: line is between 1..numlines, not 0..numlines-1 */ |
1323 | /* pango bug: line is between 1..numlines, not 0..numlines-1 */ |
1323 | |
1324 | --line; |
|
|
1325 | #endif |
1324 | EXTEND (SP, 2); |
1326 | EXTEND (SP, 2); |
1325 | PUSHs (sv_2mortal (newSViv (line - 1))); |
1327 | PUSHs (sv_2mortal (newSViv (line))); |
1326 | PUSHs (sv_2mortal (newSViv (x / PANGO_SCALE))); |
1328 | PUSHs (sv_2mortal (newSViv (x / PANGO_SCALE))); |
1327 | } |
1329 | } |
1328 | |
1330 | |
1329 | void |
1331 | void |
1330 | line_x_to_index (DC::Layout self, int line, int x) |
1332 | line_x_to_index (DC::Layout self, int line, int x) |