0

I was able to display a vector image with standard WPF like this.

<Image >
    <Image.Source>
        <DrawingImage>
            <DrawingImage.Drawing>
                <GeometryDrawing>
                    <GeometryDrawing.Pen>
                        <Pen Brush="#8F8E8F" Thickness="1" />
                    </GeometryDrawing.Pen>
                    <GeometryDrawing.Geometry>
                        <LineGeometry StartPoint="0,0" EndPoint="0,10"/>
                    </GeometryDrawing.Geometry>
                </GeometryDrawing>
            </DrawingImage.Drawing>
        </DrawingImage>
    </Image.Source>
</Image>

Unfortunately I was not able to do the same inside a Viewport3D element.

I created a VisualBrush from the Image and added it to the DiffuseMaterial of my 3D Model.

I also tried it via a DrawingBrush. Unfortunately the vector image gets renderd to a standard bitmap at some point of the pre-render processed. (that is what i think).

Is it even possible to display a vector image inside a Viewport3D?

Thank you for help in advance.

MyGGaN
  • 1,766
  • 3
  • 30
  • 41
Andreas
  • 3,843
  • 3
  • 40
  • 53
  • [Same problem](https://stackoverflow.com/q/2681112/1997232)? – Sinatr Jun 01 '17 at 15:15
  • I think it is different. because it's scaling based on a non vectorized graphic – Andreas Jun 01 '17 at 15:19
  • I see `Image` (it's not vector graphics anymore at some point of drawing), it's the same I think. – Sinatr Jun 01 '17 at 15:21
  • Without 3D it is still vectorized as an DrawingImage. I tested that by scaling the line 200x1. That's why SVG to WPF converter exists. I think the Image itself is just a placeholder as you can even add a D3DImage to it. – Andreas Jun 01 '17 at 15:29
  • Image will be rendered into bitmap. I don't think it's done by 3d renderer, rather image become bitmap first and only then it appears in scene, which cause the blur (due to raster bitmap being scaled). See [this](https://stackoverflow.com/q/25445060/1997232). – Sinatr Jun 01 '17 at 15:47
  • I think not every ImageSource gets rendered to a bitmap. For example the D3DImage. – Andreas Jun 01 '17 at 16:05

0 Answers0