func FxReleaseClonkFadeOutTimer (object pTarget, int iEffectNumber, int iEffectTime) { // Ausfaden if (!GetClrModulation (pTarget)) SetClrModulation(RGB(255, 255, 255), pTarget); SetClrModulation(DoRGBaValue(GetClrModulation(pTarget), Min(15, 255-GetRGBValue(GetClrModulation(pTarget),0)), 0), pTarget); // Wenn Overlay extra moduliert wird, auch extra ausfaden if (GetObjectBlitMode (pTarget) & 4) SetColorDw(DoRGBaValue(GetColorDw(pTarget), Min(15, 255-GetRGBValue(GetColorDw(pTarget),0)), 0), pTarget); if(GetRGBValue(GetColorDw(pTarget), 0) == 255 || GetRGBValue(GetClrModulation(pTarget), 0) == 255) return (-1); }
void BiHeatmap::showHeatmap() { this->view = vtkSmartPointer<vtkGraphLayoutView>::New(); this->creatDataForHeatmap(); if(this->treedata1 == true && this->treedata2 == true) this->drawPoints(); this->SetInteractStyle(); this->plane = vtkSmartPointer<vtkPlaneSource>::New(); this->plane->SetXResolution(this->num_cols); this->plane->SetYResolution(this->num_rows); this->cellData = vtkSmartPointer<vtkFloatArray>::New(); int index = 0; for (int i = 0; i < this->num_rows; i++) for(int j = 0; j < this->num_cols; j++) cellData->InsertNextValue(index++); this->celllut = vtkSmartPointer<vtkLookupTable>::New(); this->celllut->SetNumberOfTableValues(this->num_rows*this->num_cols); this->celllut->SetTableRange(0, this->num_rows*this->num_cols - 1); ////////////////////// this->celllut->Build(); int k = 0; for(int i = 0; i < this->num_rows; i++) { for(int j = 0; j < this->num_cols; j++) { rgb rgb = GetRGBValue( this->data[num_rows - i - 1][j]); celllut->SetTableValue(k++, rgb.r, rgb.g, rgb.b); } } this->WriteFile("data_for_maping.txt"); this->plane->Update(); this->plane->GetOutput()->GetCellData()->SetScalars(cellData); this->cellmapper = vtkSmartPointer<vtkPolyDataMapper>::New(); this->cellmapper->SetInputConnection(plane->GetOutputPort()); this->cellmapper->SetScalarRange(0, this->num_rows*this->num_cols - 1); this->cellmapper->SetLookupTable(celllut); this->cellactor = vtkSmartPointer<vtkActor>::New(); this->cellactor->SetMapper(cellmapper); //show scalar bar vtkSmartPointer<vtkLookupTable> scalarbarLut = vtkSmartPointer<vtkLookupTable>::New(); scalarbarLut->SetTableRange (-6, 13); scalarbarLut->SetNumberOfTableValues(COLOR_MAP_SIZE); for(int index = 0; index<COLOR_MAP_SIZE;index++) { rgb rgbscalar = COLORMAP[index]; scalarbarLut->SetTableValue(index, rgbscalar.r, rgbscalar.g, rgbscalar.b); } scalarbarLut->Build(); vtkSmartPointer<vtkScalarBarActor> scalarBar = vtkSmartPointer<vtkScalarBarActor>::New(); scalarBar->SetLookupTable(scalarbarLut); scalarBar->SetTitle("Color Map"); scalarBar->SetNumberOfLabels(10); scalarBar->GetTitleTextProperty()->SetColor(0,0,0); scalarBar->GetTitleTextProperty()->SetFontSize (10); scalarBar->GetLabelTextProperty()->SetColor(0,0,0); scalarBar->GetTitleTextProperty()->SetFontSize (10); scalarBar->SetMaximumHeightInPixels(1000); scalarBar->SetMaximumWidthInPixels(100); this->view->GetRenderer()->AddActor(cellactor); this->view->GetRenderer()->AddActor2D(scalarBar); this->showFeatureNames(); this->view->Render(); }