public static void CreateCommonFonts() { ErrorCode err; //fontText = new GLTextFont("HelveticaNeueText_12.png", new Vector2(17.0f, 23.0f), meshQuad); //fontText = new GLTextFont2(new System.Drawing.Font("Helvetica Neue", 14.0f)); fontText = new GLTextFont(Global.EXE_DIR + "HelveticaNeueText_8.png", new Vector2(10.0f, 17.0f), meshQuad); if ((err = GL.GetError()) != ErrorCode.NoError) { throw new Exception(err.ToString()); } fontText2 = new GLTextFont2(new System.Drawing.Font("Consolas", 12.0f)); if ((err = GL.GetError()) != ErrorCode.NoError) { throw new Exception(err.ToString()); } fontTextSmall = new GLTextFont2(new System.Drawing.Font("Arial", 11.0f, System.Drawing.FontStyle.Bold)); if ((err = GL.GetError()) != ErrorCode.NoError) { throw new Exception(err.ToString()); } }
public ColorMapPicker(GLFont font) { this.font = font; // Create textures texFlipButton = GLTexture2D.FromFile(Global.EXE_DIR + "flipButton.png", false); //cmdFlipButton = new GLButton(Global.EXE_DIR + "flipButton.png", new Rectangle(0, 0, 0, 0), AnchorStyles.Top | AnchorStyles.Left, "FlipColorMap", "Flip highlighted colormap"); }
public InputSection(ColorTableManager colorTableMgr, GLFont font) { this.colorTableMgr = colorTableMgr; this.font = font; InsertSplitterPinAction = ActionManager.CreateAction("Insert splitter pin", this, "InsertSplitterPin"); InsertNestedPinAction = ActionManager.CreateAction("Insert nesting pin", this, "InsertNestedPin"); MovePinAction = ActionManager.CreateAction("Move pin", this, "MovePin"); RemovePinAction = ActionManager.CreateAction("Remove pin", this, "RemovePin"); SetSectionColormapAction = ActionManager.CreateAction("Set colormap of section", this, "SetSectionColormap"); ResetColorTableAction = ActionManager.CreateAction("Reset colormap", this, "ResetColorTable"); // Create colormap colormapTexture = new GLTexture1D("colormap", new byte[4 * FINAL_COLORMAP_SIZE], FINAL_COLORMAP_SIZE, PixelFormat.Rgba, false); // Create histogram grid as line list mesh List<Vector3> positions = new List<Vector3>(); /*positions.AddRange(new Vector3[] { // Outline new Vector3(0.0f, 0.0f, 0.0f), new Vector3(0.0f, 0.5f, 0.0f), new Vector3(0.0f, 0.5f, 0.0f), new Vector3(1.0f, 0.5f, 0.0f), new Vector3(1.0f, 0.5f, 0.0f), new Vector3(1.0f, 0.0f, 0.0f), new Vector3(1.0f, 0.0f, 0.0f), new Vector3(0.0f, 0.0f, 0.0f) });*/ for(int i = 0; i <= 10; ++i) { float y = (float)i / 10.0f * 0.9f + 0.1f; positions.Add(new Vector3(0.0f, y, 0.0f)); positions.Add(new Vector3(1.0f, y, 0.0f)); } for(int i = 0; i <= 10; ++i) { float x = (float)i / 10.0f; positions.Add(new Vector3(x, 0.1f, 0.0f)); positions.Add(new Vector3(x, 1.0f, 0.0f)); } meshLines = new GLMesh(positions.ToArray(), null, null, null, null, null, PrimitiveType.Lines); // Create textures texSplitter = GLTexture2D.FromFile(Global.EXE_DIR + "splitter.png", false); texInterjectorLeft = GLTexture2D.FromFile(Global.EXE_DIR + "interjectorLeft.png", false); texInterjectorRight = GLTexture2D.FromFile(Global.EXE_DIR + "interjectorRight.png", false); // Create number font //font = new GLNumberFont("HelveticaNeue_12.png", new FontDefinition(new int[] {0, 14, 26, 39, 53, 67, 80, 93, 106, 120, 133}, new int[] {0, 19}), Common.meshQuad, true); //font = new GLNumberFont("HelveticaNeue_16.png", new FontDefinition(new int[] {0, 18, 34, 53, 71, 89, 106, 124, 142, 160, 178}, new int[] {0, 25}), true); //font = new GLTextFont("fntDefault.png", new Vector2(19.0f, 32.0f), Common.meshQuad); }