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
e1fed599
Commit
e1fed599
authored
Feb 17, 2005
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Visibility dimmed added
parent
996ac6f8
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
54 additions
and
14 deletions
+54
-14
xtt/lib/glow/src/glow.h
xtt/lib/glow/src/glow.h
+7
-0
xtt/lib/glow/src/glow_array_elem.h
xtt/lib/glow/src/glow_array_elem.h
+1
-1
xtt/lib/glow/src/glow_color.cpp
xtt/lib/glow/src/glow_color.cpp
+14
-2
xtt/lib/glow/src/glow_growapi.cpp
xtt/lib/glow/src/glow_growapi.cpp
+2
-2
xtt/lib/glow/src/glow_growapi.h
xtt/lib/glow/src/glow_growapi.h
+1
-1
xtt/lib/glow/src/glow_grownode.cpp
xtt/lib/glow/src/glow_grownode.cpp
+27
-3
xtt/lib/glow/src/glow_grownode.h
xtt/lib/glow/src/glow_grownode.h
+2
-5
No files found.
xtt/lib/glow/src/glow.h
View file @
e1fed599
...
...
@@ -187,6 +187,13 @@ typedef enum {
glow_eDir_Horizontal
//!< Horizontal direction
}
glow_eDir
;
//! Visibility enum
typedef
enum
{
glow_eVis_Visible
,
//!< Object is visible
glow_eVis_Invisible
,
//!< Object is invisible
glow_eVis_Dimmed
//!< Object is dimmed insensible
}
glow_eVis
;
//! Different kind of alignment functions
typedef
enum
{
glow_eAlignDirection_CenterCenter
,
...
...
xtt/lib/glow/src/glow_array_elem.h
View file @
e1fed599
...
...
@@ -140,7 +140,7 @@ class GlowArrayElem {
virtual
void
incr_color_shift
(
int
shift
)
{};
virtual
void
set_original_color_shift
(
int
shift
)
{};
virtual
void
reset_color_shift
()
{};
virtual
void
set_visibility
(
int
visible
)
{};
virtual
void
set_visibility
(
glow_eVis
visibiliby
)
{};
virtual
void
set_transform
(
GlowTransform
*
t
)
{};
virtual
void
set_transform_from_stored
(
GlowTransform
*
t
)
{};
virtual
void
store_transform
()
{};
...
...
xtt/lib/glow/src/glow_color.cpp
View file @
e1fed599
...
...
@@ -287,8 +287,20 @@ glow_eDrawType GlowColor::get_drawtype( glow_eDrawType local_drawtype,
}
}
if
(
node
&&
((
GrowNode
*
)
node
)
->
color_inverse
)
{
if
(
drawtype
>=
10
)
drawtype
=
(
glow_eDrawType
)(
drawtype
+
10
-
2
*
(
drawtype
%
10
)
-
1
);
if
(
drawtype
>=
30
)
drawtype
=
(
glow_eDrawType
)(
drawtype
+
10
-
2
*
(
drawtype
%
10
)
-
1
);
}
if
(
node
&&
((
GrowNode
*
)
node
)
->
dimmed
)
{
if
(
drawtype
==
0
)
drawtype
=
(
glow_eDrawType
)
25
;
else
if
(
26
<=
drawtype
&&
drawtype
<=
29
)
drawtype
=
(
glow_eDrawType
)
(
drawtype
-
4
);
else
if
(
36
<=
drawtype
&&
drawtype
<=
39
)
drawtype
=
(
glow_eDrawType
)
(
drawtype
-
4
);
else
if
(
46
<=
drawtype
&&
drawtype
<=
49
)
drawtype
=
(
glow_eDrawType
)
(
drawtype
-
4
);
else
if
(
56
<=
drawtype
&&
drawtype
<=
59
)
drawtype
=
(
glow_eDrawType
)
(
drawtype
-
4
);
}
}
if
(
drawtype
<
0
||
drawtype
>=
300
)
{
...
...
xtt/lib/glow/src/glow_growapi.cpp
View file @
e1fed599
...
...
@@ -3394,9 +3394,9 @@ void grow_SetObjectColorInverse( grow_tObject object, int inverse)
((
GrowNode
*
)
object
)
->
set_color_inverse
(
inverse
);
}
void
grow_SetObjectVisibility
(
grow_tObject
object
,
int
visible
)
void
grow_SetObjectVisibility
(
grow_tObject
object
,
glow_eVis
visibility
)
{
((
GlowArrayElem
*
)
object
)
->
set_visibility
(
visib
le
);
((
GlowArrayElem
*
)
object
)
->
set_visibility
(
visib
ility
);
}
void
grow_RotateSelectedObjects
(
grow_tCtx
ctx
,
double
angel
,
...
...
xtt/lib/glow/src/glow_growapi.h
View file @
e1fed599
...
...
@@ -1621,7 +1621,7 @@ typedef GlowTraceData glow_sTraceData;
\param object Object.
\param visible 1 object is visible, 0 object is invisible.
*/
void
grow_SetObjectVisibility
(
grow_tObject
object
,
int
visible
);
void
grow_SetObjectVisibility
(
grow_tObject
object
,
glow_eVis
visibility
);
//! Rotate selected objects.
/*!
...
...
xtt/lib/glow/src/glow_grownode.cpp
View file @
e1fed599
...
...
@@ -24,7 +24,7 @@ GrowNode::GrowNode( GlowCtx *glow_ctx, char *name, GlowNodeClass *node_class,
original_color_lightness
(
0
),
color_lightness
(
0
),
original_color_intensity
(
0
),
color_intensity
(
0
),
original_color_shift
(
0
),
color_shift
(
0
),
color_inverse
(
0
),
line_width
(
0
),
invisible
(
0
),
object_type
(
glow_eObjectType_GrowNode
),
root_node
(
0
),
invisible
(
0
),
dimmed
(
0
),
object_type
(
glow_eObjectType_GrowNode
),
root_node
(
0
),
flip_horizontal
(
false
),
flip_vertical
(
false
),
fill_level
(
1
),
level_direction
(
glow_eDirection_Right
),
shadow
(
0
),
input_position
(
0
),
input_selected
(
0
)
{
...
...
@@ -415,7 +415,7 @@ int GrowNode::event_handler( glow_eEvent event, double fx, double fy)
double
x
,
y
;
int
sts
;
if
(
invisible
)
if
(
invisible
||
dimmed
)
return
0
;
trf
.
reverse
(
fx
,
fy
,
&
x
,
&
y
);
...
...
@@ -438,7 +438,7 @@ int GrowNode::event_handler( glow_eEvent event, int x, int y, double fx,
double
rx
,
ry
;
if
(
invisible
)
if
(
invisible
||
dimmed
)
return
0
;
switch
(
event
)
{
...
...
@@ -2118,4 +2118,28 @@ int GrowNode::get_annotation_info( int num, int *t_size, glow_eDrawType *t_drawt
return
sts
;
}
void
GrowNode
::
set_visibility
(
glow_eVis
visibility
)
{
switch
(
visibility
)
{
case
glow_eVis_Visible
:
if
(
invisible
==
0
&&
dimmed
==
0
)
return
;
invisible
=
0
;
dimmed
=
0
;
break
;
case
glow_eVis_Invisible
:
if
(
invisible
)
return
;
invisible
=
1
;
erase
();
break
;
case
glow_eVis_Dimmed
:
if
(
dimmed
&&
!
invisible
)
return
;
dimmed
=
1
;
invisible
=
0
;
break
;
}
draw
();
}
xtt/lib/glow/src/glow_grownode.h
View file @
e1fed599
...
...
@@ -175,6 +175,7 @@ class GrowNode : public GlowNode {
int
color_inverse
;
//!< Color inverse.
int
line_width
;
//!< Line width.
int
invisible
;
//!< Object is invisible.
int
dimmed
;
//!< Object is dimmed.
GlowTransform
trf
;
//!< Transformation matrix of object.
char
*
argv
[
20
];
//!< Arguments in dynamic code.
int
argsize
[
20
];
//!< Size of arguments is dynamic code.
...
...
@@ -494,11 +495,7 @@ class GrowNode : public GlowNode {
/*!
\param visible The visibility of the object.
*/
void
set_visibility
(
int
visible
)
{
if
(
invisible
==
!
visible
)
return
;
invisible
=
!
visible
;
if
(
!
visible
)
erase
();
draw
();};
void
set_visibility
(
glow_eVis
visibility
);
//! Set position relative last stored transform.
/*!
...
...
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