[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[freetype2-demos] master 17f3cb3 2/4: [ftinspect] Minor.
From: |
Werner LEMBERG |
Subject: |
[freetype2-demos] master 17f3cb3 2/4: [ftinspect] Minor. |
Date: |
Tue, 10 May 2016 03:20:41 +0000 (UTC) |
branch: master
commit 17f3cb364fe03564ed20a700094b75a108fba649
Author: Werner Lemberg <address@hidden>
Commit: Werner Lemberg <address@hidden>
[ftinspect] Minor.
* src/ftinspect.cpp, src/ftinspect.h: s/loadGlyph/loadOutline/.
s/Glyph/GlyphOutline/.
s/drawGlyphOutline/drawGlyph/.
---
ChangeLog | 8 ++++++++
src/ftinspect.cpp | 32 ++++++++++++++++----------------
src/ftinspect.h | 10 +++++-----
3 files changed, 29 insertions(+), 21 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 39976cf..26da596 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2016-05-09 Werner Lemberg <address@hidden>
+ [ftinspect] Minor.
+
+ * src/ftinspect.cpp, src/ftinspect.h: s/loadGlyph/loadOutline/.
+ s/Glyph/GlyphOutline/.
+ s/drawGlyphOutline/drawGlyph/.
+
+2016-05-09 Werner Lemberg <address@hidden>
+
[ftinspect] Display glyphs outlines.
* src/ftinspect.cpp (Engine::loadGlyph): New method.
diff --git a/src/ftinspect.cpp b/src/ftinspect.cpp
index 184fbe3..565a809 100644
--- a/src/ftinspect.cpp
+++ b/src/ftinspect.cpp
@@ -349,7 +349,7 @@ Engine::removeFont(int fontIndex,
FT_Outline*
-Engine::loadGlyph(int glyphIndex)
+Engine::loadOutline(int glyphIndex)
{
update();
@@ -614,8 +614,8 @@ static FT_Outline_Funcs outlineFuncs =
} // extern "C"
-Glyph::Glyph(const QPen& outlineP,
- FT_Outline* outln)
+GlyphOutline::GlyphOutline(const QPen& outlineP,
+ FT_Outline* outln)
: outlinePen(outlineP),
outline(outln)
{
@@ -629,16 +629,16 @@ Glyph::Glyph(const QPen& outlineP,
QRectF
-Glyph::boundingRect() const
+GlyphOutline::boundingRect() const
{
return bRect;
}
void
-Glyph::paint(QPainter* painter,
- const QStyleOptionGraphicsItem*,
- QWidget*)
+GlyphOutline::paint(QPainter* painter,
+ const QStyleOptionGraphicsItem*,
+ QWidget*)
{
painter->setPen(outlinePen);
@@ -862,7 +862,7 @@ MainGUI::showFont()
checkCurrentFaceIndex();
checkCurrentInstanceIndex();
- drawGlyphOutline();
+ drawGlyph();
}
@@ -990,7 +990,7 @@ MainGUI::checkUnits()
dpiSpinBox->setEnabled(true);
}
- drawGlyphOutline();
+ drawGlyph();
}
@@ -1007,7 +1007,7 @@ MainGUI::adjustGlyphIndex(int delta)
else if (currentGlyphIndex >= currentNumGlyphs)
currentGlyphIndex = currentNumGlyphs - 1;
- drawGlyphOutline();
+ drawGlyph();
}
@@ -1225,7 +1225,7 @@ MainGUI::setGraphicsDefaults()
void
-MainGUI::drawGlyphOutline()
+MainGUI::drawGlyph()
{
if (!engine)
return;
@@ -1241,10 +1241,10 @@ MainGUI::drawGlyphOutline()
if (currentFontIndex >= 0
&& currentFaceIndex >= 0)
{
- FT_Outline* outline = engine->loadGlyph(currentGlyphIndex);
+ FT_Outline* outline = engine->loadOutline(currentGlyphIndex);
if (outline)
{
- currentGlyphOutlineItem = new Glyph(outlinePen, outline);
+ currentGlyphOutlineItem = new GlyphOutline(outlinePen, outline);
glyphScene->addItem(currentGlyphOutlineItem);
}
}
@@ -1443,7 +1443,7 @@ MainGUI::createLayout()
glyphScene->addItem(new Grid(gridPen, axisPen));
currentGlyphOutlineItem = NULL;
- drawGlyphOutline();
+ drawGlyph();
glyphView = new QGraphicsView;
glyphView->setRenderHint(QPainter::Antialiasing, true);
@@ -1582,11 +1582,11 @@ MainGUI::createConnections()
SLOT(checkShowPoints()));
connect(sizeDoubleSpinBox, SIGNAL(valueChanged(double)),
- SLOT(drawGlyphOutline()));
+ SLOT(drawGlyph()));
connect(unitsComboBox, SIGNAL(currentIndexChanged(int)),
SLOT(checkUnits()));
connect(dpiSpinBox, SIGNAL(valueChanged(int)),
- SLOT(drawGlyphOutline()));
+ SLOT(drawGlyph()));
connect(zoomSpinBox, SIGNAL(valueChanged(int)),
SLOT(zoom()));
diff --git a/src/ftinspect.h b/src/ftinspect.h
index 36164cc..24409ea 100644
--- a/src/ftinspect.h
+++ b/src/ftinspect.h
@@ -107,7 +107,7 @@ public:
int numFaces(int);
int numInstances(int, int);
int loadFont(int, int, int); // returns number of glyphs
- FT_Outline* loadGlyph(int);
+ FT_Outline* loadOutline(int);
void removeFont(int, int, int);
void update();
@@ -173,12 +173,12 @@ private:
};
-class Glyph
+class GlyphOutline
: public QGraphicsItem
{
public:
- Glyph(const QPen&,
- FT_Outline*);
+ GlyphOutline(const QPen&,
+ FT_Outline*);
QRectF boundingRect() const;
void paint(QPainter*,
const QStyleOptionGraphicsItem*,
@@ -250,7 +250,7 @@ private slots:
void checkShowPoints();
void checkUnits();
void closeFont();
- void drawGlyphOutline();
+ void drawGlyph();
void loadFonts();
void nextFace();
void nextFont();
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [freetype2-demos] master 17f3cb3 2/4: [ftinspect] Minor.,
Werner LEMBERG <=