Commit 0d4b71ef authored by tomasz.wlostowski@cern.ch's avatar tomasz.wlostowski@cern.ch
Browse files

Merged Orson's latest changes.

parents 87dccc9f 9ec4520c
Loading
Loading
Loading
Loading
+2 −4
Original line number Original line Diff line number Diff line
@@ -278,10 +278,8 @@ void OPENGL_GAL::DrawSegment( const VECTOR2D& aStartPoint, const VECTOR2D& aEndP
                      VECTOR2D( lineLength, -aWidth / 2.0 ) );
                      VECTOR2D( lineLength, -aWidth / 2.0 ) );


        // Draw line caps
        // Draw line caps
        drawStrokedSemiCircle( VECTOR2D( 0.0, 0.0 ),
        drawStrokedSemiCircle( VECTOR2D( 0.0, 0.0 ), aWidth / 2, M_PI / 2 );
                               ( aWidth + lineWidth ) / 2, M_PI / 2 );
        drawStrokedSemiCircle( VECTOR2D( lineLength, 0.0 ), aWidth / 2, -M_PI / 2 );
        drawStrokedSemiCircle( VECTOR2D( lineLength, 0.0 ),
                               ( aWidth + lineWidth ) / 2, -M_PI / 2 );


        Restore();
        Restore();
    }
    }
+0 −22
Original line number Original line Diff line number Diff line
@@ -79,25 +79,3 @@ void PAINTER::SetGAL( GAL* aGal )
{
{
    m_gal = aGal;
    m_gal = aGal;
}
}


void PAINTER::DrawBrightened( const VIEW_ITEM* aItem )
{
    BOX2I box = aItem->ViewBBox();

    RenderTarget oldTarget = m_gal->GetTarget();
    m_gal->SetTarget( TARGET_OVERLAY );

    m_gal->PushDepth();
    m_gal->SetLayerDepth( -1.0 );

    // Draw an outline that marks items as brightened
    m_gal->SetIsStroke( true );
    m_gal->SetLineWidth( 100000.0 );
    m_gal->SetStrokeColor( m_brightenedColor );

    m_gal->DrawRectangle( box.GetOrigin(), box.GetOrigin() + box.GetSize() );
    m_gal->PopDepth();

    m_gal->SetTarget( oldTarget );
}
+1 −1
Original line number Original line Diff line number Diff line
@@ -41,7 +41,7 @@
.text
.text
.globl jump_fcontext
.globl jump_fcontext
.type jump_fcontext,@function
.type jump_fcontext,@function
.align 16
.align 8
jump_fcontext:
jump_fcontext:
    movq     %rbx,       (%rdi)         /* save RBX */
    movq     %rbx,       (%rdi)         /* save RBX */
    movq     %r12,       0x8(%rdi)      /* save R12 */
    movq     %r12,       0x8(%rdi)      /* save R12 */
+8 −1
Original line number Original line Diff line number Diff line
@@ -40,8 +40,12 @@


.text
.text
.globl make_fcontext
.globl make_fcontext

#ifndef  __APPLE__
.type make_fcontext,@function
.type make_fcontext,@function
.align 16
#endif

.align 8
make_fcontext:
make_fcontext:
    leaq   -0x58(%rdi),    %rax        /* reserve space for fcontext_t at top of context stack */
    leaq   -0x58(%rdi),    %rax        /* reserve space for fcontext_t at top of context stack */


@@ -70,5 +74,8 @@ finish:
    xorq    %rdi,           %rdi       /* exit code is zero */
    xorq    %rdi,           %rdi       /* exit code is zero */
    call   _exit@PLT                   /* exit application */
    call   _exit@PLT                   /* exit application */
    hlt
    hlt

#ifndef  __APPLE__
.size make_fcontext,.-make_fcontext
.size make_fcontext,.-make_fcontext
#endif
+3 −11
Original line number Original line Diff line number Diff line
@@ -31,6 +31,7 @@
#include <tool/tool_manager.h>
#include <tool/tool_manager.h>
#include <tool/tool_dispatcher.h>
#include <tool/tool_dispatcher.h>
#include <view/view.h>
#include <view/view.h>
#include <view/view_controls.h>


#include <class_drawpanel_gal.h>
#include <class_drawpanel_gal.h>


@@ -122,15 +123,6 @@ int TOOL_DISPATCHER::decodeModifiers( const wxKeyboardState* aState ) const
}
}




wxPoint TOOL_DISPATCHER::getCurrentMousePos() const
{
    wxPoint msp = wxGetMousePosition();
    wxPoint winp = m_editFrame->GetGalCanvas()->GetScreenPosition();

    return wxPoint( msp.x - winp.x, msp.y - winp.y );
}


bool TOOL_DISPATCHER::handleMouseButton( wxEvent& aEvent, int aIndex, bool aMotion )
bool TOOL_DISPATCHER::handleMouseButton( wxEvent& aEvent, int aIndex, bool aMotion )
{
{
	ButtonState* st = m_buttons[aIndex];
	ButtonState* st = m_buttons[aIndex];
@@ -208,7 +200,6 @@ bool TOOL_DISPATCHER::handleMouseButton( wxEvent& aEvent, int aIndex, bool aMoti
void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent )
void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent )
{
{
	bool motion = false, buttonEvents = false;
	bool motion = false, buttonEvents = false;
	VECTOR2D pos;
	optional<TOOL_EVENT> evt;
	optional<TOOL_EVENT> evt;
	
	
	int type = aEvent.GetEventType();
	int type = aEvent.GetEventType();
@@ -220,7 +211,8 @@ void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent )
	        type == wxEVT_RIGHT_DOWN || type == wxEVT_RIGHT_UP ||
	        type == wxEVT_RIGHT_DOWN || type == wxEVT_RIGHT_UP ||
	        type == EVT_REFRESH_MOUSE )
	        type == EVT_REFRESH_MOUSE )
	{
	{
		pos = getView()->ToWorld ( getCurrentMousePos() );		
        VECTOR2D screenPos = m_toolMgr->GetViewControls()->GetCursorPosition();
        VECTOR2D pos = getView()->ToWorld( screenPos );
		if( pos != m_lastMousePos || type == EVT_REFRESH_MOUSE )
		if( pos != m_lastMousePos || type == EVT_REFRESH_MOUSE )
		{
		{
			motion = true;
			motion = true;
Loading