Skip to content
Snippets Groups Projects
Select Git revision
  • 7a767e72b8db7a3147e0ec1eeb6279a1cf8451d4
  • master default
  • cgnsUnstructured
  • partitioning
  • poppler
  • HighOrderBLCurving
  • gmsh_3_0_4
  • gmsh_3_0_3
  • gmsh_3_0_2
  • gmsh_3_0_1
  • gmsh_3_0_0
  • gmsh_2_16_0
  • gmsh_2_15_0
  • gmsh_2_14_1
  • gmsh_2_14_0
  • gmsh_2_13_2
  • gmsh_2_13_1
  • gmsh_2_12_0
  • gmsh_2_11_0
  • gmsh_2_10_1
  • gmsh_2_10_0
  • gmsh_2_9_3
  • gmsh_2_9_2
  • gmsh_2_9_1
  • gmsh_2_9_0
  • gmsh_2_8_6
26 results

Scale.cpp

Blame
  • Forked from gmsh / gmsh
    Source project has a limited visibility.
    drawContextFltkCairo.h 990 B
    // Gmsh - Copyright (C) 1997-2019 C. Geuzaine, J.-F. Remacle
    //
    // See the LICENSE.txt file for license information. Please report all
    // issues on https://gitlab.onelab.info/gmsh/gmsh/issues.
    //
    // Contributed by Jonathan Lambrechts
    
    #ifndef DRAW_CONTEXT_FLTK_CAIRO_H
    #define DRAW_CONTEXT_FLTK_CAIRO_H
    
    #include "GmshConfig.h"
    
    #if defined(HAVE_CAIRO)
    #include "drawContextFltk.h"
    
    typedef struct _cairo_surface cairo_surface_t;
    typedef struct _cairo cairo_t;
    
    class drawContextFltkCairo : public drawContextFltk {
      class queueString;
      queueString *_queue;
      cairo_surface_t *_surface;
      cairo_t *_cr;
      int _currentFontId;
      int _currentFontSize;
    
    public:
      void draw();
      drawContextFltkCairo();
      ~drawContextFltkCairo();
      double getStringWidth(const char *str);
      // int getStringHeight();
      // int getStringDescent();
      void flushString();
      void drawString(const char *str);
      void setFont(int fontid, int fontsize);
      std::string getName() { return "Cairo"; }
    };
    
    #endif
    
    #endif