Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
7d592ee7
Commit
7d592ee7
authored
Jun 14, 2004
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Align added
parent
77f2b7a9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
54 additions
and
0 deletions
+54
-0
xtt/lib/glow/src/glow_growtext.cpp
xtt/lib/glow/src/glow_growtext.cpp
+46
-0
xtt/lib/glow/src/glow_growtext.h
xtt/lib/glow/src/glow_growtext.h
+8
-0
No files found.
xtt/lib/glow/src/glow_growtext.cpp
View file @
7d592ee7
...
...
@@ -984,6 +984,52 @@ void GrowText::flip( double x0, double y0, glow_eFlipDirection dir)
}
}
void
GrowText
::
align
(
double
x
,
double
y
,
glow_eAlignDirection
direction
)
{
double
dx
,
dy
;
erase
();
nav_erase
();
switch
(
direction
)
{
case
glow_eAlignDirection_CenterVert
:
dx
=
x
-
(
x_right
+
x_left
)
/
2
;
dy
=
0
;
break
;
case
glow_eAlignDirection_CenterHoriz
:
dx
=
0
;
dy
=
y
-
(
y_high
+
y_low
)
/
2
;
break
;
case
glow_eAlignDirection_CenterCenter
:
dx
=
x
-
(
x_right
+
x_left
)
/
2
;
dy
=
y
-
(
y_high
+
y_low
)
/
2
;
break
;
case
glow_eAlignDirection_Right
:
dx
=
x
-
x_right
;
dy
=
0
;
break
;
case
glow_eAlignDirection_Left
:
dx
=
x
-
x_left
;
dy
=
0
;
break
;
case
glow_eAlignDirection_Up
:
dx
=
0
;
dy
=
y
-
y_high
;
break
;
case
glow_eAlignDirection_Down
:
dx
=
0
;
dy
=
y
-
y_low
;
break
;
}
trf
.
move
(
dx
,
dy
);
x_right
+=
dx
;
x_left
+=
dx
;
y_high
+=
dy
;
y_low
+=
dy
;
draw
();
}
void
GrowText
::
convert
(
glow_eConvert
version
)
{
switch
(
version
)
{
...
...
xtt/lib/glow/src/glow_growtext.h
View file @
7d592ee7
...
...
@@ -466,6 +466,14 @@ class GrowText : public GlowText {
*/
void
flip
(
double
x0
,
double
y0
,
glow_eFlipDirection
dir
);
//! Moves object to alignment line or point.
/*!
\param x x coordinate of alignment point.
\param y y coordinate of alignment point.
\param direction Type of alignment.
*/
void
align
(
double
x
,
double
y
,
glow_eAlignDirection
direction
);
//! Conversion between different versions of Glow
/*!
\param version Version to convert to.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment