CDcdDiagram::CDcdDiagram() : m_pCentDedDgrDia( NULL ) , m_fontpropDiaRessyaFont( 9 ,L"Meiryo" ) , m_colorDiaHaikeiColor( CdColorProp( 255 , 255 , 255 ) ) , m_colorDiaRessyaColor( CdColorProp( 0 , 0 , 0 ) ) , m_colorDiaJikuColor( CdColorProp( 0 , 0 , 0 ) ) , m_bDisplayRessyabangou( true ) , m_bDisplayRessyamei( true ) , m_CconvContentPosToDcdTarget( 0 , DEFAULT_DCD_PER_DGR_X() , 0 , DEFAULT_DCD_PER_DGR_Y() , DIAGRAM_SIZE_MARGIN_DCD , DIAGRAM_SIZE_MARGIN_DCD ) , m_idxVlineMode( 1 ) , m_bDisplayRessyasenKudari( true ) , m_bDisplayRessyasenNobori( true ) , m_eStopMarkDraw( EStopMarkDraw_Nothing ) { }
// **************************************************************** // CWndDcdGrid2::CFocus // **************************************************************** // -------------------------------- //@name CWndDcdGrid2-フォーカス // -------------------------------- void CWndDcdGrid2::CFocus::CreateDcDrawFocusCell() { OuNew<CDcdRectangle> pCDcdRectangle( new CDcdRectangle( CdPenProp( 1 , CdColorProp( 0 , 0 , 0 ) , CdPenProp::DOT ) ) ) ; setIfDcDrawFocusCell( pCDcdRectangle ) ; }
static CdDrawTextProp getCdDrawTextPropStandard() { return CdDrawTextProp( CConverter_WinGdi().CdFontPropOf( DEFAULT_GUI_FONT ) , CdColorProp( 0 , 0 , 0 ) ) ; }
namespace DcDraw{ // **************************************************************** // CDcdFillrectRop // **************************************************************** // ******************************** // コンストラクタ // ******************************** CDcdFillrectRop::CDcdFillrectRop( const CdBrushProp& aCdBrushProp , int iR2DrawMode) : m_CdBrushProp( aCdBrushProp ) , m_iR2DrawMode( iR2DrawMode ) { } CDcdFillrectRop::CDcdFillrectRop() : m_iR2DrawMode( R2_COPYPEN ) { } CDcdFillrectRop::~CDcdFillrectRop() { } const CdPenProp g_CdPenProp( 1 , CdColorProp() , CdPenProp::NULLPEN ) ; // ******************************** // IfDcDraw // ******************************** bool CDcdFillrectRop::DcDraw( IfDcdTarget* pIfDcdTarget ) { int iRv = 0 ; bool bRv = false ; // -------------------------------- // ROPの設定 // -------------------------------- int iRopSid = SetROP2( pIfDcdTarget->getHdc() , m_iR2DrawMode ) ; // -------------------------------- // ペン・ブラシの生成 // -------------------------------- Ou<CGdiHPenHolder> pHPenHolder ; if ( iRv >= 0 ){ pHPenHolder = pIfDcdTarget->createGdiHPenHolder( g_CdPenProp ) ; if ( pHPenHolder == NULL ){ iRv = -1 ; // ペンの作成に失敗しました。 } } Ou<CGdiHBrushHolder> pHBrushHolder ; if ( iRv >= 0 ){ pHBrushHolder = pIfDcdTarget->createGdiHBrushHolder( m_CdBrushProp ) ; if ( pHBrushHolder == NULL ){ iRv = -2 ; // ブラシの作成に失敗しました。 } } HBRUSH hBrushSid = NULL ; if ( iRv >= 0 ){ hBrushSid = (HBRUSH)SelectObject( pIfDcdTarget->getHdc() , pHBrushHolder->getHBrush() ) ; } HPEN hPenSid = NULL ; if ( iRv >= 0 ){ hPenSid = (HPEN)SelectObject( pIfDcdTarget->getHdc() , pHPenHolder->getHPen() ) ; } int iBkModeSid = -1 ; if ( iRv >= 0 ){ iBkModeSid = SetBkMode( pIfDcdTarget->getHdc() , TRANSPARENT ) ; } // -------------------------------- // 描画 // -------------------------------- if ( iRv >= 0 ){ CdDcdZoneXy aCdDcdZoneXy = pIfDcdTarget->getZone() ; RECT LRect ; LRect.left = aCdDcdZoneXy.getX().getPos() ; LRect.top = aCdDcdZoneXy.getY().getPos() ; LRect.right = aCdDcdZoneXy.getX().getEndPos() ; LRect.bottom = aCdDcdZoneXy.getY().getEndPos() ; Rectangle( pIfDcdTarget->getHdc() , LRect.left , LRect.top , LRect.right + 1 , LRect.bottom + 1 ) ; } if ( iRv >= 0 ){ bRv = true ; } // -------------------------------- if ( iBkModeSid != -1 ) { SetBkMode( pIfDcdTarget->getHdc() , iBkModeSid ) ; } if ( hBrushSid != NULL ){ SelectObject( pIfDcdTarget->getHdc() , hBrushSid ) ; hBrushSid = NULL ; } if ( hPenSid != NULL ){ SelectObject( pIfDcdTarget->getHdc() , hPenSid ) ; hPenSid = NULL ; } if ( iRopSid != 0 ) { SetROP2( pIfDcdTarget->getHdc() , iRopSid ) ; iRopSid = 0 ; } return ( bRv ) ; } bool CDcdFillrectRop::getItemSize( IfDcdTarget* pIfDcdTarget , CdDcdSizeXy* pCdDcdSizeXy ) { return ( false ) ; } } //namespace DcDraw