Commit e04a3f07 authored by Paul Asmuth's avatar Paul Asmuth
Browse files

add new Context struct

parent 4c87c7f1
Loading
Loading
Loading
Loading
+8 −10
Original line number Diff line number Diff line
@@ -27,13 +27,12 @@ add_library(signaltk STATIC
    graphics/text_shaper.cc
    graphics/rasterize.cc
    graphics/png.cc
    components/plot/gridlines.cc
    components/plot/axes.cc
    components/plot/domain.cc
    components/plot/domainprovider.cc
    components/plot/legenddefinition.cc
    components/plot/series.cc
    components/plot/timedomain.cc
    elements/plot/gridlines.cc
    elements/plot/axes.cc
    elements/plot/plot_domain.cc
    elements/plot/plot_layout.cc
    elements/plot/legenddefinition.cc
    elements/plot/series.cc
    utils/random.cc
    utils/bufferutil.cc
    utils/exception.cc
@@ -51,12 +50,11 @@ add_library(signaltk STATIC
    utils/ISO8601.cc
    utils/UTF8.cc
    utils/wallclock.cc
    signaltk_cli.cc
    signaltk_cmd.cc)

set(SIGNALTK_LDFLAGS signaltk ${CAIRO_LIBRARIES} ${FREETYPE_LIBRARIES} ${HARFBUZZ_LIBRARIES} ${HARFBUZZ_ICU_LIBRARIES} ${PNG_LIBRARIES})

file(GLOB test_files "test/**/test_*.cc")
file(GLOB test_files "testing/**/test_*.cc")
foreach(test_path ${test_files})
  get_filename_component(test_name ${test_path} NAME_WE)
  get_filename_component(test_srcdir ${test_path} DIRECTORY)
@@ -66,5 +64,5 @@ foreach(test_path ${test_files})

  add_test(
      NAME ${test_name}
      COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/test/test_runner.sh ${CMAKE_CURRENT_BINARY_DIR}/${test_name} ${test_srcdir}/${test_name}.png)
      COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/testing/test_runner.sh ${CMAKE_CURRENT_BINARY_DIR}/${test_name} ${test_srcdir}/${test_name}.png)
endforeach()

elements/context.h

0 → 100644
+22 −0
Original line number Diff line number Diff line
/**
 * This file is part of the "signaltk" project
 *   Copyright (c) 2018 Paul Asmuth
 *
 * libstx is free software: you can redistribute it and/or modify it under
 * the terms of the GNU General Public License v3.0. You should have received a
 * copy of the GNU General Public License along with this program. If not, see
 * <http://www.gnu.org/licenses/>.
 */
#pragma once
#include "elements/plot/plot_config.h"
#include "graphics/layer.h"

namespace signaltk {

struct Context {
  PlotConfig plot_config;
  Layer frame;
};

} // namespace signaltk
+0 −2
Original line number Diff line number Diff line
@@ -12,7 +12,6 @@
#include <graphics/brush.h>

namespace signaltk {
namespace chart {

AxisDefinition::AxisDefinition() :
    enabled_(false),
@@ -173,4 +172,3 @@ Status renderAxisHorizontal(
}

}
}
+0 −2
Original line number Diff line number Diff line
@@ -15,7 +15,6 @@
#include <graphics/viewport.h>

namespace signaltk {
namespace chart {

static const double kDefaultLabelPaddingVertREM = 0.8f;
static const double kDefaultLabelPaddingHorizREM = 1.0f;
@@ -152,6 +151,5 @@ Status renderAxisHorizontal(
    double x1,
    Layer* target);

} // namespace chart
} // namespace signaltk
+0 −1
Original line number Diff line number Diff line
@@ -13,7 +13,6 @@
#include "graphics/brush.h"
#include "graphics/text.h"
#include "gridlines.h"
#include "domain.h"

namespace signaltk {
namespace chart {
Loading