本文整理汇总了C++中COLOR4D::Invert方法的典型用法代码示例。如果您正苦于以下问题:C++ COLOR4D::Invert方法的具体用法?C++ COLOR4D::Invert怎么用?C++ COLOR4D::Invert使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类COLOR4D
的用法示例。
在下文中一共展示了COLOR4D::Invert方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DrawCrossHair
void EDA_DRAW_PANEL::DrawCrossHair( wxDC* aDC, COLOR4D aColor )
{
if( m_cursorLevel != 0 || aDC == NULL || !m_showCrossHair )
return;
wxPoint cursor = GetParent()->GetCrossHairPosition();
#ifdef USE_WX_GRAPHICS_CONTEXT
// Normally cursor color is set to white, so when it is xored with white
// background, it is painted black effectively. wxGraphicsContext does not have
// xor operation, so we need to invert the color manually.
aColor.Invert();
#else
GRSetDrawMode( aDC, GR_XOR );
#endif
if( GetParent()->GetGalDisplayOptions().m_fullscreenCursor )
{
wxSize clientSize = GetClientSize();
// Y axis
wxPoint lineStart( cursor.x, aDC->DeviceToLogicalY( 0 ) );
wxPoint lineEnd( cursor.x, aDC->DeviceToLogicalY( clientSize.y ) );
GRLine( &m_ClipBox, aDC, lineStart, lineEnd, 0, aColor );
// X axis
lineStart = wxPoint( aDC->DeviceToLogicalX( 0 ), cursor.y );
lineEnd = wxPoint( aDC->DeviceToLogicalX( clientSize.x ), cursor.y );
GRLine( &m_ClipBox, aDC, lineStart, lineEnd, 0, aColor );
}
else
{
int len = aDC->DeviceToLogicalXRel( CURSOR_SIZE );
GRLine( &m_ClipBox, aDC, cursor.x - len, cursor.y,
cursor.x + len, cursor.y, 0, aColor );
GRLine( &m_ClipBox, aDC, cursor.x, cursor.y - len,
cursor.x, cursor.y + len, 0, aColor );
}
}