glutils.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*************************************************************************
  2. * Copyright (c) 2011 AT&T Intellectual Property
  3. * All rights reserved. This program and the accompanying materials
  4. * are made available under the terms of the Eclipse Public License v1.0
  5. * which accompanies this distribution, and is available at
  6. * https://www.eclipse.org/legal/epl-v10.html
  7. *
  8. * Contributors: Details at https://graphviz.org
  9. *************************************************************************/
  10. #pragma once
  11. #ifdef _WIN32
  12. #include "windows.h"
  13. #endif
  14. #include <glcomp/opengl.h>
  15. #include <glcomp/glcompdefs.h>
  16. #include <stdbool.h>
  17. #ifdef __cplusplus
  18. extern "C" {
  19. #endif
  20. int GetOGLPosRef(int x, int y, float *X, float *Y);
  21. float GetOGLDistance(float l);
  22. void to3D(int x, int y, float *X, float *Y, float *Z);
  23. double point_to_lineseg_dist(glCompPoint p, glCompPoint a, glCompPoint b);
  24. extern void glCompCalcWidget(glCompCommon * parent,
  25. glCompCommon * child, glCompCommon * ref);
  26. extern void glCompDrawRectangle(glCompRect * r);
  27. void glCompDrawRectPrism(glCompPoint *p, float w, float h, float b, float d,
  28. glCompColor *c, bool bumped);
  29. void glCompSetColor(glCompColor c);
  30. float distBetweenPts(glCompPoint A, glCompPoint B, float R);
  31. extern int is_point_in_rectangle(float X, float Y, float RX, float RY, float RW,float RH);
  32. #ifdef __cplusplus
  33. }
  34. #endif