-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
73 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#pragma once | ||
|
||
#include <stdint.h> | ||
|
||
#include "Monochrome.h" | ||
#include "PixelArea.h" | ||
#include "VecXD.h" | ||
|
||
class ITextProvider { | ||
public: | ||
virtual ~ITextProvider() = default; | ||
|
||
/*! | ||
@return The dimensions required to show the character | ||
*/ | ||
virtual auto GetRequiredSizeCharacter(char character) -> Vec2D; | ||
|
||
/*! | ||
@param string A null-terminated string | ||
@param spacing The amount of pixels between characters in the string | ||
@return The dimensions required to show the string | ||
*/ | ||
virtual auto GetRequiredSizeString(char* string, uint8_t spacing) -> Vec2D; | ||
|
||
/*! | ||
@param string A null-terminated string | ||
@param spacing The amount of pixels between characters in the string | ||
@param offset The offset from the top-left of the | ||
@return success | ||
*/ | ||
virtual auto SetString(char* string, uint8_t spacing, Vec2D offset, PixelArea<Monochrome>& pixelArea) -> bool; | ||
|
||
// Note: when new colors are required, copy paste the SetString(...) function interface | ||
}; |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
#include "TextBmhFormat.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
add_executable(TestTextProvider | ||
${CMAKE_CURRENT_SOURCE_DIR}/TestTextBmhFormat.cpp | ||
) | ||
|
||
link_fuzztest(TestTextProvider) | ||
|
||
target_link_libraries(TestTextProvider PRIVATE | ||
gtest | ||
gmock | ||
gtest_main | ||
TextProvider | ||
) | ||
|
||
gtest_discover_tests(TestTextProvider) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#include "TextBmhFormat.h" | ||
#include "fuzztest/fuzztest.h" | ||
#include "gmock/gmock.h" | ||
|
||
using namespace testing; | ||
using namespace fuzztest; | ||
|
||
namespace TextBmhFormatTesting { | ||
|
||
class FixtureTextBmhFormat : public Test {}; | ||
|
||
TEST_F(FixtureTextBmhFormat, dummy) { ASSERT_TRUE(true); } | ||
|
||
} // namespace TextBmhFormatTesting |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters