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

circle.hpp « graphics - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 6d5a9e0b83a87014a9436b7fffe43816afe8475c (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
37
38
39
40
41
42
43
44
#pragma once

#include "color.hpp"
#include "resource.hpp"

#include "../geometry/point2d.hpp"

namespace graphics
{
  struct Circle : public Resource
  {
    struct Info : public Resource::Info
    {
      unsigned m_radius;
      Color m_color;
      bool m_isOutlined;
      unsigned m_outlineWidth;
      Color m_outlineColor;

      Info();
      Info(double radius,
           Color const & color = Color(0, 0, 0, 255),
           bool isOutlined = false,
           double outlineWidth = 1,
           Color const & outlineColor = Color(255, 255, 255, 255));

      Resource::Info const & cacheKey() const;
      m2::PointU const resourceSize() const;
      Resource * createResource(m2::RectU const & texRect,
                                uint8_t pipelineID) const;

      bool lessThan(Resource::Info const * r) const;
    };

    Info m_info;

    Circle(m2::RectU const & texRect,
           int pipelineID,
           Info const & info);

    void render(void * dst);
    Resource::Info const * info() const;
  };
}