Skip to content

Commit

Permalink
Merge pull request #50 from Jarod42/cleanup
Browse files Browse the repository at this point in the history
Cleanup
  • Loading branch information
Jarod42 authored Aug 23, 2024
2 parents 1dd9960 + dbb3a5b commit 0d04f0b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 17 deletions.
2 changes: 1 addition & 1 deletion TODO
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
* Continue rebasing from 112ad7b3be4a069c22a74e7904b109f825d7fa11
* Continue rebasing from a154429864dc2a948d29f21cdcdf688177bb54a8
* Add a focus listener interface.
* Make focus apply synchronously.
* Graphics and input objects for DirectX.
Expand Down
14 changes: 6 additions & 8 deletions include/guisan/imagefont.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,27 +71,25 @@ namespace gcn

/**
* A font using an image containing the font data. ImageFont can be used
* with any supported by the current used ImageLoader.
* with any image supported by the currently used ImageLoader.
*
* These are two examples of an image containing a font.
* \image html imagefontexample.bmp
* \image html imagefontexample2.bmp
*
* The Image font format works like this: The first pixel, the pixal at
* coordinate (0,0), tells which color to look for when seperating glyphs.
* You create an image with your glyphs and simple separates them with
* the seperation color. When you create your image font you supply the
* constructor with the glyphs present in your image.
* The first pixel at coordinate (0,0) tells which color the image font
* looks for when seperating glyphs. The glyphs in the image is provided
* to the image font's constructor in the order they appear in the image.
*
* To create an ImageFont from the first image example above the following
* constructor call should be made:
* @code gcn::ImageFont imageFont("fixedfont_big.bmp"," abcdefghijklmno\
pqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"); @endcode
*
* Note worthy is that the first glyph actually gives the width of space.
* Noteworthy is that the first glyph actually gives the width of space.
* Glyphs can, as seen in the second image example above, be seperated with
* horizontal lines making it possible to draw glyphs on more then one
* line in the image. However, these vertical lines must have a height of
* line in the image. However, these horizontal lines must have a height of
* one pixel!
*/
class GCN_CORE_DECLSPEC ImageFont: public Font
Expand Down
4 changes: 0 additions & 4 deletions src/imagefont.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,6 @@ namespace gcn
y = mGlyph[k].y;
}

//int w = mImage->getWidth();
//int h = mImage->getHeight();
mImage->convertToDisplayFormat();

mRowSpacing = 0;
Expand Down Expand Up @@ -205,8 +203,6 @@ namespace gcn
y = mGlyph[i].y;
}

//int w = mImage->getWidth();
//int h = mImage->getHeight();
mImage->convertToDisplayFormat();

mRowSpacing = 0;
Expand Down
6 changes: 2 additions & 4 deletions src/widgets/window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,9 @@ namespace gcn

void Window::draw(Graphics* graphics)
{
Color faceColor = getBaseColor();
const Color& faceColor = getBaseColor();
Color highlightColor, shadowColor;
int alpha = getBaseColor().a;
//int width = getWidth() + getFrameSize() * 2 - 1;
//int height = getHeight() + getFrameSize() * 2 - 1;
const int alpha = getBaseColor().a;
highlightColor = faceColor + 0x303030;
highlightColor.a = alpha;
shadowColor = faceColor - 0x303030;
Expand Down

0 comments on commit 0d04f0b

Please sign in to comment.