void VisWinAnnotations::SetAnnotationObjectOptions(const AnnotationObjectList &al) { for(size_t i = 0; i < (size_t)al.GetNumAnnotations(); ++i) { const AnnotationObject &annot = al[i]; if(i < annotations.size()) { // Set whether the annotation is active. annotations[i]->SetActive(annot.GetActive()); // // Let the annotation set its attributes with the annotation // object. // annotations[i]->SetOptions(annot); // // Set whether or not the annotation is visible. // annotations[i]->SetVisible(annot.GetVisible()); if(annotations[i]->GetVisible()) annotations[i]->AddToRenderer(); else annotations[i]->RemoveFromRenderer(); } } // Update the legends for the actors. UpdateLegends(); }
void VisWinAnnotations::CreateAnnotationObjectsFromList(const AnnotationObjectList &al) { for(int i = 0; i < al.GetNumAnnotations(); ++i) { const AnnotationObject &annot = al[i]; int annotType = int(annot.GetObjectType()); if(AddAnnotationObject(annotType, annot.GetObjectName())) annotations[annotations.size()-1]->SetOptions(annot); } }