Direct2D Draw and Fill

---恢复内容开始---

画线:

ID2D1RenderTarget::DrawLine

virtual void DrawLine(
                  D2D1_POINT_2F point0,//起点
                  D2D1_POINT_2F point1,//终点
  [in]            ID2D1Brush *brush,
                  FLOAT strokeWidth = 1.0f,//线条粗细
  [in, optional]  ID2D1StrokeStyle *strokeStyle = NULL//可省略
) = 0;

 

椭圆:

struct D2D1_ELLIPSE {
  D2D1_POINT_2F point;
  FLOAT         radiusX;
  FLOAT         radiusY;
};

矩形:

圆角矩形:

struct D2D1_ROUNDED_RECT {
  D2D1_RECT_F rect;
  FLOAT       radiusX;
  FLOAT       radiusY;
};

画轮廓:

ID2D1RenderTarget::DrawEllipse

void DrawEllipse(
  [ref]           const D2D1_ELLIPSE &ellipse,
  [in]            ID2D1Brush *brush,
                  FLOAT strokeWidth = 1.0f,
  [in, optional]  ID2D1StrokeStyle *strokeStyle = NULL
);

ID2D1RenderTarget::DrawRectangle

void DrawRectangle(
  [ref]           const D2D1_RECT_F &rect,
  [in]            ID2D1Brush *brush,
                  FLOAT strokeWidth = 1.0f,
  [in, optional]  ID2D1StrokeStyle *strokeStyle = NULL
);

ID2D1RenderTarget::DrawRoundedRectangle

 

void DrawRoundedRectangle(
  [ref]           const D2D1_ROUNDED_RECT &roundedRect,
  [in]            ID2D1Brush *brush,
                  FLOAT strokeWidth = 1.0f,
  [in, optional]  ID2D1StrokeStyle *strokeStyle = NULL
);

 

 

 

填充:

ID2D1RenderTarget::FillEllipse

void FillEllipse(
  [ref]  const D2D1_ELLIPSE &ellipse,
  [in]   ID2D1Brush *brush
);

ID2D1RenderTarget::FillRectangle 

 

void FillRectangle(
  [ref]  const D2D1_RECT_F &rect,
  [in]   ID2D1Brush *brush
);

 

ID2D1RenderTarget::FillRoundedRectangle 

void FillRoundedRectangle(
  [ref]  const D2D1_ROUNDED_RECT &roundedRect,
  [in]   ID2D1Brush *brush
);

 

 

 

---恢复内容结束---

转载于:https://www.cnblogs.com/hxml/p/5184792.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值