Si j'ai une image de 1px d'épaisseur Comment devrais-je procéder à la duplication afin qu'il devienne plus grand, ou comment je l'étirer.Direct2d dupliquer/étirer 1px image
Parce que vous pouvez voir avec mon code ne est pas la meilleure boucle DrawImage
colorMatrixEffect->SetInput(0, texture); //texture = ID2D1Bitmap*
D2D1_MATRIX_5X4_F matrix = D2D1::Matrix5x4F(color->r, 0, 0, 0, 0, color->g, 0, 0, 0, 0, color->b, 0, 0, 0, 0, 1, 0, 0, 0, 0);
colorMatrixEffect->SetValue(D2D1_COLORMATRIX_PROP_COLOR_MATRIX, matrix);
if (rect.right == 0)
{
device_context_d2d1->DrawImage(colorMatrixEffect.get(),
D2D1::Point2F(newRect.left + offsetX, newRect.top + offsetY));
}
else
{
for (int i = 0; i < static_cast<int>(newRect.right); i++)
{
device_context_d2d1->DrawImage(colorMatrixEffect.get(),
D2D1::Point2F(newRect.left + offsetX + i, newRect.top + offsetY));
}
}