summaryrefslogtreecommitdiff
path: root/src/render/pass/RectPassElement.hpp
blob: c83d52ec9b3256d7262fd01d11186e2ec9569f2f (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
#pragma once
#include "PassElement.hpp"

class CRectPassElement : public IPassElement {
  public:
    struct SRectData {
        CBox       box;
        CHyprColor color;
        int        round         = 0;
        float      roundingPower = 2.0f;
        bool       blur = false, xray = false;
        float      blurA = 1.F;
        CBox       clipBox;
    };

    CRectPassElement(const SRectData& data);
    virtual ~CRectPassElement() = default;

    virtual void                draw(const CRegion& damage);
    virtual bool                needsLiveBlur();
    virtual bool                needsPrecomputeBlur();
    virtual std::optional<CBox> boundingBox();
    virtual CRegion             opaqueRegion();

    virtual const char*         passName() {
        return "CRectPassElement";
    }

  private:
    SRectData m_data;
};