Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:28:08

0001 // This file is part of the actsvg packge.
0002 //
0003 // Copyright (C) 2022 CERN for the benefit of the ACTS project
0004 //
0005 // This Source Code Form is subject to the terms of the Mozilla Public
0006 // License, v. 2.0. If a copy of the MPL was not distributed with this
0007 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
0008 
0009 #pragma once
0010 
0011 #include "actsvg/core.hpp"
0012 
0013 namespace actsvg {
0014 
0015 namespace defaults {
0016 
0017 // Empty object for displaying
0018 static svg::object __e_object;
0019 
0020 // Title style
0021 static style::font __t_font;
0022 
0023 // Sensitive surface section, including backside
0024 static style::fill __s_fill;
0025 static style::stroke __s_stroke;
0026 
0027 static style::fill __bs_fill;
0028 static style::stroke __bs_stroke;
0029 
0030 // Support surface section
0031 static style::fill __ss_fill;
0032 static style::stroke __ss_stroke;
0033 
0034 // Measure
0035 static style::marker __m_marker;
0036 static style::stroke __m_stroke;
0037 static style::stroke __m_stroke_guide;
0038 static style::font __m_font;
0039 
0040 // Grid information
0041 static style::fill __g_fill;
0042 static style::stroke __g_stroke;
0043 
0044 // Axis section
0045 static style::stroke __a_stroke;
0046 static style::font __a_font;
0047 static std::array<style::marker, 2u> __a_markers = __standard_axis_markers;
0048 
0049 // Background panel
0050 static style::fill __bg_fill;
0051 static style::stroke __bg_stroke;
0052 
0053 // Transform section
0054 static style::transform __t_identity;
0055 
0056 // White fill, white stroke
0057 static style::fill __w_fill;
0058 static style::stroke __w_stroke;
0059 
0060 // No fill, no stroke
0061 static style::fill __nn_fill;
0062 static style::stroke __nn_stroke;
0063 
0064 /** Static method to create the defaults in situ */
0065 static bool create_defaults() {
0066 
0067     // Title font
0068     __t_font._size = 14;
0069 
0070     // Sensitive fill and stroke
0071     __s_fill._fc._rgb = {66, 182, 245};
0072     __s_fill._fc._opacity = 0.75;
0073     __s_fill._fc._highlight = {"mouseover", "mouseout"};
0074     __s_fill._fc._hl_rgb = {245, 182, 66};
0075 
0076     __bs_fill._fc._rgb = {40, 83, 237};
0077     __bs_fill._fc._opacity = 0.75;
0078     __bs_fill._fc._highlight = {"mouseover", "mouseout"};
0079     __bs_fill._fc._hl_rgb = {237, 83, 40};
0080 
0081     __ss_fill._fc._rgb = {86, 90, 112};
0082     __ss_fill._fc._opacity = 0.75;
0083     __ss_fill._fc._highlight = {"mouseover", "mouseout"};
0084     __ss_fill._fc._hl_rgb = {76, 153, 84};
0085 
0086     // Stroke definition
0087     __s_stroke._sc._opacity = 1.;
0088     __s_stroke._width = 0.75;
0089 
0090     // Measurement
0091     __m_stroke = style::stroke();
0092     __m_stroke_guide = style::stroke();
0093     __m_stroke_guide._dasharray = {1, 1};
0094     __m_marker = style::marker({"|<"});
0095 
0096     // Grid
0097     __g_fill._fc._rgb = {200, 200, 200};
0098     __g_fill._fc._opacity = 0.;
0099     __g_stroke._sc._rgb = {255, 0, 0};
0100     __g_stroke._width = 0.5;
0101     __g_stroke._hl_width = 4;
0102 
0103     // Background panel
0104     __bg_fill._fc._rgb = {235, 235, 235};
0105     __bg_fill._fc._opacity = 90.;
0106     __bg_stroke._sc._rgb = {205, 205, 205};
0107     __bg_stroke._width = 0.5;
0108 
0109     // Transform
0110     __t_identity = style::transform();
0111 
0112     // Whites
0113     __w_fill._fc._rgb = {255, 255, 255};
0114     __w_stroke._sc._rgb = {255, 255, 255};;
0115 
0116     // Nulls
0117     __nn_fill = style::fill();
0118 
0119     __nn_stroke = style::stroke();
0120     __nn_stroke._sterile = true;
0121     __nn_stroke._width = 0.;
0122 
0123     return true;
0124 }
0125 
0126 static bool __defaults_set = create_defaults();
0127 
0128 }  // namespace defaults
0129 
0130 }  // namespace actsvg