we can create a HPEN or HBRUSH.
but can i create a HPEN from an image?
And to answer the inevitable question that probably won't be asked:
Yes, it is possible to draw lines from a texture (bitmap) in DirectX. Direct3D and Direct2D.
Trying to find out how to do that is not a simple 'net search, but IMO well worth the effort. Took me about 5 minutes to find usable link resources.
If I read correctly or ExtCreatePen() function, with LOGBRUSH::lbHatch, can do it?
"A hatch style. The meaning depends on the brush style defined by lbStyle.
If lbStyle is BS_DIBPATTERN, the lbHatch member contains a handle to a packed DIB. To obtain this handle, an application calls the GlobalAlloc function with GMEM_MOVEABLE (or LocalAlloc with LMEM_MOVEABLE) to allocate a block of memory and then fills the memory with the packed DIB. A packed DIB consists of a BITMAPINFO structure immediately followed by the array of bytes that define the pixels of the bitmap."
(sorry been late to answer, but i didn't get the notification)
Last edited on