トップ回答者
自前でキャレットを点滅させるには

質問
-
回答
-
メモ帳をSpyで見ると、定期的にWindow MessageをPostし、
そのMessageを受け取ったタイミングでCaretの描画処理(点滅)を行っています。
Timerに類似した仕組みを利用していると思います。点滅のタイミングは、同じようにTimerで定期的に処理を行ってみては如何でしょうか。
あと、Caretの描画はXORで描画できると良いのですが、
Direct2Dでそのような方法は見つけられませんでした。参考までに以下のblogのcommentに少し情報があるので紹介しておきますね。
[Comparing Direct2D and GDI]
http://blogs.msdn.com/b/directx/archive/2009/09/28/comparing-direct2d-and-gdi.aspx?PageIndex=9&title=TITLE_REPLACE&desc=&h=TITLE_REPLACE&h=TITLE_REPLACE----------------------
Q: What is the Direct2D equivalent of GDI's SetROP2 function?
A: For the functionality of blending a source with a destination, Direct2D uses opacity and source-over blending. You can set the opacity on any brush and the DrawBitmap call also has an opacity value. Some ROPs, such as R2_XORPEN have usage outside of blending, however, since these are pixel-based they only work well with some kind of integer or normalized pixel-format. What ROP functions were you wanting to use?
----------------------
もしその点で困っているのであれば、上記blogにcommentすれば、なにか情報が頂けるかも知れません。
- 回答としてマーク jbh03215 2011年8月12日 12:13
すべての返信
-
メモ帳をSpyで見ると、定期的にWindow MessageをPostし、
そのMessageを受け取ったタイミングでCaretの描画処理(点滅)を行っています。
Timerに類似した仕組みを利用していると思います。点滅のタイミングは、同じようにTimerで定期的に処理を行ってみては如何でしょうか。
あと、Caretの描画はXORで描画できると良いのですが、
Direct2Dでそのような方法は見つけられませんでした。参考までに以下のblogのcommentに少し情報があるので紹介しておきますね。
[Comparing Direct2D and GDI]
http://blogs.msdn.com/b/directx/archive/2009/09/28/comparing-direct2d-and-gdi.aspx?PageIndex=9&title=TITLE_REPLACE&desc=&h=TITLE_REPLACE&h=TITLE_REPLACE----------------------
Q: What is the Direct2D equivalent of GDI's SetROP2 function?
A: For the functionality of blending a source with a destination, Direct2D uses opacity and source-over blending. You can set the opacity on any brush and the DrawBitmap call also has an opacity value. Some ROPs, such as R2_XORPEN have usage outside of blending, however, since these are pixel-based they only work well with some kind of integer or normalized pixel-format. What ROP functions were you wanting to use?
----------------------
もしその点で困っているのであれば、上記blogにcommentすれば、なにか情報が頂けるかも知れません。
- 回答としてマーク jbh03215 2011年8月12日 12:13