[vtkusers] vtkActor2D problem transparence/opacity

AlexUtrobin AlexUtrobin at yandex.ru
Wed Aug 10 02:49:45 EDT 2016


Hello! I use vtkScalarBarActor and vtkTextActor, they are not bright and
clear. I think it is a problem with all vtkActor2D. Below is the code and
the picture demonstrate the problem. Please, tell me how to solve the
problem.

        Java and VTK 7.0.

        vtkRenderWindowPanel mRenderWindowPanel1 = new
vtkRenderWindowPanel();
        mRenderWindowPanel1.GetRenderer().SetBackground(1, 1, 1);//White
        mRenderWindowPanel1.GetRenderer().ResetCamera();
        mRenderWindowPanel1.GetRenderWindow().PointSmoothingOn();
        mRenderWindowPanel1.GetRenderWindow().LineSmoothingOn();
        mRenderWindowPanel1.GetRenderWindow().PolygonSmoothingOn();
        mRenderWindowPanel1.setSize(jPanel1.getSize());
        jPanel1.add(mRenderWindowPanel1);

        vtkTextActor mActorTitle = new vtkTextActor();
        mActorTitle.GetTextProperty().SetFontFamily(4); //4-Шрифт из файла
        mActorTitle.GetTextProperty().SetFontFile("font.ttf");
        mActorTitle.GetTextProperty().SetFontSize(SizeTitle);
        try {
            mActorTitle.SetInput(new String(title.getBytes("UTF-8")));
        } catch (UnsupportedEncodingException ex) {
            Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null,
ex);
        }
        mActorTitle.SetDisplayPosition(5,
jPanel1.getSize().height-SizeTitle-6);
        mActorTitle.GetTextProperty().SetColor(0.0, 0.0, 0.0);
        mRenderWindowPanel1.GetRenderer().AddActor(mActorTitle);



<http://vtk.1045678.n5.nabble.com/file/n5739612/1.jpg> 



--
View this message in context: http://vtk.1045678.n5.nabble.com/vtkActor2D-problem-transparence-opacity-tp5739612.html
Sent from the VTK - Users mailing list archive at Nabble.com.


More information about the vtkusers mailing list