1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-18 09:00:07 +02:00

Merge branch 'master' into HEAD

This commit is contained in:
Paul Licameli 2017-06-16 18:04:47 -04:00
commit 773dad3221
5 changed files with 3617 additions and 3567 deletions

View File

@ -179,15 +179,17 @@ void AColor::DrawFocus(wxDC & dc, wxRect & rect)
// Why must this be different? // Why must this be different?
// Otherwise nothing is visible if you do as for the // Otherwise nothing is visible if you do as for the
// other platforms. // other platforms.
dc.SetPen(wxPen(wxT("MEDIUM GREY"), 1, wxSOLID)); UseThemeColour( &dc, clrTrackPanelText );
dc.SetLogicalFunction(wxCOPY); //dc.SetPen(wxPen(wxT("MEDIUM GREY"), 1, wxSOLID));
//dc.SetLogicalFunction(wxCOPY);
#else #else
dc.SetPen(wxPen(wxT("MEDIUM GREY"), 0, wxSOLID)); UseThemeColour( &dc, clrTrackPanelText );
//dc.SetPen(wxPen(wxT("MEDIUM GREY"), 0, wxSOLID));
// this seems to be closer than what Windows does than wxINVERT although // this seems to be closer than what Windows does than wxINVERT although
// I'm still not sure if it's correct // I'm still not sure if it's correct
dc.SetLogicalFunction(wxAND_REVERSE); //dc.SetLogicalFunction(wxAND_REVERSE);
#endif #endif
wxCoord z; wxCoord z;

View File

