We have modified LMDGlyphs, TLMDButtonGlyph.DrawButtonGlyph
In section
if FUsePng then
we change
FPngGlyph.Draw(Canvas, Rect(GlyphPos.X, GlyphPos.Y, GlyphPos.X + IcW, GlyphPos.Y + IcH));
to
if State = ebsDisabled then
begin
LPNGGray := TLMDPNGGrayscaleFilter.Create;
try
LPNGGray.SourceImage := FPngGlyph;
LPNGGray.ResultImage.Draw(Canvas, Rect(GlyphPos.X, GlyphPos.Y, GlyphPos.X + IcW, GlyphPos.Y + IcH));
finally
LPNGGray.Free;
end;
end
else
FPngGlyph.Draw(Canvas, Rect(GlyphPos.X, GlyphPos.Y, GlyphPos.X + IcW, GlyphPos.Y + IcH));
for non streched drawing.
This work for us to draw the images correct in gray-scaled.
Please check this an make it also available for streched drawing (we don't use streched drawing).
Comments