Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
openairinterface5G
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Kun
openairinterface5G
Commits
c9f51868
Commit
c9f51868
authored
8 years ago
by
Cédric Roux
Browse files
Options
Downloads
Patches
Plain Diff
add x_draw_clipped_string and use it in the text_list gui
parent
ca945b53
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
common/utils/T/tracer/gui/text_list.c
+4
-2
4 additions, 2 deletions
common/utils/T/tracer/gui/text_list.c
common/utils/T/tracer/gui/x.c
+12
-0
12 additions, 0 deletions
common/utils/T/tracer/gui/x.c
common/utils/T/tracer/gui/x.h
+4
-0
4 additions, 0 deletions
common/utils/T/tracer/gui/x.h
with
20 additions
and
2 deletions
common/utils/T/tracer/gui/text_list.c
+
4
−
2
View file @
c9f51868
...
...
@@ -16,10 +16,12 @@ printf("PAINT text_list %p xywh %d %d %d %d\n", _this, this->common.x, this->com
this
->
common
.
width
,
this
->
common
.
height
);
for
(
i
=
0
,
j
=
this
->
starting_line
;
i
<
this
->
allocated_nlines
&&
j
<
this
->
text_count
;
i
++
,
j
++
)
x_draw_string
(
g
->
x
,
g
->
xwin
,
FOREGROUND_COLOR
,
x_draw_
clipped_
string
(
g
->
x
,
g
->
xwin
,
FOREGROUND_COLOR
,
this
->
common
.
x
,
this
->
common
.
y
+
i
*
this
->
line_height
+
this
->
baseline
,
this
->
text
[
j
]);
this
->
text
[
j
],
this
->
common
.
x
,
this
->
common
.
y
,
this
->
common
.
width
,
this
->
common
.
height
);
}
static
void
hints
(
gui
*
_gui
,
widget
*
_w
,
int
*
width
,
int
*
height
)
...
...
This diff is collapsed.
Click to expand it.
common/utils/T/tracer/gui/x.c
+
12
−
0
View file @
c9f51868
...
...
@@ -279,6 +279,18 @@ void x_draw_string(x_connection *_c, x_window *_w, int color,
XDrawString
(
c
->
d
,
w
->
p
,
c
->
colors
[
color
],
x
,
y
,
t
,
tlen
);
}
void
x_draw_clipped_string
(
x_connection
*
_c
,
x_window
*
_w
,
int
color
,
int
x
,
int
y
,
const
char
*
t
,
int
clipx
,
int
clipy
,
int
clipwidth
,
int
clipheight
)
{
struct
x_connection
*
c
=
_c
;
XRectangle
clip
=
{
clipx
,
clipy
,
clipwidth
,
clipheight
};
XSetClipRectangles
(
c
->
d
,
c
->
colors
[
color
],
0
,
0
,
&
clip
,
1
,
Unsorted
);
x_draw_string
(
_c
,
_w
,
color
,
x
,
y
,
t
);
XSetClipMask
(
c
->
d
,
c
->
colors
[
color
],
None
);
}
void
x_draw
(
x_connection
*
_c
,
x_window
*
_w
)
{
struct
x_connection
*
c
=
_c
;
...
...
This diff is collapsed.
Click to expand it.
common/utils/T/tracer/gui/x.h
+
4
−
0
View file @
c9f51868
...
...
@@ -41,6 +41,10 @@ void x_fill_rectangle(x_connection *c, x_window *w, int color,
void
x_draw_string
(
x_connection
*
_c
,
x_window
*
_w
,
int
color
,
int
x
,
int
y
,
const
char
*
t
);
void
x_draw_clipped_string
(
x_connection
*
_c
,
x_window
*
_w
,
int
color
,
int
x
,
int
y
,
const
char
*
t
,
int
clipx
,
int
clipy
,
int
clipwidth
,
int
clipheight
);
/* specials functions to plot many points
* you call several times x_add_point() then x_plot_points()
*/
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment