(六)--LaTeX中插图

images图像目录样式如下

在这里插入图片描述

%导言区
\documentclass{ctexart} %ctexbook,ctexrep
%\usepackage{ctex}

\usepackage{graphicx}		%引入此包实现插图
\graphicspath{{images/},{pictures/}}	%图片在当前目录下的 images 目录和 pictures 目录

%正文区(文稿区)
\begin{document}
	\LaTeX{}中的插图:
	
	%\includegraphics[<参数选项>]{<文件名>}  文档中使用includegraphics命令引入图片,
	%格式支持:EPS,PDF,PNG,JPEG,BMP
	\includegraphics{GAN}
	\includegraphics{logo_music}
	\includegraphics{ACURA}
	
	%也可以附加后缀名
	\includegraphics{GAN.jpg}
	\includegraphics{logo_music.eps}
	\includegraphics{ACURA.pdf}
	
	%引入可选参数,指定缩放因子
	\includegraphics[scale=0.3]{GAN}
	\includegraphics[scale=0.03]{logo_music}
	\includegraphics[scale=0.3]{ACURA}
		
	%固定值的图像高度
	\includegraphics[height=2cm]{GAN}
	\includegraphics[height=2cm]{logo_music}
	\includegraphics[height=2cm]{ACURA}
	
	%固定值得图像宽度 
	\includegraphics[width=2cm]{GAN}
	\includegraphics[width=2cm]{logo_music}
	\includegraphics[width=2cm]{ACURA}
	
	%文本高度0.1倍图像高度
	\includegraphics[height=0.1\textheight]{GAN}
	\includegraphics[height=0.1\textheight]{logo_music}
	\includegraphics[height=0.1\textheight]{ACURA}
	
	%文本宽度0.2倍的图像宽度
	\includegraphics[width=0.2\textwidth]{GAN}
	\includegraphics[width=0.2\textwidth]{logo_music}
	\includegraphics[width=0.2\textwidth]{ACURA}
	
	%指定多个参数
	\includegraphics[angle=-45,width=0.2\textwidth]{GAN}  %瞬时针旋转45度
	\includegraphics[width=0.2\textwidth]{logo_music}
	\includegraphics[angle=45,width=0.2\textwidth]{ACURA} %逆时针旋转45度
	
\end{document}

更加详细资料可查阅

在终端输入

texdoc graphicx
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
`GraphicsPath` 是一个用于创建和操作图形路径的类,它属于 `System.Drawing.Drawing2D` 命名空间。路径是由一系列线条和曲线组成的形状,可以用于绘制、填充和剪裁图形。 `GraphicsPath` 类提供了一组方法来创建和修改路径,例如添加直线、曲线、矩形、椭圆等形状。你可以使用这些方法构建任意复杂的路径,然后将其应用于绘图操作。 路径可以用于各种绘图操作,例如绘制自定义形状的控件、绘制自由绘图、裁剪区域等。通过创建和操作路径,你可以实现各种有趣的图形效果和形状。 以下是一个简单的示例,展示如何使用 `GraphicsPath` 创建一个椭圆形的路径: ```csharp using System.Drawing; using System.Drawing.Drawing2D; // 创建一个 GraphicsPath 对象 GraphicsPath path = new GraphicsPath(); // 添加一个椭圆形到路径 Rectangle rectangle = new Rectangle(50, 50, 100, 50); path.AddEllipse(rectangle); // 使用路径进行绘图操作 Graphics graphics = this.CreateGraphics(); Pen pen = new Pen(Color.Black, 2); graphics.DrawPath(pen, path); // 清理资源 path.Dispose(); pen.Dispose(); graphics.Dispose(); ``` 在上面的示例,我们首先创建了一个 `GraphicsPath` 对象 `path`,然后使用 `AddEllipse` 方法将一个椭圆形添加到路径。最后,使用路径和 `DrawPath` 方法绘制椭圆形的边框。最后,我们释放了所使用的资源,以避免内存泄漏。 通过 `GraphicsPath` 类的其他方法,你可以添加直线、曲线、矩形、多边形等形状到路径,并进行组合、变换、剪裁等操作,以实现更复杂的图形效果。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值