向图像添加可单击热点

图像映射允许将 URL 附加到文档中图片上的指定区域(称为热点)。图像映射就是一组热点,由一个或多个热点组成。

可以绘制三种类型的热点:矩形、椭圆和多边形。当单击某个热点时,会在指定的浏览器窗口或框架中打开 URL。也可以指定当鼠标停留在热点上时显示的文字。

向图像添加可单击热点

  1. 将光标移到希望在文档中进行图像映射的位置。

  2. 选择 插入 - 图像 - 来自文件,选择并插入一个位图图片。

  3. 选择图片后,选择编辑 - 图像映射。将出现图像映射编辑器,它在背景中显示该图片。

  4. 使用“图像映射编辑器”中的图标在背景中的图像上绘制热点的形状,例如矩形。

    如果在 - LibreOffice - 常规中启用了“扩展帮助”,可以看到关于每一图标的功能的扩展帮助文本。

  5. 输入当用户单击该热点时将在 Web 浏览器中显示的“地址”URL。

  6. 还可以输入当用户将鼠标指向该热点时将会显示的提示性"文本"。

  7. 单击“应用”按钮应用修改,然后关闭“图像映射编辑器”。

  8. 以 LibreOffice 或 HTML 格式保存文档。

例如可以将图像映射另存为文件,然后将该文件上载到 Web 服务器。

图像映射

An ImageMap is a reference-sensitive graphic or text frame. You can click on defined areas of the graphic or text frame to go to a target (URL), which is linked with the area. The reference areas, along with the linked URLs and corresponding text displayed when resting the mouse pointer on these areas, are defined in the ImageMap Editor.

There are two different types of ImageMaps. A Client Side ImageMap is evaluated on the client computer, which loaded the graphic from the Internet, while a Server Side ImageMap is evaluated on the server computer which provides the HTML page on the Internet. In server evaluation, clicking an ImageMap sends the relative coordinates of the cursor within the image to the server, and a dedicated program on the server responds. In the client evaluation, clicking a defined hotspot of the ImageMap activates the URL, as if it were a normal text link. The URL appears below the mouse pointer when passing across the ImageMap.

“图像映射”有多种使用方式,其存储格式也有多种。

图像映射格式

图像映射基本上可以分为两种,一种是在服务器(例如 Internet 提供者)上进行分析的图像映射,另一种是在读者计算机的 Web 浏览器上进行分析的图像映射。

服务器端图像映射

Server Side ImageMaps appear for the reader as a picture or frame on the page. Click on the ImageMap with the mouse, and the coordinates of the relative position are sent to the server. Aided by an extra program, the server then determines the next step to take. There are several incompatible methods to define this process, the two most common being:

LibreOffice 会创建这两种方式的图像映射。在图像映射编辑器中打开另存为对话框,从文件类型列表中选择格式。创建的“独立映射文件”必须被上传到服务器上。您需要向提供商或网络管理员询问服务器支持的图像映射类型,以及如何访问处理程序。

客户端图像映射

当鼠标移到一个读者能够单击的图片或框架的区域上时,该区域可通过链接 URL 的外观显示出来。图像映射存储在图像的下一层,并包含已引用区域的信息。客户端图像映射唯一的缺点是,早期的 Web 浏览器不能对其进行读取。不过这个问题将会自行解决。

在保存图像映射时,可以选择 SIP - StarView ImageMap 文件类型。这种图像映射格式可以直接被采用到文档中所有使用中的图像或框架对象。但是,如果仅在当前图像或文字本框上使用图像映射,则不需要在保存时选择特殊格式。定义完区域后,请直接单击应用,而不需要执行其他操作。以 HTML 格式保存的客户端图像映射会被直接插入到页面的 HTML 代码中。