如何在多尺度图像上添加图形?

发布于 2024-07-30 20:51:08 字数 347 浏览 3 评论 0原文

我想将图形添加到多尺度图像中。 我使用 Deep Zoom Composer 在创建多尺度图像时自动生成的项目。 显示 VS2008 中的多尺度图像有效。

我已经尝试过此操作并将图形添加到主画布中,但没有任何结果:

<Grid>
 <Canvas Name="maincanvas"/>
 <MultiScaleImage/>
</Grid>

编辑:当用户放大多尺度图像时,用户可以在图像上放置几何图形。 例如,在图像中的人物旁边放置一个矩形,它将充当对话气球。 我知道这可以在缩放图像之前在图像上完成,但我想动态地执行此操作。

I want to add graphics to a multiscaleimage. I use the project that Deep Zoom Composer auto generated when creating a multiscaleimage. Displaying the multiscaleimage from VS2008 works.

I've tried this and added the graphics to the maincanvas, without any results:

<Grid>
 <Canvas Name="maincanvas"/>
 <MultiScaleImage/>
</Grid>

Edit: When the user zooms in on the multiscaleimage, the user can place geometrically figures on the image. E.g. place a rectangle next to a person in the image, which will act as a speech balloon. I know this can be done on the image before the image is scaled, but I would like to do it dynamically.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

萌无敌 2024-08-06 20:51:09

按照链接文本中的教程进行操作,然后使用以下代码,可以在多尺度图像上进行绘制。

<Grid x:Name="LayoutRoot">
<MultiScaleImage x:Name="deepZoomObject" Source="source/dzc_output.xml"/>  
<Canvas>
 <Line X1="10" Y1="100" X2="80" Y2="30" Stroke="Red" StrokeThickness="20" Canvas.Top="-16" Canvas.Left="238"></Line>
</Canvas>
</Grid>

By following the tutorial at link text, and then using the following code, made it possible to draw on top of the multiscaleimage.

<Grid x:Name="LayoutRoot">
<MultiScaleImage x:Name="deepZoomObject" Source="source/dzc_output.xml"/>  
<Canvas>
 <Line X1="10" Y1="100" X2="80" Y2="30" Stroke="Red" StrokeThickness="20" Canvas.Top="-16" Canvas.Left="238"></Line>
</Canvas>
</Grid>
物价感观 2024-08-06 20:51:09

为了在特定图像上绘制图形,首先您需要找出多尺度图像的坐标。我不确定读取多尺度画布图像中所有图像的坐标...但是有一个您可以在用户选择的图像上执行此操作...

项目 silverlights wilfred 发布了一篇关于选择选定的多尺度项目及其坐标的有趣文章。

并且有一个专门的论坛 deepzoom.. 它非常活跃.. 你也可以尝试一下..

In order to draw the grpahics over the particular image, first u need to find out the co-odrinates of the multiscale image..Am not sure abt reading co-ordinates of all the images in mutliscale canvass image... but there is a way you can do it on user selected image...

project silverlights wilfred posted an interesting article abt picking the selected multiscale item and its co-ordinates..

And there is a dedicated forum for deepzoom.. its very active one.. you can try that too..

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文