From f2327d66d762a2279bf7b725a818a17a213e9e0b Mon Sep 17 00:00:00 2001
From: pans <pans@454eff88-639b-444f-9e54-f578c98de674>
Date: 星期三, 09 八月 2017 14:57:48 +0800
Subject: [PATCH] add RemoteMethod.capnp etc.
---
RtspFace/PL_Paint.h | 74 +++++++++++++++++++++++++++++++++++++
1 files changed, 74 insertions(+), 0 deletions(-)
diff --git a/RtspFace/PL_Paint.h b/RtspFace/PL_Paint.h
index 9421a02..66ada4c 100644
--- a/RtspFace/PL_Paint.h
+++ b/RtspFace/PL_Paint.h
@@ -2,6 +2,77 @@
#define _PL_PAINT_H_
#include "PipeLine.h"
+#include "GraphicHelper.h"
+
+#define ENABLE_WTEXT
+
+/*
+PLPaint Language:
+COLOR F/B,R,G,B,A
+FILL 0/1
+PEN TYPE,WIDTH
+RECT LTX,LTY,RBX,RBY
+TEXT LTX,LTY,"STRING"
+*/
+
+enum PLPLCmd
+{
+ PLPLC__FIRST,
+
+ PLPLC_COLOR,
+ PLPLC_FILL,
+ PLPLC_PEN,
+ PLPLC_RECT,
+ PLPLC_TEXT,
+ PLPLC_WTEXT,
+
+ PLPLC__LAST
+};
+
+union PLPLType
+{
+ int val_i;
+ float val_f;
+ char val_s[20];
+
+ PLPLType() : val_i(0) {}
+ PLPLType(int _val_i) : val_i(_val_i) {}
+ PLPLType(float _val_f) : val_f(_val_f) {}
+ PLPLType(const char* _val_s);
+ PLPLType(const wchar_t* _val_s);
+};
+
+typedef std::vector<PLPLCmd> plplc_vec_t;
+typedef std::vector<PLPLType> plplt_vec_t;
+
+struct PLPLContext
+{
+ plplc_vec_t cmds;
+ plplt_vec_t params;
+
+ PLGH_Color_RGBA color_front;
+ PLGH_Color_RGBA color_back;
+ int fill;
+ PLGH_Pen pen;
+ void* cvxText;
+
+ PLPLContext() :
+ cmds(), params(), color_front(), color_back(), fill(0), pen(0, 0), cvxText(nullptr)
+ {}
+
+ ~PLPLContext();
+};
+
+struct PL_Paint_Config
+{
+ bool copyData;
+ PLPLContext* plplCtx;
+ std::string fontPath;
+
+ PL_Paint_Config() :
+ copyData(false), plplCtx(nullptr), fontPath()
+ { }
+};
class PL_Paint : public PipeLineElem
{
@@ -16,6 +87,9 @@
virtual bool gain(PipeMaterial& pm);
private:
+ static bool pay_breaker_MBFT(const PipeMaterial* pm, void* args);
+
+private:
void* internal;
};
--
Gitblit v1.8.0