Quantcast
Channel: OxyPlot (moved to GitHub)
Viewing all articles
Browse latest Browse all 2061

New Post: Re-sizing of image in imageannotation

$
0
0
I can display an oxyimage in a plotmodel using imageannotation.

There is a weird issue with the image zoom and resize. When I resize the window horizontally, horizontal axes changes values, which is fine, but the image also resizes, and the Y axis doesnt change. So I end with different height.

I tried to set both width and height, but then image is missing. Its a simple code. I am pasting below.
                byte[] b = new byte[160000];
                for (int i = 0; i < b.Length; i++) b[i] = 125;


                image = OxyImage.FromArgb(200, 200, b,96);

            
                model.Annotations.Add(new ImageAnnotation
                {
                    ImageSource = image,
                    X = new PlotLength(0, PlotLengthUnit.Data),
                    //Y = new PlotLength(0, PlotLengthUnit.Data),
                    Interpolate=false,
                    Width = new PlotLength(200, PlotLengthUnit.Data),

                    //Height = new PlotLength(200, PlotLengthUnit.Data),
                    //HorizontalAlignment = OxyPlot.HorizontalAlignment.Center,
                    //VerticalAlignment = OxyPlot.VerticalAlignment.Top

                });
Any tips are deeply appreciated.

PS: I checked other annotation examples, there they dont have such issue.

Viewing all articles
Browse latest Browse all 2061

Latest Images

Trending Articles



Latest Images