forked from OpenCPN/OpenCPN
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request OpenCPN#28 from jongough/cursor_jump
Cursor jump
- Loading branch information
Showing
33 changed files
with
3,369 additions
and
638 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -248,6 +248,8 @@ class Quilt | |
|
||
int m_lost_refchart_dbIndex; | ||
bool m_b_hidef; | ||
|
||
bool m_bquiltskew; | ||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
/*************************************************************************** | ||
* | ||
* Project: OpenCPN | ||
* Purpose: OpenGL text rendering | ||
* Author: Sean D'Epagnier | ||
* | ||
*************************************************************************** | ||
* Copyright (C) 2014 Sean D'Epagnier * | ||
* * | ||
* This program is free software; you can redistribute it and/or modify * | ||
* it under the terms of the GNU General Public License as published by * | ||
* the Free Software Foundation; either version 2 of the License, or * | ||
* (at your option) any later version. * | ||
* * | ||
* This program is distributed in the hope that it will be useful, * | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of * | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * | ||
* GNU General Public License for more details. * | ||
* * | ||
* You should have received a copy of the GNU General Public License * | ||
* along with this program; if not, write to the * | ||
* Free Software Foundation, Inc., * | ||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * | ||
**************************************************************************/ | ||
|
||
#ifndef __TEXFONT_H__ | ||
#define __TEXFONT_H__ | ||
|
||
/* support ascii plus degree symbol for now pack font in a single texture 16x8 */ | ||
#define DEGREE_GLYPH 127 | ||
#define MIN_GLYPH 32 | ||
#define MAX_GLYPH 128 | ||
|
||
#define NUM_GLYPHS (MAX_GLYPH - MIN_GLYPH) | ||
|
||
#define COLS_GLYPHS 16 | ||
#define ROWS_GLYPHS ((NUM_GLYPHS / COLS_GLYPHS)+1) | ||
|
||
#ifndef DECL_EXP | ||
#ifdef __WXMSW__ | ||
# define DECL_EXP __declspec(dllexport) | ||
#else | ||
# define DECL_EXP | ||
#endif | ||
#endif | ||
|
||
struct TexGlyphInfo { | ||
int x, y, width, height; | ||
float advance; | ||
}; | ||
|
||
class DECL_EXP TexFont { | ||
public: | ||
TexFont(); | ||
~TexFont(); | ||
|
||
void Build( wxFont &font, bool blur = false ); | ||
void Delete(); | ||
|
||
void GetTextExtent( const char *string, int len, int *width, int *height); | ||
void GetTextExtent( const wxString &string, int *width, int *height); | ||
void RenderString( const char *string, int x=0, int y=0 ); | ||
void RenderString( const wxString &string, int x=0, int y=0 ); | ||
|
||
|
||
private: | ||
void RenderGlyph( int c ); | ||
|
||
wxFont m_font; | ||
bool m_blur; | ||
|
||
TexGlyphInfo tgi[MAX_GLYPH]; | ||
|
||
unsigned int texobj; | ||
int tex_w, tex_h; | ||
int m_maxglyphw; | ||
int m_maxglyphh; | ||
|
||
}; | ||
#endif //guard |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.