GithubHelp home page GithubHelp logo

Comments (2)

grotius-cnc avatar grotius-cnc commented on May 26, 2024

Hi,

I solved this.
Somehow it isn't using the freeimage options when doing a cmake ..

After $ mkdir build && cd build && cmake ..
open /build/CMakeCache.txt
line 1078, USE_FREEIMAGE:BOOL=ON
$ cmake ..

Code for testing that worked ok

        Standard_Integer aWidth=500,aHeight = 500;
        BRepBuilderAPI_MakeFace aFace(gp_Pln(gp_Pnt(0,0,0),gp_Dir(0,0,1)),0,Standard_Real(aWidth),0,Standard_Real(aHeight));
        AIS_TexturedShape *aTextShape=new AIS_TexturedShape(aFace.Shape());
        aTextShape->SetTextureFileName("/home/user/Desktop/Qt-Graphics_Widget/libwallpaper/LinuxCNC-Wallpaper.png");
       // aTextShape->SetTextureFileName(Graphic3d_NOT_2D_GRASS); // enum Graphic3d_NameOfTexture2D
        aTextShape->SetTextureMapOn();
        aTextShape->SetDisplayMode(3);
        m_context->Display(aTextShape,Standard_False);

Or

    // https://sourceforge.net/projects/freeimage/
      Standard_CString FileName("/home/user/Desktop/Qt-Graphics_Widget/libwallpaper/LinuxCNC-Wallpaper.png");
      Aspect_FillMethod FillStyle(Aspect_FM_STRETCH);//Aspect_FM_STRETCH
      Standard_Boolean update(Standard_True);
      m_view->SetBackgroundImage(FileName, FillStyle, update) ;

Possible dependencies:

sudo apt-get install tcllib tklib tcl-dev tk-dev libfreetype-dev libx11-dev libgl1-mesa-dev libfreeimage-dev rapidjson-dev
sudo apt-get install libfreeimage3 libfreeimage-dev ffmpeg

from oce.

grotius-cnc avatar grotius-cnc commented on May 26, 2024

By another attempt, i did :
cmake .. -D USE_FREEIMAGE:BOOL=ON

from oce.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.