Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
phys_tp_elec
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
boris.stefanov
phys_tp_elec
Commits
a6186376
Commit
a6186376
authored
3 years ago
by
JM
Browse files
Options
Downloads
Patches
Plain Diff
add gfx methods
parent
bf121f31
No related branches found
No related tags found
1 merge request
!1
Gfx
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
utils/gfx/gfx.c
+9
-0
9 additions, 0 deletions
utils/gfx/gfx.c
utils/gfx/gfx.h
+8
-0
8 additions, 0 deletions
utils/gfx/gfx.h
with
17 additions
and
0 deletions
utils/gfx/gfx.c
+
9
−
0
View file @
a6186376
...
...
@@ -103,3 +103,12 @@ SDL_Keycode gfx_keypressed()
}
return
0
;
}
void
gfx_draw_line
(
struct
gfx_context_t
*
ctxt
,
coordinates_t
p0
,
coordinates_t
p1
,
uint32_t
color
){
}
void
gfx_draw_circle
(
struct
gfx_context_t
*
ctxt
,
coordinates_t
c
,
uint32_t
r
,
uint32_t
color
){
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
utils/gfx/gfx.h
+
8
−
0
View file @
a6186376
...
...
@@ -29,6 +29,12 @@ struct gfx_context_t
uint32_t
height
;
};
typedef
struct
{
uint32_t
row
;
uint32_t
column
;
}
coordinates_t
;
extern
void
gfx_putpixel
(
struct
gfx_context_t
*
ctxt
,
uint32_t
column
,
uint32_t
row
,
uint32_t
color
);
extern
void
gfx_clear
(
struct
gfx_context_t
*
ctxt
,
uint32_t
color
);
...
...
@@ -36,5 +42,7 @@ extern struct gfx_context_t *gfx_create(char *text, uint32_t width, uint32_t hei
extern
void
gfx_destroy
(
struct
gfx_context_t
*
ctxt
);
extern
void
gfx_present
(
struct
gfx_context_t
*
ctxt
);
extern
SDL_Keycode
gfx_keypressed
();
void
gfx_draw_line
(
struct
gfx_context_t
*
ctxt
,
coordinates_t
p0
,
coordinates_t
p1
,
uint32_t
color
);
void
gfx_draw_circle
(
struct
gfx_context_t
*
ctxt
,
coordinates_t
c
,
uint32_t
r
,
uint32_t
color
);
#endif
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