Subversion Repositories tpanel

Rev

Rev 462 | Rev 480 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 462 Rev 479
Line 72... Line 72...
72
    {
72
    {
73
        int idx{0};
73
        int idx{0};
74
        std::string name;
74
        std::string name;
75
    }SYSTEF_t;
75
    }SYSTEF_t;
76
 
76
 
77
    typedef enum TEXT_ORIENTATION
77
    typedef enum ORIENTATION
78
    {
78
    {
79
        ORI_ABSOLUT,
79
        ORI_ABSOLUT,
80
        ORI_TOP_LEFT,
80
        ORI_TOP_LEFT,
81
        ORI_TOP_MIDDLE,
81
        ORI_TOP_MIDDLE,
82
        ORI_TOP_RIGHT,
82
        ORI_TOP_RIGHT,
83
        ORI_CENTER_LEFT,
83
        ORI_CENTER_LEFT,
84
        ORI_CENTER_MIDDLE,		// default
84
        ORI_CENTER_MIDDLE,		// default
85
        ORI_CENTER_RIGHT,
85
        ORI_CENTER_RIGHT,
86
        ORI_BOTTOM_LEFT,
86
        ORI_BOTTOM_LEFT,
87
        ORI_BOTTOM_MIDDLE,
87
        ORI_BOTTOM_MIDDLE,
88
        ORI_BOTTOM_RIGHT
88
        ORI_BOTTOM_RIGHT,
-
 
89
        ORI_SCALE_FIT,          // G5 scale to fit
-
 
90
        ORI_SCALE_ASPECT        // G5 scale maintain aspect ratio
89
    } TEXT_ORIENTATION;
91
    }ORIENTATION;
90
 
92
 
91
    typedef enum TEXT_EFFECT
93
    typedef enum TEXT_EFFECT
92
    {
94
    {
93
        EFFECT_NONE,
95
        EFFECT_NONE,
94
        EFFECT_OUTLINE_S,
96
        EFFECT_OUTLINE_S,
Line 187... Line 189...
187
        SVP_CENTER,
189
        SVP_CENTER,
188
        SVP_LEFT_TOP,
190
        SVP_LEFT_TOP,
189
        SVP_RIGHT_BOTTOM
191
        SVP_RIGHT_BOTTOM
190
    }SUBVIEW_POSITION_t;
192
    }SUBVIEW_POSITION_t;
191
 
193
 
-
 
194
    /**
-
 
195
     * Justification values:
-
 
196
     *    0 = absolut
-
 
197
     *    1 = top right
-
 
198
     *    2 = top middle
-
 
199
     *    3 = top right
-
 
200
     *    4 = center left
-
 
201
     *    5 = center middle (default)
-
 
202
     *    6 = center right
-
 
203
     *    7 = bottom left
-
 
204
     *    8 = bottom middle
-
 
205
     *    9 = bottom right
-
 
206
     *   10 = scale to fit (ignore aspect ration)
-
 
207
     *   11 = scale maintain aspect ratio
-
 
208
     */
-
 
209
    typedef struct BITMAPS_t    // G5 bitmap entry
-
 
210
    {
-
 
211
        std::string fileName;   // file name of the bitmap (replaces icons)
-
 
212
        ORIENTATION justification{ORI_CENTER_MIDDLE};   // Justification of bitmap
-
 
213
        int offsetX{0};         // Absolut X position (only if justification is 0)
-
 
214
        int offsetY{0};         // Absolut Y position (only if justification is 0)
-
 
215
    }BITMAPS_t;
-
 
216
 
192
    typedef struct SR_T
217
    typedef struct SR_T
