[vtk-developers] Interaction with color/opacity editors in vtkChartXY broken on retina display

Elvis Stansvik elvis.stansvik at orexplore.com
Mon May 29 05:40:06 EDT 2017


2017-05-29 10:49 GMT+02:00 Elvis Stansvik <elvis.stansvik at orexplore.com>:
> 2017-05-26 12:52 GMT+02:00 Elvis Stansvik <elvis.stansvik at orexplore.com>:
>> Hi all,
>>
>> We're using
>>
>>     vtkColorTransferFunctionItem
>>     vtkColorTransferControlPointsItem
>>
>>     vtkCompositeTransferFunctionItem
>>     vtkCompositeControlPointsItem
>>
>> in a vtkChartXY for editing of color/opacity transfer functions,
>> similar I believe to what ParaView does.
>>
>> I noticed on a retina Mac that interaction seems off. Clicking one
>> place seems to lead to a response at the wrong point in the editor.
>>
>> Some experimenting later, it seems that I can click in the upper half
>> of the composite editor (which we use for opacity), and I get a
>> response at the corresponding place in the lower half of it.
>>
>> Anyone seen this and know if there's something I can do about it? It's
>> a showstopper for our application on Mac.
>>
>> In the color editor (the vtkColorTransferFunctionItem /
>> vtkColorTransferControlPointsItem pair), I can't get a response at all
>> :/
>>
>> Grateful for any tips from people using these classes on retina Mac.
>>
>> We're using VTK 8.0.0.rc1.
>
> I tried PV 5.4-RC3 on the Mac, and there the editors work alright, so
> I must be doing something wrong.
>
> I'll have a look at the PV code to see what I'm missing (pointers welcome).

Hm, the only thing I can see that PV was doing differently is calling
setEnableHiDPI(true).

I tried doing this myself. That made the text in the chart the correct
size (it was wrong before), but I'm still having the strange mouse
click offset problem (the click is registered in the wrong place).

Any ideas?

Elvis

>
> Elvis
>
>>
>> Elvis


More information about the vtk-developers mailing list