根据其在线框上的图像源大小平铺图像画笔. [英] tiling imagebrush according to its imagesource's size on the wireframe.

查看:46
本文介绍了根据其在线框上的图像源大小平铺图像画笔.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,
我有一个线框(来自3dsmax),在其中绘制了图像画笔.
imagebrush是动态的,因此我希望根据它的imagesource大小对其进行包装,然后在必要时对其进行平铺.
我发现我们可以使用ViewportUnits,viewport和TileMode,但是出于我的目的,这些效果不会显示...

例如:-当我设置时:Viewport ="0,0,320,240"(假设320,240是wt& ht)
ViewportUnits =绝对"
TileMode ="Tile"

它不会将图片设置为320像素乘240像素.任何人都可以建议原因吗?以及什么是解决方案???

我的代码:-

Hello,
I have a wireframe(from 3dsmax) in which i have mapped the imagebrush.
The imagebrush is dynamic so i want it to be wrapped according to it''s imagesource size and then tile it if necessary.
I found that we can use ViewportUnits, viewport and TileMode, but for my purpose these effects are not displayed...

Eg:- when i set: Viewport="0,0,320,240"(suppose 320,240 is the wt & ht)
ViewportUnits="Absolute"
TileMode="Tile"

It doesnot sets image as 320px by 240 px.Can anyOne suggest why???? and what could be the solution???

My code:-

<Window.Resources>
    	<ImageBrush x:Key="ImageBrush" 
                ImageSource="Image/floralDesign.png"
				Viewport="0,0,1,1"
				ViewportUnits="Absolute"
				TileMode="Tile"
		/>
</Window.Resources>
<Grid>
	<Viewport3D ClipToBounds="True" >
        <Viewport3D.Camera/>
    		<ModelVisual3D x:Name="ChamferBox02" >
    			<ModelVisual3D.Content>
    				<GeometryModel3D x:Name="DefaultMaterial"  
d:Bounds="-15.1295471191406,-83.7451934814453,0.00499999988824129,102.099304199219,152.689056396484,0.91981505881995">
						<GeometryModel3D.Geometry>
							<MeshGeometry3D  
								Position=""
								Normals=""
								TextureCoordinates="" 
								TriangleIndices=""
							/>
						</GeometryModel3D.Geometry>
						<GeometryModel3D.Material>  
							<DiffuseMaterial Brush="{DynamicResource ImageBrush}"/>
						</GeometryModel3D.Material>
					</GeometryModel3D>
    			</ModelVisual3D.Content>
    		</ModelVisual3D>
    	</ModelVisual3D>
    </Viewport3D>
</Grid>

推荐答案

我知道如何使用它.我们可以使用显示min& modelVisual3d(网格的一部分)的最大高度.

但我一直坚持如何获取确切的最小和最大点,因为可能有很多这样的小区域,我们可能不使用imagebrush.
i got how to use it. we can use the bound which show min & max height of the modelVisual3d(a section of mesh).

but i am stuck at how to get the exact min and max points since there can be many such small section in which we might not use imagebrush.


这篇关于根据其在线框上的图像源大小平铺图像画笔.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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