File: gstdwrite-effect.h

package info (click to toggle)
gst-plugins-bad1.0 1.26.10-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 69,996 kB
  • sloc: ansic: 722,568; cpp: 278,154; objc: 3,556; xml: 3,351; sh: 1,095; python: 508; makefile: 175; java: 75
file content (70 lines) | stat: -rw-r--r-- 2,324 bytes parent folder | download | duplicates (5)
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/* GStreamer
 * Copyright (C) 2023 Seungha Yang <seungha@centricular.com>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public
 * License along with this library; if not, write to the
 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
 * Boston, MA 02110-1301, USA.
 */

#pragma once

#include <gst/gst.h>
#include "gstdwrite-enums.h"

enum GST_DWRITE_BRUSH_TARGET
{
  GST_DWRITE_BRUSH_FORGROUND = 0,
  GST_DWRITE_BRUSH_OUTLINE,
  GST_DWRITE_BRUSH_UNDERLINE,
  GST_DWRITE_BRUSH_STRIKETHROUGH,
  GST_DWRITE_BRUSH_SHADOW,
  GST_DWRITE_BRUSH_BACKGROUND,
  GST_DWRITE_BRUSH_LAST
};

DEFINE_GUID (IID_IGstDWriteTextEffect, 0x23c579ae, 0x2e18,
    0x11ed, 0xa2, 0x61, 0x02, 0x42, 0xac, 0x12, 0x00, 0x02);
class IGstDWriteTextEffect : public IUnknown
{
public:
  static STDMETHODIMP         CreateInstance (IGstDWriteTextEffect ** effect);
  static STDMETHODIMP_ (BOOL) IsEnabledColor (const D2D1_COLOR_F & color);

  /* IUnknown */
  STDMETHODIMP_ (ULONG) AddRef  (void);
  STDMETHODIMP_ (ULONG) Release (void);
  STDMETHODIMP QueryInterface   (REFIID riid,
                                 void ** object);

  /* effect methods */
  STDMETHODIMP Clone         (IGstDWriteTextEffect ** effect);
  STDMETHODIMP GetBrushColor (GST_DWRITE_BRUSH_TARGET target,
                              D2D1_COLOR_F * color,
                              BOOL * enabled);
  STDMETHODIMP SetBrushColor (GST_DWRITE_BRUSH_TARGET target,
                              const D2D1_COLOR_F * color);

  STDMETHODIMP SetEnableColorFont (BOOL enable);

  STDMETHODIMP GetEnableColorFont (BOOL * enable);

private:
  IGstDWriteTextEffect (void);
  virtual ~IGstDWriteTextEffect (void);

private:
  ULONG ref_count_ = 1;
  D2D1_COLOR_F brush_[GST_DWRITE_BRUSH_LAST];
  BOOL enable_color_font_ = FALSE;
};