本文整理汇总了C#中TexImage.Flip方法的典型用法代码示例。如果您正苦于以下问题:C# TexImage.Flip方法的具体用法?C# TexImage.Flip怎么用?C# TexImage.Flip使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TexImage
的用法示例。
在下文中一共展示了TexImage.Flip方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Flip
/// <summary>
/// Flips the specified image horizontally or vertically.
/// </summary>
/// <param name="image">The image.</param>
/// <param name="libraryData">The library data.</param>
/// <param name="flip">The flip request.</param>
private void Flip(TexImage image, FreeImageTextureLibraryData libraryData, FlippingRequest flip)
{
Log.Info("Flipping image : " + flip.Flip + " ...");
for (int i = 0; i < libraryData.Bitmaps.Length; ++i)
{
switch (flip.Flip)
{
case Orientation.Vertical:
FreeImage.FlipVertical(libraryData.Bitmaps[i]);
break;
case Orientation.Horizontal:
FreeImage.FlipHorizontal(libraryData.Bitmaps[i]);
break;
}
}
image.Flip(flip.Flip);
}
示例2: Flip
/// <summary>
/// Flips the specified image vertically or horizontally.
/// </summary>
/// <param name="image">The image.</param>
/// <param name="libraryData">The library data.</param>
/// <param name="request">The request.</param>
/// <exception cref="TexLibraryException">Flipping failed.</exception>
private void Flip(TexImage image, PvrTextureLibraryData libraryData, FlippingRequest request)
{
Log.Info("Flipping texture : " + request.Flip + " ... ");
switch(request.Flip)
{
case Orientation.Horizontal:
if (!Utilities.Flip(libraryData.Texture, EPVRTAxis.ePVRTAxisX))
{
Log.Error("Flipping failed.");
throw new TextureToolsException("Flipping failed.");
}
break;
case Orientation.Vertical:
if (!Utilities.Flip(libraryData.Texture, EPVRTAxis.ePVRTAxisY))
{
Log.Error("Flipping failed.");
throw new TextureToolsException("Flipping failed.");
}
break;
}
image.Flip(request.Flip);
UpdateImage(image, libraryData);
}