-
Notifications
You must be signed in to change notification settings - Fork 13
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
18 changed files
with
159 additions
and
81 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 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,32 @@ | ||
package(default_visibility = ["//visibility:public"]) | ||
|
||
load("//bazel/rules/hcp:hcp.bzl", "hcp") | ||
load("//bazel/rules/hcp:hcp_hdrs_derive.bzl", "hcp_hdrs_derive") | ||
load("//bazel/rules/cpp:object.bzl", "cpp_object") | ||
|
||
hcp_hdrs_derive( | ||
name = "circle_draw_hooks", | ||
interface_deps = [], | ||
) | ||
|
||
hcp_hdrs_derive( | ||
name = "circle_fill_colors", | ||
interface_deps = ["//code/utilities/data_structures/color:transparent_rgb_color"], | ||
) | ||
|
||
hcp_hdrs_derive( | ||
name = "circle_settings", | ||
interface_deps = [ | ||
"//code/utilities/data_structures/color:transparent_rgb_color", | ||
"//code/utilities/data_structures/shapes/circle:circle_draw_hooks", | ||
"//code/utilities/data_structures/shapes/circle:circle_fill_colors", | ||
], | ||
) | ||
|
||
hcp_hdrs_derive( | ||
name = "positioned_circle_settings", | ||
interface_deps = [ | ||
"//code/utilities/data_structures/position", | ||
"//code/utilities/data_structures/shapes/circle:circle_settings", | ||
], | ||
) |
12 changes: 12 additions & 0 deletions
12
source/code/utilities/data_structures/shapes/circle/circle_draw_hooks.hcp
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,12 @@ | ||
class | ||
⚯ | ||
⚞⚟ | ||
|
||
◀public: | ||
|
||
//hooks on whether to show something | ||
bool ፠draw_border፠ = true; | ||
bool ፠draw_fill፠ = true; | ||
bool ፠draw_shade፠ = false; | ||
▶ | ||
|
10 changes: 10 additions & 0 deletions
10
source/code/utilities/data_structures/shapes/circle/circle_fill_colors.hcp
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,10 @@ | ||
class | ||
⚯ | ||
⚞⚟ | ||
|
||
◀public: | ||
|
||
Transparent_Rgb_Color ፠border፠; | ||
Transparent_Rgb_Color ፠fill፠; | ||
▶ | ||
|
15 changes: 15 additions & 0 deletions
15
source/code/utilities/data_structures/shapes/circle/circle_settings.hcp
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,15 @@ | ||
class | ||
⚯ | ||
⚞⚟ | ||
|
||
◀public: | ||
|
||
float ፠radius፠ = 10; | ||
int ፠number_of_segments፠; | ||
int ፠thickness፠ = 1; | ||
|
||
|
||
Circle_Draw_Hooks ፠hooks፠; | ||
Circle_Fill_Colors ፠colors፠; | ||
▶ | ||
|
8 changes: 8 additions & 0 deletions
8
source/code/utilities/data_structures/shapes/circle/positioned_circle_settings.hcp
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,8 @@ | ||
class | ||
⚯ | ||
⚞⚟ | ||
|
||
◀public: | ||
Position ፠pos፠; | ||
Circle_Settings ፠shape፠; | ||
▶ |
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
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
41 changes: 41 additions & 0 deletions
41
source/code/utilities/graphics/imgui/render/elements/circle_drawer.hcp
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,41 @@ | ||
class | ||
⚯ | ||
⚞⚟ | ||
|
||
|
||
//regular draw | ||
◀public: static▶ void ☀Draw(ImDrawList *draw_list, Positioned_Circle_Settings const &settings) | ||
❰ | ||
return Draw(draw_list,settings.pos,settings.shape); | ||
❱ | ||
◀public: static▶ void ☀Draw(ImDrawList *draw_list, Position pos, Circle_Settings const &settings) | ||
❰ | ||
Possibly_Draw_Filling(draw_list,pos,settings); | ||
Possibly_Draw_Border(draw_list,pos,settings); | ||
❱ | ||
|
||
|
||
◀private: static▶ void ☀Possibly_Draw_Filling(ImDrawList *draw_list, Position pos, Circle_Settings const &settings) | ||
❰ | ||
if (settings.hooks.draw_fill){ | ||
draw_list->AddCircleFilled(ImVec2(pos.x, pos.y), | ||
settings.radius, | ||
Imgui_Type_Utility::to_imgui_color(settings.colors.fill), | ||
settings.number_of_segments); | ||
} | ||
|
||
if (settings.hooks.draw_shade){ | ||
//TODO | ||
} | ||
|
||
❱ | ||
◀private: static▶ void ☀Possibly_Draw_Border(ImDrawList *draw_list, Position pos, Circle_Settings const &settings) | ||
❰ | ||
if (settings.hooks.draw_border){ | ||
draw_list->AddCircle(ImVec2(pos.x, pos.y), | ||
settings.radius, | ||
Imgui_Type_Utility::to_imgui_color(settings.colors.border), | ||
settings.number_of_segments, | ||
settings.thickness); | ||
} | ||
❱ |
10 changes: 0 additions & 10 deletions
10
source/code/utilities/graphics/imgui/render/elements/full_color_bitmap_drawer.hcp
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
7 changes: 0 additions & 7 deletions
7
source/code/utilities/graphics/imgui/render/elements/line_drawer.hcp
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
10 changes: 0 additions & 10 deletions
10
source/code/utilities/graphics/imgui/render/elements/multi_color_bitmap_drawer.hcp
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
7 changes: 0 additions & 7 deletions
7
source/code/utilities/graphics/imgui/render/elements/pixel_drawer.hcp
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
13 changes: 0 additions & 13 deletions
13
source/code/utilities/graphics/imgui/render/elements/rectangle_drawer.hcp
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