5#include "core/fxge/cfx_windowsrenderdevice.h"
11#include "core/fxge/cfx_fillrenderoptions.h"
12#include "core/fxge/cfx_path.h"
13#include "core/fxge/win32/cfx_psfonttracker.h"
14#include "testing/embedder_test.h"
15#include "testing/gtest/include/gtest/gtest.h"
29 m_hDC = CreateCompatibleDC(
nullptr);
31 m_driver = std::make_unique<CFX_WindowsRenderDevice>(
32 m_hDC, &m_PSFontTracker,
nullptr);
33 m_driver->SaveState();
37 m_driver->RestoreState(
false);
51 CFX_PointF p1(0.0f, 0.0f);
52 CFX_PointF p2(0.0f, 100.0f);
53 CFX_PointF p3(100.0f, 100.0f);
59 EXPECT_TRUE(m_driver->SetClip_PathFill(
60 path_data, &kIdentityMatrix, CFX_FillRenderOptions::WindingOptions()));
68 EXPECT_TRUE(m_driver->SetClip_PathFill(
69 path_data, &kIdentityMatrix, CFX_FillRenderOptions::WindingOptions()));
82 EXPECT_FALSE(m_driver->SetClip_PathFill(
83 path_data, &kIdentityMatrix, CFX_FillRenderOptions::WindingOptions()));
90 m_driver->SetBaseClip(kBaseClip);
96 EXPECT_TRUE(m_driver->SetClip_PathFill(
97 path_data, &kIdentityMatrix, CFX_FillRenderOptions::WindingOptions()));
TEST_F(CFX_WindowsRenderDeviceTest, SimpleClipTriangle)
void AppendRect(float left, float bottom, float right, float top)
void AppendLine(const CFX_PointF &pt1, const CFX_PointF &pt2)
CFX_PSFontTracker m_PSFontTracker
std::unique_ptr< CFX_WindowsRenderDevice > m_driver
constexpr FX_RECT(int l, int t, int r, int b)