Skip to content
This repository was archived by the owner on Jan 7, 2023. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
7513dfa
Merge pull request #28 from ChengCat/master
krogueintel Apr 24, 2018
db5c922
Merge branch 'master' of https://github.com/01org/fastuidraw
krogueintel Apr 24, 2018
98bf395
demos/painter_path_test: can load many paths and cycle through them f…
krogueintel Apr 25, 2018
dd02e6e
fastuidraw/path: new arc ctor + minor cleanups
krogueintel Apr 25, 2018
da86b03
fastuidraw/painter: move StrokedPath::point to global class StrokedPoint
krogueintel Apr 25, 2018
9ce497b
fastuidraw/painter/stroked_path: remove typedef of StrokedPoint to St…
krogueintel Apr 25, 2018
83e041a
demos/painter_path_test: draw glyphs in reversed-y because glyphs hav…
krogueintel Apr 25, 2018
10c6738
demos/painter_path_test: make coordinates per-path
krogueintel Apr 25, 2018
2552d88
README.md: fix typo
ChengCat Apr 26, 2018
1b2646b
fastuidraw/path: remove time parameter from tessellate() and rely on …
krogueintel Apr 26, 2018
4dbb509
Merge pull request #30 from ChengCat/master
krogueintel Apr 26, 2018
e7d9c4c
faastuidraw/painter/filled_path: better name for field
krogueintel Apr 26, 2018
664b7e5
fastuidraw/painter: remove having seperate shader for pixel-unit stro…
krogueintel Apr 26, 2018
4060749
fastuidraw/painter/stroked_caps_joins: initial commit of StrokedCapsJ…
krogueintel Apr 27, 2018
be4c422
fastuidraw/painter/stroked_path: Use stroked_joins_caps
krogueintel Apr 27, 2018
af1a521
fastuidraw/painter/stroked_caps_joins: minore cleanups
krogueintel Apr 28, 2018
7859a41
fastuidraw/painter/stroked_path: cleanups
krogueintel Apr 28, 2018
6f34de3
fastuidraw/glsl/shaders/painter: improvement for dashed shader-based …
krogueintel Apr 28, 2018
d7b8781
fastuidraw/glsl/shaders/painter: fix to dashed stroking
krogueintel Apr 28, 2018
127a391
fastuidraw/painter/stroked_point: move lambda-negated concept to a bi…
krogueintel Apr 30, 2018
657ee00
Makefile: add static library targets
krogueintel Apr 30, 2018
f5d3369
Makefile: add INSTALL_STATIC option
krogueintel Apr 30, 2018
2b98303
fastuidraw.pc: remove unnecessary -lm
krogueintel Apr 30, 2018
4eaee4a
fastuidraw/glsl/shaders: GLES fix
krogueintel Apr 30, 2018
915ac71
Makefile: default output readability tweaks
krogueintel Apr 30, 2018
90cdcd1
Makefile: more targets output cleanup
krogueintel Apr 30, 2018
86d0190
fastuidraw-config: tweaks for linking against static FastUIDraw.a
krogueintel Apr 30, 2018
0399826
Makefile: add demo targets that link statically
krogueintel Apr 30, 2018
b033d13
fastuidraw/painter/strokeD_path: expose directly StrokedCapsJoins and…
krogueintel Apr 30, 2018
dfa336e
Makefile/fastuidraw-config: tweaks to static libs linking flags
krogueintel Apr 30, 2018
b0b021e
Makefile: tweaks to static lib options and internal labels of Makefile
krogueintel Apr 30, 2018
c4913f7
fastuidraw-config: on --help, print --static option
krogueintel Apr 30, 2018
d123bab
fastuidraw/tessellated_path: remove threshhold type (since there is o…
krogueintel Apr 30, 2018
7984521
fastuidraw/tessellated_path: doxytag fixes
krogueintel Apr 30, 2018
e2c32d4
fastuidraw/path: doxytag fixes
krogueintel Apr 30, 2018
af34371
fastuidraw/glsl/shaders/painter: minor fix to dashed stroking
krogueintel May 2, 2018
04db592
fastuidraw/private: initialize BoundingBox min and max fields as well
krogueintel May 2, 2018
8c32656
fastuidraw/tessellated_path: move distance from edge length comptuati…
krogueintel May 2, 2018
a9b51a2
fastuidraw/path: define arc-tessellation of a Path
krogueintel Apr 30, 2018
9cc2c77
fastuidraw/path: implement arc-tessellation
krogueintel Apr 30, 2018
85f4119
fastuidraw: implement arc_tessellated_path
krogueintel May 2, 2018
5b47612
fastuidraw/painter: define ArcStrokedPath
krogueintel Apr 30, 2018
c52fc3a
demo_data/paths: add default path
krogueintel May 2, 2018
284e157
fastuidraw/path: arc-tessellation fixes
krogueintel May 2, 2018
60d8554
fastuidraw/path: force recuse if circle is flat; this allows for hand…
krogueintel May 2, 2018
f6c5a1c
fastuidraw/path: cleanup tessellation code by using reference counted…
krogueintel May 2, 2018
25e658a
fastuidraw/path: tweaks for better arc-tessellation
krogueintel May 2, 2018
04339d0
fastuidraw/path: change arc tessellation inteface to take an abstract…
krogueintel May 2, 2018
f9aa947
fastuidraw/path: change tessellation inteface to take an abstract sto…
krogueintel May 2, 2018
00a5142
fastuidraw/path: use recursion limits instead of segment limits
krogueintel May 2, 2018
0a4d8e9
fastuidraw/path: further interface tweaks
krogueintel May 2, 2018
ebb6606
fastuidraw/path: return recursion depth in produce_tessellation() met…
krogueintel May 2, 2018
cdd376f
fastuidraw/path: return the recursion depth in tessellation and use t…
krogueintel May 2, 2018
2cee33c
fastuidraw/path: use max_recursion() method of TessellatedPath and Ar…
krogueintel May 2, 2018
c0b105a
Rewrite create-resource-cpp in C++
zsx May 2, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ build/
*.exe
*.clang_tidy
*.pc
*.a
inc/fastuidraw/gl_backend/ngl_gl.hpp
src/fastuidraw/gl_backend/ngl_gl.cpp
inc/fastuidraw/gl_backend/ngl_gles3.hpp
Expand All @@ -17,5 +18,9 @@ src/fastuidraw/ngl_egl.cpp
*-GL-debug
*-GLES-release
*-GLES-debug
*-GL-release-static
*-GL-debug-static
*-GLES-release-static
*-GLES-debug-static
fastuidraw-config.nodir
fastuidraw-config
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ ENVIRONMENTALDESCRIPTIONS :=

#install location
INSTALL_LOCATION ?= /usr/local
ENVIRONMENTALDESCRIPTIONS += "INSTALL_LOCATION: provides install location (default /usr/local)"
ENVIRONMENTALDESCRIPTIONS += "INSTALL_LOCATION: provides install location (default /usr/local)"

INSTALL_STATIC ?= 0
ENVIRONMENTALDESCRIPTIONS += "INSTALL_STATIC: if 1, install static libraries (default 0). NOTE: if linking static libs, make sure one links in the entire archive (for example via the linker option --whole-archive (from g++ do -Wl,--whole-archive)"

# Mark all intermediate files as secondary and precious
.PRECIOUS:
.SECONDARY:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Fast UI Draw
============

Fast UI Draw in a library that provides a higher performance Canvas interface.
Fast UI Draw is a library that provides a higher performance Canvas interface.
It is designed so that it always draws using a GPU.

In contrast to many common implementations of Canvas drawing, Fast UI Draw
Expand Down
11 changes: 11 additions & 0 deletions demo_data/paths/default_path.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[ (50.0, 35.0) [[(60.0, 50.0)]] (70.0, 35.0)
arc 180 (70.0, -100.0)
[[(60.0, -150.0) (30.0, -50.0)]]
(0.0, -100.0) arc 90]


[ (200, 200) (400, 200) (400, 400) (200, 400)]

[ (-50, 100) (0, 200) (100, 300) (150, 325) (150, 100)]

[(300 300)]
57 changes: 57 additions & 0 deletions demos/common/command_line_list.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
#pragma once

#include <set>
#include "generic_command_line.hpp"

template<typename T>
class command_line_list:
public command_line_argument,
public std::set<T>
{
public:
command_line_list(const std::string &nm,
const std::string &desc,
command_line_register &p):
command_line_argument(p),
m_name(nm)
{
std::ostringstream ostr;
ostr << "\n\t" << m_name << " value"
<< format_description_string(m_name, desc);
m_description = tabs_to_spaces(ostr.str());
}

virtual
int
check_arg(const std::vector<std::string> &argv, int location)
{
int argc(argv.size());
if (location + 1 < argc && argv[location] == m_name)
{
T v;
readvalue_from_string(v, argv[location + 1]);
this->insert(v);
std::cout << "\n\t" << m_name << " added: ";
writevalue_to_stream(v, std::cout);
return 2;
}
return 0;
}

virtual
void
print_command_line_description(std::ostream &ostr) const
{
ostr << "[" << m_name << " value] ";
}

virtual
void
print_detailed_description(std::ostream &ostr) const
{
ostr << m_description;
}

private:
std::string m_name, m_description;
};
6 changes: 0 additions & 6 deletions demos/common/sdl_painter_demo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -630,15 +630,9 @@ init_gl(int w, int h)
std::cout << "\tSolid StrokeShaders:\n";
print_stroke_shader_ids(sh.stroke_shader());

std::cout << "\tPixel Width Stroke Shaders:\n";
print_stroke_shader_ids(sh.pixel_width_stroke_shader());

std::cout << "\tDashed Stroke Shader:\n";
print_dashed_stroke_shader_ids(sh.dashed_stroke_shader());

std::cout << "\tPixel Width Dashed Stroke Shader:\n";
print_dashed_stroke_shader_ids(sh.pixel_width_dashed_stroke_shader());

std::cout << "\tFill Shader:" << sh.fill_shader().item_shader()->tag() << "\n";
}

