QRCode.h
QRCode.h
CPP1/* Copyright Statement:2 *3 * (C) 2021-2025 Cubios Inc. All rights reserved.4 */5#pragma once6#include "SceneObject.h"7#include <string>89namespace Cubios10{11namespace Gfx12{13class QRCode: public Cubios::SceneObject14{15 public:1617 QRCode(std::string data, const Cubios::Math::Transform& t);18 QRCode(std::string data, float x, float y);19 QRCode(std::string data, const Cubios::Math::Transform& t, u32_t size);20 QRCode(std::string data, float x, float y, u32_t size);2122 QRCode(const QRCode& qr);23 virtual ~QRCode();2425 //inplace setters26 Cubios::SceneObject* SetSize(u32_t size);27 Cubios::SceneObject* SetColor(const Math::Color& color);28 Cubios::SceneObject* SetBackgroundColor(const Math::Color& color);29 Cubios::SceneObject* SetData(std::string data);3031 void Render() override;3233 public:34 Math::Color ColorZeros;35 Math::Color ColorOnes;3637 u32_t Size;3839 private:40 int16_t getNextID() {return rtc = (rtc+1) % 0xffff; }4142 private:43 u32_t resourceId;44 std::string data;4546 static u32_t rtc;47};48}49}50
Wrapped for easier reading. Turn wrap off to inspect exact line lengths.