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
c53d160c
Commit
c53d160c
authored
Aug 23, 2012
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ge command 'move selected' bugfix (refs #42)
parent
c06174f7
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
3 deletions
+18
-3
xtt/lib/ge/src/ge_graph_command.cpp
xtt/lib/ge/src/ge_graph_command.cpp
+4
-3
xtt/lib/glow/src/glow_growapi.cpp
xtt/lib/glow/src/glow_growapi.cpp
+6
-0
xtt/lib/glow/src/glow_growapi.h
xtt/lib/glow/src/glow_growapi.h
+8
-0
No files found.
xtt/lib/ge/src/ge_graph_command.cpp
View file @
c53d160c
...
...
@@ -1911,7 +1911,7 @@ static int graph_move_func( void *client_data,
}
y0
=
double
(
value
);
}
else
if
(
ODD
(
dcli_get_qualifier
(
"/ABS
y
"
,
str
,
sizeof
(
str
))))
{
else
if
(
ODD
(
dcli_get_qualifier
(
"/ABS
Y
"
,
str
,
sizeof
(
str
))))
{
sts
=
sscanf
(
str
,
"%f"
,
&
value
);
if
(
sts
!=
1
)
{
graph
->
message
(
'E'
,
"Syntax error"
);
...
...
@@ -1926,8 +1926,9 @@ static int graph_move_func( void *client_data,
}
grow_StoreTransform
(
graph
->
current_cmd_object
);
grow_SetObjectPosition
(
graph
->
current_cmd_object
,
x0
,
y0
);
// grow_StoreTransform( graph->current_cmd_object);
// grow_SetObjectPosition( graph->current_cmd_object, x0, y0);
grow_MoveObject
(
graph
->
current_cmd_object
,
x0
,
y0
);
grow_SetModified
(
graph
->
grow
->
ctx
,
1
);
return
GE__SUCCESS
;
...
...
xtt/lib/glow/src/glow_growapi.cpp
View file @
c53d160c
...
...
@@ -3943,6 +3943,12 @@ void grow_SetObjectPosition( grow_tObject object, double x, double y)
((
GlowArrayElem
*
)
object
)
->
set_position
(
x
,
y
);
}
void
grow_MoveObject
(
grow_tObject
object
,
double
x
,
double
y
)
{
grow_tCtx
ctx
=
(
grow_tCtx
)((
GlowArrayElem
*
)
object
)
->
get_ctx
();
((
GlowArrayElem
*
)
object
)
->
move
(
x
*
ctx
->
mw
.
zoom_factor_x
,
y
*
ctx
->
mw
.
zoom_factor_y
,
0
);
}
void
grow_SetObjectScale
(
grow_tObject
object
,
double
scale_x
,
double
scale_y
,
double
x0
,
double
y0
,
glow_eScaleType
type
)
{
...
...
xtt/lib/glow/src/glow_growapi.h
View file @
c53d160c
...
...
@@ -1537,6 +1537,14 @@ extern "C" {
*/
void
grow_SetObjectPosition
(
grow_tObject
object
,
double
x
,
double
y
);
//! Move the object.
/*!
\param object Object to move.
\param x Movement in x direction.
\param y Movement in y directino.
*/
void
grow_MoveObject
(
grow_tObject
object
,
double
x
,
double
y
);
//! Scale an object. The scale is made form the last stored transform.
/*!
\param object Object to scale.
...
...
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