• halcon算子翻译——dev_set_window_extents


    名称

    dev_set_window_extents - 更改活动图形窗口的位置和大小。

    用法

    dev_set_window_extents( : : Row, Column, Width, Height : )

    描述

      dev_set_window_extents更改当前活动图形窗口的位置和/或大小。

      参数Row和Column指定窗口的新位置(左上角)。 根据HDevelop的窗口模式,坐标(0,0)分别指的是在MDI模式的主HDevelop窗口中的窗口区域的左上角,以及在SDI模式下的屏幕的左上角。 该位置的负坐标被忽略,即在相应的方向上窗口不会被移动。

      参数Width和Height指定窗口的新大小。 这是实际显示图形对象的内部部分的大小。 如果其中一个值是负数,那么相应的尺寸将保持不变。

    注意

      切勿使用set_window_extents更改HDevelop图形窗口的大小和位置。 必须使用算子dev_set_window_extents。

      使用HDevelop的代码导出功能,为该算子生成的代码可能与相关的HALCON算子具有不同的行为。 有关将HDevelop图形算子导出为不同编程语言的代码的详细说明,请参阅“HDevelop User's Guide”中的 Code Export -> General Aspects of Code Generation -> Graphics Windows一章。

    参数

    Row (input_control) rectangle.origin.y → (integer)
      Row index of upper left corner.
      Default value: 0
      Typical range of values: 0 ≤ Row
      Minimum increment: 1
      Recommended increment: 1
      Restriction: (Row >= 0) || (Row == -1)


    Column (input_control) rectangle.origin.x → (integer)
      Column index of upper left corner.
      Default value: 0
      Typical range of values: 0 ≤ Column
      Minimum increment: 1
      Recommended increment: 1
      Restriction: (Column >= 0) || (Column == -1)


    Width (input_control) rectangle.extent.x → (integer)
      Width of the window.
      Default value: 256
      Typical range of values: 0 ≤ Width
      Minimum increment: 1
      Recommended increment: 1
      Restriction: (Width > 0) || (Width == -1)


    Height (input_control) rectangle.extent.y → (integer)
      Height of the window.
      Default value: 256
      Typical range of values: 0 ≤ Height
      Minimum increment: 1
      Recommended increment: 1
      Restriction: (Height > 0) || (Height == -1)

    示例(HDevelop)

    dev_close_window ()
    read_image (For5, 'for5')
    get_image_size (For5, Width, Height)
    dev_open_window (0, 0, Width, Height, 'black', WindowHandle)
    dev_display (For5)
    stop ()
    dev_set_window_extents (-1,-1,Width/2,Height/2)
    dev_display (For5)
    stop ()
    dev_set_window_extents (200,200,-1,-1)

    结果

    如果指定参数的值正确,则dev_set_window_extents返回2(H_MSG_TRUE)。 否则会引发异常并返回错误代码。

    Possible Successors

    dev_display, dev_set_lut, dev_set_color, dev_set_draw, dev_set_part

    See also

    set_window_extents

    模块

    Foundation

    HDevelop例程

    vector_to_proj_hom_mat2d.hdev   Rectify image of stadium to simulate overhead view
    gen_projective_mosaic.hdev         Combine several images of a PCB into a large mosaic image
    dev_set_window_extents.hdev      Set size and position of a graphics window in HDevelop
    dev_set_part.hdev              Set the part of an image to be displayed (zoomed) in a graphics window in HDevelop
    circular_barcode.hdev        Read a circular bar code printed on a CD
    cbm_caliper.hdev          Measure the setting of a caliper using component-based matching in a perspectively distorted image
    barcode_orientation.hdev        Use the bar code parameter 'orientation'

  • 相关阅读:
    英语八大时态
    linux yum被占用
    文件上传ajaxfileupload.js插件
    jquery.qrcode.js生成二维码
    判断手机,pc方式登录
    点击小图轮播,点击显示大图
    图片预览功能
    Java Hash表 数据结构
    Java Tree 树 数据结构
    Java Queue 队列
  • 原文地址:https://www.cnblogs.com/xhiong/p/dev_set_window_extents.html
Copyright © 2020-2023  润新知