[vtk-developers] ChartParallelCoordinates clearing AxesSelections on resize

Marcus D. Hanwell marcus.hanwell at kitware.com
Mon Sep 27 16:38:09 EDT 2010


Sorry, poor choice of words and not what I meant...I think you are using it
in the right way, and it should hopefully be fixed now.

Marcus

On Mon, Sep 27, 2010 at 4:25 PM, Eric E. Monson <emonson at cs.duke.edu> wrote:

> "Abusing"? How should I be getting rid of the line, if not
> vtkPen::SetLineType(vtkPen::NO_PEN)?
>
> -Eric
>
> On Sep 27, 2010, at 4:02 PM, Marcus D. Hanwell wrote:
>
> Hi Eric,
>
> Good catch! You are abusing the line type to get rid of the outline, and
> that was not getting set correctly after I refactored the code. If you pull
> and rebuild now commit 25b58dd should take care of that.
>
> Thanks for catching this - I will adjust one of the unit tests to use the
> line types so that this will be caught in future.
>
> Marcus
>
> On Mon, Sep 27, 2010 at 10:27 AM, Eric E. Monson <emonson at cs.duke.edu>wrote:
>
>> Here's the block that was ending up with with a black line around
>> it. Setting the pen opacity to zero (after setting the line type) works fine
>> for getting rid of the black line.
>>
>> Thanks,
>> -Eric
>>
>>
>>   // Semi-transparent box over non-valid scales
>>   if (this->DrawSets)
>>     {
>>     int oldLineType = painter->GetPen()->GetLineType();
>>
>>
>>     painter->GetBrush()->SetColor(254, 254, 254, 150);
>>     painter->GetPen()->SetLineType(0);
>>     int opaquePadding = 4;  // extra padding so axes and points
>> themselves are covered
>>     for (int i = 0; i < this->VisibleColumns->GetNumberOfTuples();
>> i+=this->NumPerSet)
>>       {
>>       if ((i+this->NumPerSet-1) <=
>> static_cast<int>(this->Storage->Axes.size()) &&
>>           (i/this->NumPerSet == this->CurrentScale+1)) // opaque on next
>> scale
>>         {
>>         vtkAxis* axis0 = this->Storage->Axes[i];
>>         vtkAxis* axis1 =
>> this->Storage->Axes[this->Storage->Axes.size()-1];
>>         painter->DrawRect(axis0->GetPoint1()[0]-opaquePadding,
>>                           this->Point1[1]-opaquePadding,
>>
>>  axis1->GetPoint1()[0]-axis0->GetPoint1()[0]+(2*opaquePadding),
>>
>>  this->Point2[1]-this->Point1[1]+(2*opaquePadding));
>>         }
>>       }
>>
>>     painter->GetPen()->SetLineType(oldLineType);
>>
>>     }
>>
>>
>> On Sep 27, 2010, at 10:18 AM, Marcus D. Hanwell wrote:
>>
>> On Mon, Sep 27, 2010 at 9:43 AM, Eric E. Monson <emonson at cs.duke.edu>wrote:
>>
>>> Hey Marcus,
>>>
>>> That looks great -- thanks for figuring out the right way to do it.
>>>
>>> I'm having a strange problem after rebuilding, though: I have a variant
>>> on the parallel coordinates chart that draws some extra decorations on the
>>> plot. One of these is a semi-transparent white rectangle. Before the paint
>>> calls I set
>>>
>>>    painter->GetBrush()->SetColor(254, 254, 254, 150);
>>>    painter->GetPen()->SetLineType(0);
>>>
>>> but the rectangle now shows up with a black outline around it...
>>>
>>> Has there been some change to the 2D drawing classes lately that might be
>>> causing this? (I can set the pen opacity to 0 to get rid of this black
>>> border line, but it just started showing up with this pull.)
>>>
>>> Over the weekend I spent some time refactoring the 2D API in order to
>> optimize some of the drawing operations (ellipse rendering in particular).
>> Could you send me all of that block of rendering code? It would be good to
>> add it to a regression test, as everything seemed to be coming back clear
>> from the regression tests.
>>
>> Thanks,
>>
>> Marcus
>> --
>> Marcus D. Hanwell, Ph.D.
>> R&D Engineer, Kitware Inc.
>> (518) 881-4937
>>
>>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20100927/433ed701/attachment.html>


More information about the vtk-developers mailing list