Expand Down
26 changes: 10 additions & 16 deletions demos/painter_glyph_test/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -702,6 +702,10 @@ draw_frame(void)
PainterStrokeParams st;
st.miter_limit(5.0f);
st.width(m_stroke_width);
if (m_pixel_width_stroking)
{
st.stroking_units(PainterStrokeParams::pixel_stroking_units);
}

src = m_current_drawer;

Expand Down Expand Up @@ -731,22 +735,12 @@ draw_frame(void)
//path, thus we also need to negate in the y-direction.
m_painter->shear(sc, -sc);

if (m_pixel_width_stroking)
{
m_painter->stroke_path_pixel_width(PainterData(pst, pbr),
glyphs[i].path(),
true, PainterEnums::flat_caps,
static_cast<enum PainterEnums::join_style>(m_join_style),
m_anti_alias_path_stroking);
}
else
{
m_painter->stroke_path(PainterData(pst, pbr),
glyphs[i].path(),
true, PainterEnums::flat_caps,
static_cast<enum PainterEnums::join_style>(m_join_style),
m_anti_alias_path_stroking);
}
m_painter->stroke_path(PainterData(pst, pbr),
glyphs[i].path(),
true, PainterEnums::flat_caps,
static_cast<enum PainterEnums::join_style>(m_join_style),
m_anti_alias_path_stroking);

m_painter->restore();
}
}
Expand Down
Loading