@ -26,6 +26,8 @@ channel. This collection of functions fills that gap.
#include "Audacity.h" #include "Audacity.h"
#include "ImageManipulation.h" #include "ImageManipulation.h"
#include "AllThemeResources.h"
#include "Theme.h"
/// This looks at the first pixel in the image, and shifts /// This looks at the first pixel in the image, and shifts
/// the entire image by the vector difference between that /// the entire image by the vector difference between that
@ -210,6 +212,25 @@ std::unique_ptr<wxImage> OverlayImage(teBmps eBack, teBmps eForeground,
unsigned char *dst = dstImage->GetData(); unsigned char *dst = dstImage->GetData();
memcpy(dst, bg, bgWidth * bgHeight * 3); memcpy(dst, bg, bgWidth * bgHeight * 3);
// If background image has tranparency, then we want to blend with the
// current backgorund colour.
if( imgBack.HasAlpha() ){
unsigned char *pAlpha = imgBack.GetAlpha();
wxColour c = theTheme.Colour( clrMedium );
unsigned char onePixImage[3];
// GetData() guarantees RGB order [wxWidgets does the ocnversion]
onePixImage[ 0 ] = c.Red();
onePixImage[ 1 ] = c.Green();
onePixImage[ 2 ] = c.Blue();
for( int i=0;i< bgWidth*bgHeight;i++){
unsigned char * pPix = &dst[ 3*i];
float alpha = 1.0 - (pAlpha[i]/255.0);
pPix[0] = pPix[0] + alpha *( (int)onePixImage[0]-(int)pPix[0]);
pPix[1] = pPix[1] + alpha *( (int)onePixImage[1]-(int)pPix[1]);
pPix[2] = pPix[2] + alpha *( (int)onePixImage[2]-(int)pPix[2]);
}
}
// Go through the foreground image bit by bit and mask it on to the // Go through the foreground image bit by bit and mask it on to the
// background, at an offset of xoff,yoff. // background, at an offset of xoff,yoff.
// BUT...Don't go beyond the size of the background image, // BUT...Don't go beyond the size of the background image,

File diff suppressed because it is too large Load Diff

View File

@ -232,6 +232,7 @@
<ClCompile Include="..\..\..\src\tracks\labeltrack\ui\LabelTrackUI.cpp" /> <ClCompile Include="..\..\..\src\tracks\labeltrack\ui\LabelTrackUI.cpp" />
<ClCompile Include="..\..\..\src\tracks\labeltrack\ui\LabelTrackVRulerControls.cpp" /> <ClCompile Include="..\..\..\src\tracks\labeltrack\ui\LabelTrackVRulerControls.cpp" />
<ClCompile Include="..\..\..\src\tracks\playabletrack\notetrack\ui\NoteTrackControls.cpp" /> <ClCompile Include="..\..\..\src\tracks\playabletrack\notetrack\ui\NoteTrackControls.cpp" />
<ClCompile Include="..\..\..\src\tracks\playabletrack\notetrack\ui\NoteTrackSliderHandles.cpp" />
<ClCompile Include="..\..\..\src\tracks\playabletrack\notetrack\ui\NoteTrackUI.cpp" /> <ClCompile Include="..\..\..\src\tracks\playabletrack\notetrack\ui\NoteTrackUI.cpp" />
<ClCompile Include="..\..\..\src\tracks\playabletrack\notetrack\ui\NoteTrackVRulerControls.cpp" /> <ClCompile Include="..\..\..\src\tracks\playabletrack\notetrack\ui\NoteTrackVRulerControls.cpp" />
<ClCompile Include="..\..\..\src\tracks\playabletrack\notetrack\ui\StretchHandle.cpp" /> <ClCompile Include="..\..\..\src\tracks\playabletrack\notetrack\ui\StretchHandle.cpp" />
@ -506,6 +507,7 @@
<ClInclude Include="..\..\..\src\TrackPanelListener.h" /> <ClInclude Include="..\..\..\src\TrackPanelListener.h" />
<ClInclude Include="..\..\..\src\TrackPanelMouseEvent.h" /> <ClInclude Include="..\..\..\src\TrackPanelMouseEvent.h" />
<ClInclude Include="..\..\..\src\tracks\playabletrack\notetrack\ui\NoteTrackControls.h" /> <ClInclude Include="..\..\..\src\tracks\playabletrack\notetrack\ui\NoteTrackControls.h" />
<ClInclude Include="..\..\..\src\tracks\playabletrack\notetrack\ui\NoteTrackSliderHandles.h" />
<ClInclude Include="..\..\..\src\tracks\playabletrack\notetrack\ui\NoteTrackVRulerControls.h" /> <ClInclude Include="..\..\..\src\tracks\playabletrack\notetrack\ui\NoteTrackVRulerControls.h" />
<ClInclude Include="..\..\..\src\tracks\playabletrack\notetrack\ui\StretchHandle.h" /> <ClInclude Include="..\..\..\src\tracks\playabletrack\notetrack\ui\StretchHandle.h" />
<ClInclude Include="..\..\..\src\tracks\playabletrack\ui\PlayableTrackButtonHandles.h" /> <ClInclude Include="..\..\..\src\tracks\playabletrack\ui\PlayableTrackButtonHandles.h" />

View File

@ -1046,6 +1046,9 @@
<ClCompile Include="..\..\..\src\tracks\playabletrack\notetrack\ui\StretchHandle.cpp"> <ClCompile Include="..\..\..\src\tracks\playabletrack\notetrack\ui\StretchHandle.cpp">
<Filter>src\tracks\playabletrack\notetrack\ui</Filter> <Filter>src\tracks\playabletrack\notetrack\ui</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\..\..\src\tracks\playabletrack\notetrack\ui\NoteTrackSliderHandles.cpp">
<Filter>src\tracks\playabletrack\notetrack\ui</Filter>
</ClCompile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="..\..\..\src\AboutDialog.h"> <ClInclude Include="..\..\..\src\AboutDialog.h">
@ -2083,6 +2086,9 @@
<ClInclude Include="..\..\..\src\tracks\playabletrack\notetrack\ui\StretchHandle.h"> <ClInclude Include="..\..\..\src\tracks\playabletrack\notetrack\ui\StretchHandle.h">
<Filter>src\tracks\playabletrack\notetrack\ui</Filter> <Filter>src\tracks\playabletrack\notetrack\ui</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\..\..\src\tracks\playabletrack\notetrack\ui\NoteTrackSliderHandles.h">
<Filter>src\tracks\playabletrack\notetrack\ui</Filter>
</ClInclude>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Image Include="..\..\audacity.ico"> <Image Include="..\..\audacity.ico">