diff libinterp/corefcn/ft-text-renderer.cc @ 22059:b1256fb38777

dim_vector: replace 7 constructors with single variadic template (patch #9030). * dim-vector.h (dim_vector::dim_vector): a new constructor that uses variadic template to create constructors with any number of dimensions. This replaces all the current macros which only support up to 7 dimensions. The change requires arguments beyond the first two, explicitely be ints. * ft-text-renderer.cc: explicit convert doubles to octave_idx_type.
author Carnë Draug <carandraug@octave.org>
date Sat, 18 Jun 2016 04:08:18 +0100
parents 278fc29b69ca
children 8de49f15e182
line wrap: on
line diff
--- a/libinterp/corefcn/ft-text-renderer.cc	Thu Jul 07 10:19:19 2016 +0200
+++ b/libinterp/corefcn/ft-text-renderer.cc	Sat Jun 18 04:08:18 2016 +0100
@@ -671,8 +671,9 @@
         }
       else
         {
-          pixels = uint8NDArray (dim_vector (4, bbox(2), bbox(3)),
-                                 static_cast<uint8_t> (0));
+          dim_vector d (4, octave_idx_type (bbox(2)),
+                        octave_idx_type (bbox(3)));
+          pixels = uint8NDArray (d, static_cast<uint8_t> (0));
           xoffset = compute_line_xoffset (line_bbox.front ());
           line_yoffset = -bbox(1)-1;
           yoffset = 0;