Skip to content

Commit 4b03644

Browse files
committed
::Lattice colours must match points x,y
1 parent 2927b96 commit 4b03644

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/PDL/Graphics/TriD/Objects.pm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,7 @@ sub new {
263263
my %less = %$options; delete @less{qw(Lines)};
264264
my @colordims = $colors->dims;
265265
PDL::barf "Lattice: colours must be 3,x,y: got (@colordims)" if @colordims != 3 or $colordims[0] != 3;
266+
PDL::barf "Lattice: colours' x,y must equal points: got colour=(@colordims) points=($x,$y)" if $colordims[1] != $x or $colordims[2] != $y;
266267
$this->add_object(PDL::Graphics::TriD::Triangles->new($points->clump(1..2), $faceidx, $colors->clump(1..$colors->ndims-1), \%less));
267268
}
268269
if ($shading == 0 or $options->{Lines}) {

0 commit comments

Comments
 (0)