-
David Thompson authored
This commit renders user-provided notes associated with specific scalar values on the interval-mode scalar bar. Previously, only the categorical mode rendered these annotations. Also, provide the scalar bar with an optional swatch to illustrate the color assigned to NaN values. Add an option to color leader lines from the scalar bar to the annotation labels by the corresponding scalar value. This commit also breaks the process of rebuilding the scalar bar into several virtual methods so that subclasses (particularly ParaView's `vtkPVScalarBarActor`) can reuse more of the base class functionality. The process is now separated into 2 phases: layout, where bounding boxes for scalar bar components are placed; and configuration, where actors are positioned and geometry is created. This includes some changes to text actor to support constrained placement and text size queries. Add a test for the new scalar bar options. There are now many more options controlling how the scalar bar behaves. In particular many settings interact with the way geometry is rendered: the lookup table may be indexed or not (thus tick marks may not be rendered); the orientation may be horizontal or vertical; annotations may be rendered or not; the NaN annotation may be omitted; leader lines to annotations may be colored by the scalar they annotate or by the label color; and the tick marks may precede or succeed the scalar bar. Also, we must test how empty labels are handled and how even vs odd numbers of labels affect placement (since the algorithm for placement behaves differently in these cases). We cannot perform a full factorial test, but do test independent configurations. Finally, this commit improves the performance of prominent value detection for primitive-type arrays (e.g., int, double) by avoiding the use of vtkVariant instances to hold the working set of distinct values during sampling. Change-Id: I852f9b497d5e6ab619d9d7b763f641c44e4869cf
55cb7e11