[vtk-developers] Interaction with color/opacity editors in vtkChartXY broken on retina display
Sebastien Jourdain
sebastien.jourdain at kitware.com
Mon May 29 09:26:21 EDT 2017
You need to set the size on the interactor.
> On May 29, 2017, at 03:42, Elvis Stansvik <elvis.stansvik at orexplore.com> wrote:
>
> 2017-05-29 11:40 GMT+02:00 Elvis Stansvik <elvis.stansvik at orexplore.com>:
>> 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?
>
> Ah, if I just resize the widget holding these editors a little, the
> behavior is correct from then on.
>
> So it must be some initialization problem, the editors are confused
> about their size on first show somehow.
>
> I'm sure I'll figure this out now, sorry for the noise.
>
> Elvis
>
>>
>> Elvis
>>
>>>
>>> Elvis
>>>
>>>>
>>>> Elvis
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Search the list archives at: http://markmail.org/search/?q=vtk-developers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtk-developers
>
More information about the vtk-developers
mailing list