如何在给定图片上创建hotSport以隔离图片区域 [英] How to create hotSport on a given picture in order to isolate an area of the picture

查看:88
本文介绍了如何在给定图片上创建hotSport以隔离图片区域的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的

在WPF应用程序中,我们可以将任何给定的图片显示为主要背景.

We have a given picture of any kind that we display as the main background in a WPF application.

从该图片开始,我们希望能够在该图片上绘制一个封闭区域,然后代表一种图层.

From that picture, we would like to be able to drawn an closed area on this picture which then represent a kind of layer.

那时,用户可以选择该区域并用颜色填充所有区域.

At that time , user can select this area and fill all this area with a color.

想象一个房屋计划,其中有我们代表的房间.然后,我们在应用程序上使用了不同的颜色,用户可以在其中选择并绘制计划的特定区域,例如使用图案绘制卧室地板.

Imagine for instance a house plan, where we have rooms represented. Then we have different color on the application where user can select and paint specific area of the plan, like painting the bedroom floor with a pattern.

问题在于我们没有预先的楼层平面图,该平面图可能会根据客户而变化.因此,我们尝试通过触摸直接生成图片所在的区域.

The issue is that we do not have in advance the floor plan, which can change based on customers. So we try to generate directly those area with touch what ever the picture is.

从给定图片将其切成不同的图层形状(然后可以成为单独的对象)是什么方法?

What is the way from a given picture to slice it in different layer shape which can then be a separate object ?

感谢您的建议或样品

问候

推荐答案

房间通常是矩形的.

Rooms are usually kind of rectangular.

矩形会起作用吗?

您可以在每个边缘上使用装饰物来调整高度/宽度.

You could do something with an adorner on each edge to adjust height/width.

赋予填充物较低的不透明度,以便您可以看到其下的东西.

Give the fill a lowish opacity so you can see the stuff under it.

将矩形作为按钮的模板,您将获得单击/命令.

Make the rectangle the template of a button and you get click/command.


这篇关于如何在给定图片上创建hotSport以隔离图片区域的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