193
    {
218
    {
194
        int number{0};
219
        int number{0};
195
        std::string _do;        // Order on how to show a multistate bargraph (010203...)
220
        std::string _do;        // Order on how to show a multistate bargraph (010203...)
196
        std::string bs;         // Frame type (circle, ...)
221
        std::string bs;         // Frame type (circle, ...)
Line 200... Line 225...
200
        std::string cb;         // Border color
225
        std::string cb;         // Border color
201
        std::string cf;         // Fill color
226
        std::string cf;         // Fill color
202
        std::string ct;         // Text Color
227
        std::string ct;         // Text Color
203
        std::string ec;         // Text effect color
228
        std::string ec;         // Text effect color
204
        std::string bm;         // bitmap file name
229
        std::string bm;         // bitmap file name
205
        std::vector<std::string> bitmaps;   // G5 table of bitmaps
230
        std::vector<BITMAPS_t> bitmaps;   // G5 table of bitmaps
206
        std::string sd;         // Sound file to play
231
        std::string sd;         // Sound file to play
207
        int bm_width{0};        // Width of image
232
        int bm_width{0};        // Width of image
208
        int bm_height{0};       // Height of image
233
        int bm_height{0};       // Height of image
209
        bool dynamic{false};    // TRUE = moving image
234
        bool dynamic{false};    // TRUE = moving image
210
        int sb{0};              // Index to external graphics download
235
        int sb{0};              // Index to external graphics download
Line 215... Line 240...
215
        int jb{5};              // Image position (center, left, ...), default 5 = center+middle
240
        int jb{5};              // Image position (center, left, ...), default 5 = center+middle
216
        int bx{0};              // Absolute image position x
241
        int bx{0};              // Absolute image position x
217
        int by{0};              // Absolute image position y
242
        int by{0};              // Absolute image position y
218
        int fi{0};              // Font index
243
        int fi{0};              // Font index
219
        std::string te;         // Text
244
        std::string te;         // Text
220
        TEXT_ORIENTATION jt{ORI_CENTER_MIDDLE}; // Text orientation
245
        ORIENTATION jt{ORI_CENTER_MIDDLE}; // Text orientation
221
        int tx{0};              // Text X position
246
        int tx{0};              // Text X position
222
        int ty{0};              // Text Y position
247
        int ty{0};              // Text Y position
223
        std::string ff;         // G5 font file name
248
        std::string ff;         // G5 font file name
224
        int fs{0};              // G5 font size
249
        int fs{0};              // G5 font size
225
        int ww{0};              // line break when 1
250
        int ww{0};              // line break when 1
Line 1328... Line 1353...
1328
            void _imageRefresh(const std::string& url);
1353
            void _imageRefresh(const std::string& url);
1329
            static THR_REFRESH_t *_addResource(TImageRefresh *refr, ulong handle, ulong parent, int bi);
1354
            static THR_REFRESH_t *_addResource(TImageRefresh *refr, ulong handle, ulong parent, int bi);
1330
            static THR_REFRESH_t *_findResource(ulong handle, ulong parent, int bi);
1355
            static THR_REFRESH_t *_findResource(ulong handle, ulong parent, int bi);
1331
            int calcLineHeight(const std::string& text, SkFont& font);
1356
            int calcLineHeight(const std::string& text, SkFont& font);
1332
            bool textEffect(SkCanvas *canvas, sk_sp<SkTextBlob>& blob, SkScalar startX, SkScalar startY, int instance);
1357
            bool textEffect(SkCanvas *canvas, sk_sp<SkTextBlob>& blob, SkScalar startX, SkScalar startY, int instance);
1333
            std::string getFormatString(TEXT_ORIENTATION to);
1358
            std::string getFormatString(ORIENTATION to);
1334
            bool checkForSound();
1359
            bool checkForSound();
1335
            bool scaleImage(SkBitmap *bm, double scaleWidth, double scaleHeight);
1360
            bool scaleImage(SkBitmap *bm, double scaleWidth, double scaleHeight);
1336
            bool stretchImageWidth(SkBitmap *bm, int width);
1361
            bool stretchImageWidth(SkBitmap *bm, int width);
1337
            bool stretchImageHeight(SkBitmap *bm, int height);
1362
            bool stretchImageHeight(SkBitmap *bm, int height);
1338
            bool stretchImageWH(SkBitmap *bm, int width, int height);
1363
            bool stretchImageWH(SkBitmap *bm, int width, int height);