Welcome to mirror list, hosted at ThFree Co, Russian Federation.

circle_info.hpp « software_renderer - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: df7d5e9d7af3eed778668e46512a6284267fe449 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#pragma once

#include "drape/drape_global.hpp"

namespace software_renderer
{

struct CircleInfo
{
  unsigned m_radius;
  dp::Color m_color;
  bool m_isOutlined;
  unsigned m_outlineWidth;
  dp::Color m_outlineColor;

  CircleInfo() = default;
  CircleInfo(double radius,
             dp::Color const & color = dp::Color(0, 0, 0, 255),
             bool isOutlined = false,
             double outlineWidth = 1,
             dp::Color const & outlineColor = dp::Color(255, 255, 255, 255))
    : m_radius(base::rounds(radius))
    , m_color(color)
    , m_isOutlined(isOutlined)
    , m_outlineWidth(base::rounds(outlineWidth))
    , m_outlineColor(outlineColor)
  {
    if (!m_isOutlined)
    {
      m_outlineWidth = 0;
      m_outlineColor = dp::Color(0, 0, 0, 0);
    }
  }
};

}