Hello,
I managed to duplicate the AV in the attached file. Just resize the form vertically till there's only the form caption.
I added two screen shots to help.
RenderTargetProp :=
D2D1RenderTargetProperties(
{$IFDEF GPUSupport}
D2D1_RENDER_TARGET_TYPE_DEFAULT,
{$ELSE}
D2D1_RENDER_TARGET_TYPE_SOFTWARE, // much faster in my desktop with a slow GPU
{$ENDIF}
D2D1PixelFormat(DXGI_FORMAT_UNKNOWN, D2D1_ALPHA_MODE_UNKNOWN), // use image format
0, 0, D2D1_RENDER_TARGET_USAGE_GDI_COMPATIBLE);
CheckOSError(TSynDWrite.D2DFactory.CreateWicBitmapRenderTarget(FWicImage.Handle,
RenderTargetProp,FIDW)); ### AV HERE
end;
Hello, I managed to duplicate the AV in the attached file. Just resize the form vertically till there's only the form caption. I added two screen shots to help.
ResizeAV.zip
( Unit SynDWrite )
Line 720 { TSynWICRenderTarget }
constructor TSynWICRenderTarget.Create(const Width, Height: integer); var BM: TBitmap; RenderTargetProp: TD2D1RenderTargetProperties; begin inherited Create; FWicImage := TWicImage.Create; FWicImage.InterpolationMode := wipmHighQualityCubic; BM := TBitmap.Create(Width, Height); try BM.AlphaFormat := afDefined; FWicImage.Assign(BM); finally BM.Free; end;
RenderTargetProp := D2D1RenderTargetProperties( {$IFDEF GPUSupport} D2D1_RENDER_TARGET_TYPE_DEFAULT, {$ELSE} D2D1_RENDER_TARGET_TYPE_SOFTWARE, // much faster in my desktop with a slow GPU {$ENDIF} D2D1PixelFormat(DXGI_FORMAT_UNKNOWN, D2D1_ALPHA_MODE_UNKNOWN), // use image format 0, 0, D2D1_RENDER_TARGET_USAGE_GDI_COMPATIBLE);
CheckOSError(TSynDWrite.D2DFactory.CreateWicBitmapRenderTarget(FWicImage.Handle, RenderTargetProp,FIDW)); ### AV HERE end;