나는 흰색 사각형 (100 x 200)을 그리고 중간에 작은 이미지 (50 x 75)를 그려서 재생중인 카드의 뒷면과 비슷하게 보이려고합니다.오버레이 이미지가 다른 오버레이 이미지
다음 코드를 사용하면 주변에 테두리가 있지만 이미지가없는 타일을 얻을 수 있습니다.
//generate temporary control to render image
Image temporaryImage = new Image { Source = emptyTileWatermark, Width = destWidth, Height = destHeight };
//create writeableBitmap
WriteableBitmap wb = new WriteableBitmap(outputWidth, outputHeight);
wb.Clear(Colors.White);
// Closed green polyline with P1(0, 0), P2(outputWidth, 0), P3(outputWidth, outputHeight) and P4(0, outputHeight)
var outline = new int[] { 0, 0, outputWidth, 0, outputWidth, outputHeight, 0, outputHeight, 0, 0};
wb.DrawPolyline(outline, Colors.Black);
wb.Invalidate();
wb.Render(temporaryImage, new TranslateTransform { X = destX, Y = destY });
wb.Invalidate();
.Clear() 작업을 수행하려면 WriteableBitmapEx 프로젝트를 사용하고 있습니다.
어떤 아이디어 ???
완벽하게 작동합니다! 고맙습니다! –