Bonjour, j'aimerais dessiner une polyligne avec une HBRUSH pour laquelle j'ai spécifié un pattern. Cependant j'ai toujours un tracé en ligne pleine et pas avec le pattern passé à la HBRUSH.
Voici le code que j'utilise :
Il ya sûrement quelquechose que je fais mal, quelqu'un peut-il m'éclairer?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11 BYTE bBits[] = { 0x00, 0x22, 0x44, 0x88, 0x00, 0x22, 0x44, 0x88, 0x22, 0x44, 0x88, 0x00, 0x22, 0x44, 0x88, 0x00, 0x44, 0x88, 0x00, 0x22, 0x44, 0x88, 0x00, 0x22, 0x88, 0x00, 0x22, 0x44, 0x88, 0x00, 0x22, 0x44 }; HBITMAP bitmapPattern = CreateBitmap( 32, 32, 1, 1, bBits ); HBRUSH patternBrush = CreatePatternBrush( m_bitmapPattern ); SelectObject( m_hdc, m_patternBrush ); Polyline( m_hdc, Points, num_points );
Partager