mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-18 17:10:05 +02:00
Merge branch 'master' into HEAD
This commit is contained in:
commit
773dad3221
@ -179,15 +179,17 @@ void AColor::DrawFocus(wxDC & dc, wxRect & rect)
|
||||
// Why must this be different?
|
||||
// Otherwise nothing is visible if you do as for the
|
||||
// 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
|
||||
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
|
||||
// I'm still not sure if it's correct
|
||||
dc.SetLogicalFunction(wxAND_REVERSE);
|
||||
//dc.SetLogicalFunction(wxAND_REVERSE);
|
||||
#endif
|
||||
|
||||
wxCoord z;
|
||||
|
@ -26,6 +26,8 @@ channel. This collection of functions fills that gap.
|
||||
|
||||
#include "Audacity.h"
|
||||
#include "ImageManipulation.h"
|
||||
#include "AllThemeResources.h"
|
||||
#include "Theme.h"
|
||||
|
||||
/// This looks at the first pixel in the image, and shifts
|
||||
/// 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();
|
||||
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
|
||||
// background, at an offset of xoff,yoff.
|
||||
// BUT...Don't go beyond the size of the background image,
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -232,6 +232,7 @@
|
||||
<ClCompile Include="..\..\..\src\tracks\labeltrack\ui\LabelTrackUI.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\NoteTrackSliderHandles.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\StretchHandle.cpp" />
|
||||
@ -506,6 +507,7 @@
|
||||
<ClInclude Include="..\..\..\src\TrackPanelListener.h" />
|
||||
<ClInclude Include="..\..\..\src\TrackPanelMouseEvent.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\StretchHandle.h" />
|
||||
<ClInclude Include="..\..\..\src\tracks\playabletrack\ui\PlayableTrackButtonHandles.h" />
|
||||
|
@ -1046,6 +1046,9 @@
|
||||
<ClCompile Include="..\..\..\src\tracks\playabletrack\notetrack\ui\StretchHandle.cpp">
|
||||
<Filter>src\tracks\playabletrack\notetrack\ui</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\tracks\playabletrack\notetrack\ui\NoteTrackSliderHandles.cpp">
|
||||
<Filter>src\tracks\playabletrack\notetrack\ui</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\..\src\AboutDialog.h">
|
||||
@ -2083,6 +2086,9 @@
|
||||
<ClInclude Include="..\..\..\src\tracks\playabletrack\notetrack\ui\StretchHandle.h">
|
||||
<Filter>src\tracks\playabletrack\notetrack\ui</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\tracks\playabletrack\notetrack\ui\NoteTrackSliderHandles.h">
|
||||
<Filter>src\tracks\playabletrack\notetrack\ui</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="..\..\audacity.ico">
|
||||
|
Loading…
x
Reference in New Issue
Block a user