You've already forked libart-paperback
Compare commits
14 Commits
v0.1.0-a.0
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
d77e76fc95
|
|||
|
e79bdd5eb6
|
|||
|
f58cf461b7
|
|||
|
d62c370039
|
|||
|
7f73ddb033
|
|||
|
46a34911f0
|
|||
|
6cfb014a4d
|
|||
|
0cbd10cff3
|
|||
|
4dbe3da558
|
|||
|
e9d0447205
|
|||
|
4230bb6753
|
|||
|
3d7cc2290c
|
|||
|
54b9cfe2c7
|
|||
|
1954b53170
|
@@ -9,6 +9,7 @@ on:
|
||||
|
||||
jobs:
|
||||
build-and-test:
|
||||
if: github.repository == 'art/libart-paperback'
|
||||
runs-on: linux
|
||||
container: code.helloryan.se/art/infra/buildenv/x86_64-fedora_42-unified:latest
|
||||
volumes:
|
||||
|
||||
43
.gitea/workflows/publish-docs-nightly.yaml
Normal file
43
.gitea/workflows/publish-docs-nightly.yaml
Normal file
@@ -0,0 +1,43 @@
|
||||
name: publisb-docs-nightly
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 5 * * *'
|
||||
|
||||
jobs:
|
||||
build-and-publish:
|
||||
if: github.repository == 'art/libart-paperback'
|
||||
runs-on: linux
|
||||
container: code.helloryan.se/art/infra/buildenv/x86_64-fedora_42-unified:latest
|
||||
volumes:
|
||||
- /source
|
||||
- /build
|
||||
steps:
|
||||
- name: Create directories
|
||||
run: |
|
||||
mkdir -p /source /build
|
||||
- name: Configure repository access
|
||||
run: |
|
||||
git config --global http.$GITHUB_SERVER_URL/.extraheader "Authorization: token ${{ secrets.ACT_RUNNER_TOKEN }}"
|
||||
- name: Configure build directory
|
||||
run: |
|
||||
bpkg create -d /build cc config.cxx=clang++ config.cc.coptions="-Wall -Werror -Wno-unknown-pragmas -Wno-overloaded-virtual"
|
||||
- name: Clone source package
|
||||
run: |
|
||||
cd /source
|
||||
git clone $GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git .
|
||||
git checkout $GITHUB_SHA
|
||||
- name: Initialize package
|
||||
run: |
|
||||
bdep init -A /build -d /source
|
||||
- name: Build documentation
|
||||
run: |
|
||||
cd /source
|
||||
b alias{docs-private}
|
||||
- name: Configure MinIO CLI
|
||||
run: |
|
||||
mc alias set garage https://buckets.helloryan.se/ ${{ secrets.DOCS_BUCKET_ACCESS_KEY }} ${{ secrets.DOCS_BUCKET_SECRET_KEY }}
|
||||
- name: Publish documentation
|
||||
run: |
|
||||
cd /build/libart-paperback/docs/html
|
||||
mc cp -r * garage/docs.helloryan.se/libart-paperback/
|
||||
2
LICENSE
2
LICENSE
@@ -13,7 +13,7 @@ modification, are permitted provided that the following conditions are met:
|
||||
3. All advertising materials mentioning features or use of this software must
|
||||
display the following acknowledgement:
|
||||
|
||||
This product includes software developed by Ryan, http://helloryan.se/.
|
||||
This product includes software developed by Ryan, https://helloryan.se/.
|
||||
|
||||
4. Neither the name(s) of the copyright holder(s) nor the names of its
|
||||
contributors may be used to endorse or promote products derived from this
|
||||
|
||||
24
README.md
24
README.md
@@ -1,12 +1,22 @@
|
||||
\page readme README
|
||||
|
||||
[![Build Status][build-badge]](https://code.helloryan.se/art/libart-paperback/actions)
|
||||
[![Documentation][docs-badge]](https://docs.helloryan.se/libart-paperback/)
|
||||
[![License][license-badge]](https://code.helloryan.se/art/libart-paperback/src/branch/master/LICENSE)
|
||||
[![Sponsor][sponsor-badge]](https://patreon.com/helloryan)
|
||||
[![Language][language-badge]](https://en.wikipedia.org/wiki/C++)
|
||||
[![Build System][build2-badge]](https://build2.org/)
|
||||
[![Made with Love][made-with-love-badge]](https://helloryan.se/)
|
||||
[![Discord][discord-badge]](https://discord.gg/dCFMwrbNSP)
|
||||
|
||||
# libart-paperback
|
||||
|
||||
libart-paperback is a PDF library for C++.
|
||||
|
||||
## Feature Requests
|
||||
|
||||
Feature requests can be sent to ryan@helloryan.se.
|
||||
Feature requests can be sent to art@helloryan.se or you can join the
|
||||
Art Discord and have a chat: https://discord.gg/dCFMwrbNSP.
|
||||
|
||||
## Build System
|
||||
|
||||
@@ -44,6 +54,18 @@ private class members.
|
||||
Developer documentation will be written to the same directory as the
|
||||
public documentation, i.e. `$out_root$/docs`.
|
||||
|
||||
Developer documentation is built nightly from `master` and can be found
|
||||
at: https://docs.helloryan.se/libart-paperback/.
|
||||
|
||||
## GitHub Pull Requests
|
||||
|
||||
Pull requests on GitHub will definitely be ignored.
|
||||
|
||||
[build-badge]: https://code.helloryan.se/art/libart-paperback/actions/workflows/on-push.yaml/badge.svg
|
||||
[docs-badge]: https://code.helloryan.se/art/libart-paperback/actions/workflows/publish-docs-nightly.yaml/badge.svg
|
||||
[license-badge]: https://img.shields.io/badge/License-BSD_4--Clause-orange
|
||||
[sponsor-badge]: https://img.shields.io/badge/Sponsor-Patreon-green?logo=patreon&logoColor=white
|
||||
[language-badge]: https://img.shields.io/badge/Language-C++-blue?logo=cplusplus&logoColor=white
|
||||
[build2-badge]: https://img.shields.io/badge/Powered_by-build2-red
|
||||
[made-with-love-badge]: https://img.shields.io/badge/Made_with_%E2%9D%A4%EF%B8%8F_by-RYAN-red
|
||||
[discord-badge]: https://img.shields.io/discord/1444936129718522024?logo=discord&logoColor=white&label=Discord&color=blue
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace Art::Paperback::Carousel
|
||||
///
|
||||
using iterator = typename deque<Object>::iterator;
|
||||
|
||||
/// Immutbale iterator type.
|
||||
/// Immutable iterator type.
|
||||
///
|
||||
using const_iterator = typename deque<Object>::const_iterator;
|
||||
|
||||
|
||||
@@ -192,7 +192,7 @@ namespace Art::Paperback::Graphics
|
||||
///
|
||||
void
|
||||
Canvas::
|
||||
set_stroke(RGB const& color)
|
||||
set_stroke(Color_RGB const& color)
|
||||
{
|
||||
internal->write(color.red());
|
||||
internal->write(' ');
|
||||
@@ -210,7 +210,7 @@ namespace Art::Paperback::Graphics
|
||||
///
|
||||
void
|
||||
Canvas::
|
||||
set_fill(RGB const& color)
|
||||
set_fill(Color_RGB const& color)
|
||||
{
|
||||
internal->write(color.red());
|
||||
internal->write(' ');
|
||||
|
||||
@@ -64,12 +64,12 @@ namespace Art::Paperback::Graphics
|
||||
/// Set stroke RGB color.
|
||||
///
|
||||
void
|
||||
set_stroke(RGB const&);
|
||||
set_stroke(Color_RGB const&);
|
||||
|
||||
/// Set fill RGB color.
|
||||
///
|
||||
void
|
||||
set_fill(RGB const&);
|
||||
set_fill(Color_RGB const&);
|
||||
|
||||
class Path;
|
||||
friend Path;
|
||||
|
||||
@@ -3,33 +3,33 @@
|
||||
namespace Art::Paperback::Graphics
|
||||
{
|
||||
|
||||
RGB::
|
||||
RGB()
|
||||
Color_RGB::
|
||||
Color_RGB()
|
||||
{}
|
||||
|
||||
/// \param red The red component.
|
||||
/// \param green The green component.
|
||||
/// \param blue The blue component.
|
||||
RGB::
|
||||
RGB(double red, double green, double blue)
|
||||
Color_RGB::
|
||||
Color_RGB(double red, double green, double blue)
|
||||
: _red{red},
|
||||
_green{green},
|
||||
_blue{blue}
|
||||
{}
|
||||
|
||||
/// \param other The RGB to copy from.
|
||||
/// \param other The Color_RGB to copy from.
|
||||
///
|
||||
RGB::
|
||||
RGB(RGB const& other)
|
||||
Color_RGB::
|
||||
Color_RGB(Color_RGB const& other)
|
||||
: _red{other._red},
|
||||
_green{other._green},
|
||||
_blue{other._blue}
|
||||
{}
|
||||
|
||||
/// \param other The RGB to move from.
|
||||
/// \param other The Color_RGB to move from.
|
||||
///
|
||||
RGB::
|
||||
RGB(RGB&& other)
|
||||
Color_RGB::
|
||||
Color_RGB(Color_RGB&& other)
|
||||
: _red{other._red},
|
||||
_green{other._green},
|
||||
_blue{other._blue}
|
||||
@@ -38,7 +38,7 @@ namespace Art::Paperback::Graphics
|
||||
/// \return Returns the red component.
|
||||
///
|
||||
double
|
||||
RGB::
|
||||
Color_RGB::
|
||||
red() const
|
||||
{
|
||||
return _red;
|
||||
@@ -47,7 +47,7 @@ namespace Art::Paperback::Graphics
|
||||
/// \return Returns the green component.
|
||||
///
|
||||
double
|
||||
RGB::
|
||||
Color_RGB::
|
||||
green() const
|
||||
{
|
||||
return _green;
|
||||
@@ -56,17 +56,17 @@ namespace Art::Paperback::Graphics
|
||||
/// \return Returns the blue component.
|
||||
///
|
||||
double
|
||||
RGB::
|
||||
Color_RGB::
|
||||
blue() const
|
||||
{
|
||||
return _blue;
|
||||
}
|
||||
|
||||
/// \param other The RGB to copy from.
|
||||
/// \param other The Color_RGB to copy from.
|
||||
///
|
||||
RGB&
|
||||
RGB::
|
||||
operator=(RGB const& other)
|
||||
Color_RGB&
|
||||
Color_RGB::
|
||||
operator=(Color_RGB const& other)
|
||||
{
|
||||
_red = other._red;
|
||||
_green = other._green;
|
||||
@@ -75,11 +75,11 @@ namespace Art::Paperback::Graphics
|
||||
return *this;
|
||||
}
|
||||
|
||||
/// \param other The RGB to move from.
|
||||
/// \param other The Color_RGB to move from.
|
||||
///
|
||||
RGB&
|
||||
RGB::
|
||||
operator=(RGB&& other)
|
||||
Color_RGB&
|
||||
Color_RGB::
|
||||
operator=(Color_RGB&& other)
|
||||
{
|
||||
_red = other._red;
|
||||
_green = other._green;
|
||||
|
||||
@@ -22,24 +22,24 @@ namespace Art::Paperback::Graphics
|
||||
|
||||
/// Represents an RGB color value.
|
||||
///
|
||||
class RGB
|
||||
class Color_RGB
|
||||
{
|
||||
public:
|
||||
/// Constructor.
|
||||
///
|
||||
RGB();
|
||||
Color_RGB();
|
||||
|
||||
/// Constructor.
|
||||
///
|
||||
RGB(RGB const&);
|
||||
Color_RGB(Color_RGB const&);
|
||||
|
||||
/// Constructor.
|
||||
///
|
||||
RGB(RGB&&);
|
||||
Color_RGB(Color_RGB&&);
|
||||
|
||||
/// Constructor.
|
||||
///
|
||||
RGB(double, double, double);
|
||||
Color_RGB(double, double, double);
|
||||
|
||||
/// Access red component.
|
||||
///
|
||||
@@ -58,13 +58,13 @@ namespace Art::Paperback::Graphics
|
||||
|
||||
/// Assignment.
|
||||
///
|
||||
RGB&
|
||||
operator=(RGB const&);
|
||||
Color_RGB&
|
||||
operator=(Color_RGB const&);
|
||||
|
||||
/// Assignment.
|
||||
///
|
||||
RGB&
|
||||
operator=(RGB&&);
|
||||
Color_RGB&
|
||||
operator=(Color_RGB&&);
|
||||
|
||||
private:
|
||||
double _red{};
|
||||
|
||||
@@ -59,8 +59,8 @@ namespace Art::Paperback::Internals
|
||||
Graphics::Color_space cs_stroke{Graphics::Color_space::device_grey};
|
||||
Graphics::Color_space cs_fill{Graphics::Color_space::device_grey};
|
||||
|
||||
Graphics::RGB rgb_stroke;
|
||||
Graphics::RGB rgb_fill;
|
||||
Graphics::Color_RGB rgb_stroke;
|
||||
Graphics::Color_RGB rgb_fill;
|
||||
|
||||
double grey_stroke{};
|
||||
double grey_fill{};
|
||||
|
||||
Reference in New Issue
Block a user