I've placed an ellipse in my model, enabled Transparency in the View Attributes, filled the shape and changed the shape's Transparency value. The element displays with the expected transparency. In my tool's code, I create an ellipse, and set it's fill and transparency:
IAreaFillPropertiesEdit *fillProps = dynamic_cast<IAreaFillPropertiesEdit*>(&eeh.GetHandler()); UInt32 fillColor = 23; bool alwaysFill = true; fillProps->AddSolidFill(eeh, &fillColor, &alwaysFill); ElementPropertiesSetterPtr propSet = ElementPropertiesSetter::Create(); propSet->SetTransparency(.95); propSet->Apply(eeh);
However, when the ellipse displays in _OnDynamicFrame(), the ellipse is not transparent (I have ensured that the view's transparency is enabled). Might that be due to the way I'm setting the RedrawElems object?
RedrawElems redrawTool; redrawTool.SetDrawMode(DRAW_MODE_TempDraw); redrawTool.SetDrawPurpose(DrawPurpose::Dynamics); redrawTool.SetDynamicsViews(IViewManager::GetActiveViewSet(), ev.GetViewport()); redrawTOol.DoRedraw(eeh);
Thanks,
Bruce
Bruce Reeves SRNS said:I've placed an ellipse in my model
Bruce Reeves SRNS said:I'm only displaying the ellipse during dynamics - it's never written to the file
It's not easy to follow your questions when you write contradictory statements!
Regards, Jon Summers LA Solutions
Maybe I should have said it differently...
Bruce Reeves SRNS said:I've placed an ellipse in my model, enabled Transparency in the View Attributes, filled the shape and changed the shape's Transparency value. The element displays with the expected transparency.
The ellipse I placed displayed fine.
Bruce Reeves SRNS said:In my tool's code, I create an ellipse, and set it's fill and transparency
Bruce Reeves SRNS said:However, when the ellipse displays in _OnDynamicFrame(), the ellipse is not transparent
The issue is setting the Transparency while in my tool...
Brien Bastings said:You might want to consider using a view decoration in your tool instead of element dynamics.
I will take a look at that. I've only (so far) used an raster icon as a view decoration...
Bruce Reeves SRNS said:I will take a look at view decoration
Here's an article about view decoration and view transients.
You can draw pure geometry (e.g. an ellipse) or a transient element (i.e. an ellipse element) using IViewTransients, as well as sprites. Pure geometry might be what you want...
IViewTransients