All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
- Update font8x8 to v0.2.7.
- Updated minimal rust version to v1.32.0
- Ran
cargo fix --edition
, with minor changes tosrc/fram_clip.rs
,src/frame_offset.rs
, andsrc/frame_rotate.rs
.
edition = "2018"
under[package]
in Cargo.toml.1.32.0
toolchain to .travis.yml
- Update framebuffer to v0.2.0.
- Run
cargo fmt
throughout. - Removes
FontString::to_string
and implementsfmt::Display
as suggested by theclippy::inherent_to_string_shadow_display
lint.
rustfmt.toml
clippy::into_iter_on_ref
lint.clippy::len_without_is_empty
lint.clippy::trivially_copy_pass_by_ref
lint.clippy::inherent_to_string_shadow_display
lint. This removesFontString::to_string
and implementsfmt::Display
.
- Version for font8x8 to v0.2.5. Addresses rust-lang/rust#61478
- New
error::ScreenError
type to handle crate errors.
- Avoid unnecessary allocations when initializing
FONT_COLLECTION
.
- Use 'font8x8 = 0.2.3' with new
UnicodeFonts::iter
method.
- Correct version in Usage section of README.md
lazy_static = "1.0"
to Cargo.toml.- Lazily-initiated static
fonts::FONT_HASHMAP
exported in top-level. - Lazily-initiated static
fonts::FONT_COLLECTION
exported in top-level.
- Update to
font8x8 = 0.2
in Cargo.toml. - Replace
FontUtf16
withFontUnicode
type. - Replace
Utf16Fonts
withUnicodeFonts
trait. - Replace
u16
withchar
. - Replace
FontString::encode_utf16
withFontString::chars
method (breaking change). - Update examples to use new Fonts API.
examples/letter.rs
usesFONT_COLLECTION
instead of manually setting up aFontCollection
.examples/clip.rs
usesFONT_COLLECTION
instead of manually setting up aFontCollection
.
fonts::print_collection
function.
- URLs to
examples/scroll-*.rs
on README.
BackgroundColor
trait defines setter/getter of background color.StrokeColor
trait defines setter/getter of stroke color.- Unit tests and documentation for:
FontString::new
FontString::encode_utf16
FontString::to_string
scroll
trait to join a collection ofPixelFrame
s into a singleScroll
.Scroll
type to wrap an innerVec<PixelFrame>
.Scroll::new(&[PixelFrame])
method initializes a scroll.Scroll::clips
method returns aVec<Clip>
made from the innerVec<PixelFrame>
.Scroll::frames
method returns a slice of the innerVec<PixelFrame>
.Scroll::reverse
method reverses the order of the innerVec<PixelFrame>
.Scroll::len
method the length of the innerVec<PixelFrame>
.
- Tests and implementation for new
FontFrame
type, which is a font with stroke and background colors:FontFrame::new
FontFrame::pixel_frame
PixelFrame
implementsFrom<FontFrame>
.FontFrame
implementsBackgroundColor
trait.FontFrame
implementsStrokeColor
trait.- New
basic
features are a subset of the current thedefault
feature list. - Add Travis CI integration with
.travis.yml
. - Badge for Travis CI in README.md
- Add "Requirements" section to README.md.
- Specify Rust stable v1.26 as the minimum version requirement on README.md
- Tests for
Scroll
instances that createFrameSequence
with a givenFrameDirection
.Scroll::right_to_left
forFrameDirection::RightToLeft
.Scroll::left_to_right
forFrameDirection::LeftToRight
.Scroll::top_to_bottom
forFrameDirection::TopToBottom
.Scroll::bottom_to_top
forFrameDirection::BottomToTop
.
- Add "Changelog" section to README.md, linking to this document.
- Add
FrameSequence
type. - Add
examples/scroll-top-bottom.rs
. - Add
examples/scroll-bottom-top.rs
. - Add
examples/scroll-left-right.rs
. - Add
examples/scroll-right-left.rs
. - Add descriptions to examples on README.md.
- Add scroll examples to README.md
FontString
wrapsVec<font8x8::FontUtf16>
instead ofVec<u16>
.- Updated
examples/letter.rs
to use newFontString::encode_utf16
method. - Refactored
basic
features in thedefault
feature list. sensehat_screen::{Offset, clip_pixel_frames_offset_left, clip_pixel_frames_offset_top}
now have the#[cfg(any(feature = "offset", feature = "clip"))]
attribute.
rotate_bytes_left
androtate_bytes_right
implementation functions insrc/frame_clip.rs
are no longer needed.- Duplicate badge for Cargo Docs from
README.md
.
- "Contribute" section in
CHANGELOG.md
to invite people to contribute to this library. rustfmt.toml
, sets the expectedindent_style
to beVisual
impl<'a> From<&'a [PixelColor; 64]> for PixelFrame
impl From<[PixelColor; 64]> for PixelFrame
impl Into<[PixelColor; 64]> for PixelFrame
impl Index<usize> for PixelFrame
, to get pixel colors usinglet color = pixel_frame[idx]
-style syntax.impl IndexMut<usize> for PixelFrame
, to set pixel colors usingpixel_frame[idx] = color
-style syntax.
- Ran
cargo fmt
withindex_style
set toVisual
font_to_frame
andfont_to_pixel_frame
methods were using incorrect indexes.
- Update
README.md
section for examples, making it friendlier to read.
CHANGELOG.md
has a header, and conforms to Keep a Changelog.clip
feature to combine PixelFramesframe::Clip
struct that combines two PixelFrame and returns a clip of them. Fully documented and tested.PixelFrame::clip
method to create a clip frame on-the-go.PixelFrame::build_clip
method to build a clip, suitable for loops, and when multiple clips of the same frames are needed.examples/text-clip.rs
shows how to scroll two frames, by creating clip and rendering them on the screen.Rotate
enum provided a strongly-typed rotation angle for frames.- Top-level documentation describes what crate types do in
src/lib.rs
. - Top-level re-export of
Rotate
,Offset
, andClip
. - Fine-tuning of frame clipping doctests.
PixelFrame::transpose
method to transpose LED Matrix indexes.PixelFrame::flip_h
method to horizontally flip the LED Matrix.PixelFrame::flip_v
method to vertically flip the LED Matrix.PixelFrame::reverse
method to reverse the LED Matrix indexes.
default
features now also include:clip
.offset
feature now depends onclip
.- refactor font-related code into
src/fonts.rs
. - rename
PixelColor::from_rgb565
toPixelColor::from_rgb565_bytes
for clarity. - replace inner
Vec<u8>
with[Rgb565; 64]
inFrameLine
. - replace inner
Vec<PixelColor>
with[PixelColor; 64]
inPixelFrame
. - rename
FrameLine::as_slice
toFrameLine::as_bytes
PixelFrame::as_rows
method now returns&[[PixelColor; 8]; 8]
.PixelFrame::as_columns
method now returns&[[PixelColor; 8]; 8]
.PixelFrame::from_rows
method now takes[[PixelColor; 8]; 8]
.PixelFrame::from_columns
method now takes[[PixelColor; 8]; 8]
.- Optimize
rotate
,offset
, andclip
methods with slice methods and iterators.
-
offset
trait to renderPixelFrame
with offset. -
PixelFrame::offset
method creates a PixelFrame with the visible parts of the offset original. Features comprehensive testing. -
frame::Offset
enum wraps an offset from0..=8
in four directions:Offset::Left(_)
Offset::Right(_)
Offset::Top(_)
Offset::Bottom(_)
which may only be created by the associated methods:
Offset::left(offset: u8)
Offset::right(offset: u8)
Offset::top(offset: u8)
Offset::bottom(offset: u8)
all with comprehensive testing.
-
PixelFrame::as_rows
method. Features comprehensive testing. -
PixelFrame::as_columns
method. Features comprehensive testing. -
PixelFrame::from_rows
method. Features comprehensive testing. -
PixelFrame::from_columns
method. Features comprehensive testing.
default
features now also include:rotate
, andoffset
.- Updated features on
README.md
. - Lots of module refactoring with no change to API.
Rgb565
type to separate concerns fromPixelColor
, and properly encode/decode RGB565 colors.big-endian
feature to encode Rgb565 colors in big-endian format.Rgb565
implements From<> and Into<> forPixelColor
,&PixelColor
,(u8, u8, u8)
, and [u8; 2]`.PixelFrame
type to represent a single LED matrix screen frame.rotate
feature to rotate aPixelFrame
by steps of 90-degrees.examples/rotating-symbol.rs
to demo rotating font symbols with color.
- Framebuffer-related code refactored into
sensehat_screen::screen
module. FrameLine
-related code refactored intosensehat_screen::frame
module.- Make crate modules public.
FrameLine
defaults to little-endian format.- Update
README.md
andsrc/lib.rs
documentation.
-
Implement
Copy
trait forPixelColor
. -
PixelColor::dim
method to dim the color by a factor between 0 and 1. -
Color constants:
RED
BLUE
MAGENTA
BLACK
RED
BLUE
GREEN
WHITE
YELLOW
CYAN
MAGENTA
-
Update pixel color usage on tests, examples, and
README.md
-
Speed-up printing letter in
examples/letter.rs
, showing one character every 800ms.
- Doctest with example on
src/lib.rs
. - Update README with a copy of the
src/lib.rs
doctest example. - Implement
Debug
andDefault
trait forFontString
. - Implement
PartialEq
trait forPixelColor
,FrameLine
,FontCollection
,FontString
. - Implement
Clone
trait forPixelColor
,FrameLine
,FontCollection
,FontString
.
- Renamed private constant from
BLACK
toLED_OFF
.
- updated
README.md
with the newest features
serde-support
feature in Cargo.toml to enableserde
support.linux-framebuffer
feature in Cargo.toml to optionally use the Screen.default
feature includesserde-support
, andlinux-framebuffer
CHANGELOG.md
for semantic-versioning of changes (this file).
PixelColor
type to represent an RGB color, renderable into RGB565.FrameLine
type to write bytes into theScreen
framebuffer.Screen
type to open the framebuffer and write frames.FontCollection
andFontString
types, to manipulate fonts compatible with theScreen
.font_to_frame
convenience function to render a font as aFrameLine
.print_collection
convenience function to list aFontCollection
on stdout.fonts
feature in Cargo.toml. Conditional compilation attributes for font types and functions.default
feature includesfonts
examples/blink.rs
shows how to manually write frames to the screen.examples/letter.rs
shows how to render a sanitized-text on the screen.