Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Astro
rust-card10
Commits
eba63104
Commit
eba63104
authored
Oct 05, 2019
by
Astro
⚙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
l0dable: update display coordinate types
parent
e59a45a1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
card10-l0dable/src/display.rs
card10-l0dable/src/display.rs
+13
-13
No files found.
card10-l0dable/src/display.rs
View file @
eba63104
...
...
@@ -116,7 +116,7 @@ impl Display {
/// Print text
///
/// s must be 0-terminated
pub
fn
print
(
&
self
,
x
:
u
16
,
y
:
u
16
,
s
:
&
[
u8
],
fg
:
Color
,
bg
:
Color
)
{
pub
fn
print
(
&
self
,
x
:
i
16
,
y
:
i
16
,
s
:
&
[
u8
],
fg
:
Color
,
bg
:
Color
)
{
unsafe
{
epic_disp_print
(
x
,
y
,
s
.as_ptr
(),
fg
.0
,
bg
.0
);
}
...
...
@@ -125,14 +125,14 @@ impl Display {
/// Print text with a selected font
///
/// s must be 0-terminated
pub
fn
print_adv
(
&
self
,
font
:
Font
,
x
:
u
16
,
y
:
u
16
,
s
:
&
[
u8
],
fg
:
Color
,
bg
:
Color
)
{
pub
fn
print_adv
(
&
self
,
font
:
Font
,
x
:
i
16
,
y
:
i
16
,
s
:
&
[
u8
],
fg
:
Color
,
bg
:
Color
)
{
unsafe
{
epic_disp_print_adv
(
font
as
u8
,
x
,
y
,
s
.as_ptr
(),
fg
.0
,
bg
.0
);
}
}
/// Set a pixel
pub
fn
pixel
(
&
self
,
x
:
u
16
,
y
:
u
16
,
color
:
Color
)
{
pub
fn
pixel
(
&
self
,
x
:
i
16
,
y
:
i
16
,
color
:
Color
)
{
unsafe
{
epic_disp_pixel
(
x
,
y
,
color
.0
);
}
...
...
@@ -141,10 +141,10 @@ impl Display {
/// Draw a line
pub
fn
line
(
&
self
,
x1
:
u
16
,
y1
:
u
16
,
x2
:
u
16
,
y2
:
u
16
,
x1
:
i
16
,
y1
:
i
16
,
x2
:
i
16
,
y2
:
i
16
,
color
:
Color
,
linestyle
:
LineStyle
,
pixelsize
:
u16
,
...
...
@@ -156,10 +156,10 @@ impl Display {
pub
fn
rect
(
&
self
,
x1
:
u
16
,
y1
:
u
16
,
x2
:
u
16
,
y2
:
u
16
,
x1
:
i
16
,
y1
:
i
16
,
x2
:
i
16
,
y2
:
i
16
,
color
:
Color
,
fillstyle
:
FillStyle
,
pixelsize
:
u16
,
...
...
@@ -172,8 +172,8 @@ impl Display {
/// Draw a circle
pub
fn
circ
(
&
self
,
x
:
u
16
,
y
:
u
16
,
x
:
i
16
,
y
:
i
16
,
rad
:
u16
,
color
:
Color
,
fillstyle
:
FillStyle
,
...
...
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