
10.03.2013, 17:14
|
 |
.
|
|
Регистрация: 18.05.2011
Адрес: Омск
Сообщения: 3,970
Версия Delphi: 3,5,7,10,12,XE2
Репутация: выкл
|
|
У меня отрисовка идёт так
Код:
procedure TGPGraphic.Draw(aCanvas : HDC; const dstRect : TRect; const srcRect : TRect);
var
aGraphics : GpGraphics;
begin
if Assigned(fGpImage) then
begin
aGraphics := NIL;
if SetStatus(GdipCreateFromHDC(aCanvas, aGraphics)) = Ok then
try
SetStatus(GdipDrawImageRectRectI(aGraphics, fGpImage,
dstRect.Left, dstRect.Top, dstRect.Right - dstRect.Left, dstRect.Bottom - dstRect.Top,
srcRect.Left, srcRect.Top, srcRect.Right - srcRect.Left, srcRect.Bottom - srcRect.Top,
UnitPixel, NIL, NIL, NIL));
finally
if Assigned(aGraphics) then
GdipDeleteGraphics(aGraphics);
end;
end;
end;
// вызов
SetRect(aRect, Frame mod 3 * 82, Frame div 3 * 82, Frame mod 3 * 82 + 82, Frame div 3 * 82 + 82);
bmStar.Draw(Handle, GetRect(fCells[CellIndex]), aRect);
__________________
Je venus de nulle part
55.026263 с.ш., 73.397636 в.д.
|