brush.cpp (970344bd) | brush.cpp (b5fae844) |
---|---|
1/* 2 * COPYRIGHT: See COPYING in the top level directory 3 * PROJECT: ReactOS win32 subsystem 4 * PURPOSE: BRUSH class implementation 5 * PROGRAMER: Timo Kreuzer (timo.kreuzer@reactos.org) 6 * 7 * REFERENCES: http://support.microsoft.com/kb/kbview/108497 8 */ --- 63 unchanged lines hidden (view full) --- 72 /* Delete styles */ 73 if ((this->pStyle != NULL) && !(this->flAttrs & BR_IS_DEFAULTSTYLE)) 74 { 75 ExFreePoolWithTag(this->pStyle, GDITAG_PENSTYLE); 76 } 77} 78 79VOID | 1/* 2 * COPYRIGHT: See COPYING in the top level directory 3 * PROJECT: ReactOS win32 subsystem 4 * PURPOSE: BRUSH class implementation 5 * PROGRAMER: Timo Kreuzer (timo.kreuzer@reactos.org) 6 * 7 * REFERENCES: http://support.microsoft.com/kb/kbview/108497 8 */ --- 63 unchanged lines hidden (view full) --- 72 /* Delete styles */ 73 if ((this->pStyle != NULL) && !(this->flAttrs & BR_IS_DEFAULTSTYLE)) 74 { 75 ExFreePoolWithTag(this->pStyle, GDITAG_PENSTYLE); 76 } 77} 78 79VOID |
80BRUSH::vReleaseAttribute(VOID) 81{ 82 if (this->pBrushAttr != &this->BrushAttr) 83 { 84 this->BrushAttr = *this->pBrushAttr; 85 GdiPoolFree(GetBrushAttrPool(), this->pBrushAttr); 86 this->pBrushAttr = &this->BrushAttr; 87 } 88} 89 90VOID |
|
80BRUSH::vDeleteObject( 81 _In_ PVOID pvObject) 82{ 83 PBRUSH pbr = static_cast<PBRUSH>(pvObject); 84 NT_ASSERT((GDI_HANDLE_GET_TYPE(pbr->hHmgr()) == GDILoObjType_LO_BRUSH_TYPE) || 85 (GDI_HANDLE_GET_TYPE(pbr->hHmgr()) == GDILoObjType_LO_PEN_TYPE) || 86 (GDI_HANDLE_GET_TYPE(pbr->hHmgr()) == GDILoObjType_LO_EXTPEN_TYPE)); 87 delete pbr; --- 450 unchanged lines hidden (view full) --- 538 539__kernel_entry 540HBRUSH 541APIENTRY 542NtGdiSetBrushAttributes( 543 _In_ HBRUSH hbr, 544 _In_ DWORD dwFlags) 545{ | 91BRUSH::vDeleteObject( 92 _In_ PVOID pvObject) 93{ 94 PBRUSH pbr = static_cast<PBRUSH>(pvObject); 95 NT_ASSERT((GDI_HANDLE_GET_TYPE(pbr->hHmgr()) == GDILoObjType_LO_BRUSH_TYPE) || 96 (GDI_HANDLE_GET_TYPE(pbr->hHmgr()) == GDILoObjType_LO_PEN_TYPE) || 97 (GDI_HANDLE_GET_TYPE(pbr->hHmgr()) == GDILoObjType_LO_EXTPEN_TYPE)); 98 delete pbr; --- 450 unchanged lines hidden (view full) --- 549 550__kernel_entry 551HBRUSH 552APIENTRY 553NtGdiSetBrushAttributes( 554 _In_ HBRUSH hbr, 555 _In_ DWORD dwFlags) 556{ |
557 PBRUSH pbr; |
|
546 if ( dwFlags & SC_BB_STOCKOBJ ) 547 { 548 if (GDIOBJ_ConvertToStockObj((HGDIOBJ*)&hbr)) 549 { | 558 if ( dwFlags & SC_BB_STOCKOBJ ) 559 { 560 if (GDIOBJ_ConvertToStockObj((HGDIOBJ*)&hbr)) 561 { |
562 pbr = BRUSH::LockAny(hbr); 563 if (pbr == NULL) 564 { 565 ERR("Failed to lock brush %p\n", hbr); 566 return NULL; 567 } 568 pbr->vReleaseAttribute(); 569 pbr->vUnlock(); |
|
550 return hbr; 551 } 552 } 553 return NULL; 554} 555 556__kernel_entry 557HBRUSH 558APIENTRY 559NtGdiClearBrushAttributes( 560 _In_ HBRUSH hbr, 561 _In_ DWORD dwFlags) 562{ | 570 return hbr; 571 } 572 } 573 return NULL; 574} 575 576__kernel_entry 577HBRUSH 578APIENTRY 579NtGdiClearBrushAttributes( 580 _In_ HBRUSH hbr, 581 _In_ DWORD dwFlags) 582{ |
583 PBRUSH pbr; |
|
563 if ( dwFlags & SC_BB_STOCKOBJ ) 564 { 565 if (GDIOBJ_ConvertFromStockObj((HGDIOBJ*)&hbr)) 566 { | 584 if ( dwFlags & SC_BB_STOCKOBJ ) 585 { 586 if (GDIOBJ_ConvertFromStockObj((HGDIOBJ*)&hbr)) 587 { |
588 pbr = BRUSH::LockAny(hbr); 589 if (pbr == NULL) 590 { 591 ERR("Failed to lock brush %p\n", hbr); 592 return NULL; 593 } 594 if (!pbr->bAllocateBrushAttr()) 595 { 596 ERR("Failed to allocate brush attribute\n"); 597 } 598 pbr->vUnlock(); |
|
567 return hbr; 568 } 569 } 570 return NULL; 571} 572 573} /* extern "C" */ | 599 return hbr; 600 } 601 } 602 return NULL; 603} 604 605} /* extern "C" */ |