xxxx18一60岁hd中国/日韩女同互慰一区二区/西西人体扒开双腿无遮挡/日韩欧美黄色一级片 - 色护士精品影院www

  • 大小: 3KB
    文件類型: .cs
    金幣: 1
    下載: 0 次
    發布日期: 2021-05-12
  • 語言: C#
  • 標簽: halcon??

資源簡介

halcon自帶的控件感覺沒picturebox好用,文檔簡述了通過鼠標滾輪事件在picturebox上縮放圖片,實際就是setpart圖片,同理移動也是setpart圖片部分,僅供參考。

資源截圖

代碼片段和文件信息

using?System;
using?System.Collections.Generic;
using?System.Linq;
using?System.Text;
using?HalconDotNet;
using?System.Runtime.InteropServices;
using?System.Threading;
using?System.Windows.Forms;?

namespace?DalsaCameral
{

public?static?void?OpenWindows(IntPtr?PictureHandle?int?PictureBoxWidth?int?PictureBoxHeight)
????????{
????????????HTuple?Pwidth?=?PictureBoxWidth;
????????????HTuple?Pheight?=?PictureBoxHeight;
????????????HOperatorSet.OpenWindow(0?0?Pwidth?Pheight?PictureHandle?“visible“?““?out?hv_ExpDefaultWinHandle);
????????????pictureBox_With?=?PictureBoxWidth;
????????????pictureBox_Height?=?PictureBoxHeight;
????????}

static?HTuple?ImagePart_X1?ImagePart_Y1?ImagePart_X2?ImagePart_Y2;

????? public?static?void?zoomImage(bool?ScanlHobject?ho_ImageRote)
????????{
????????????
????????????????HTuple?r1?c1?b;
????????????????HOperatorSet.GetMposition(hv_ExpDefaultWinHandle?out?r1?out?c1?out?b);

????????????????double?d1?=?r1?d2?=?c1;
????????????????//縮放前的比例
????????????????double?crux?=?(d1?-?ImagePart_X1)?/?(ImagePart_X2?-?ImagePart_X1);
????????????????double?cruy?=?(d2?-?ImagePart_Y1)?/?(ImagePart_Y2?-?ImagePart_Y1);


????????????????double?SC?=?1;
????????????????if?(Scanl)
????????????????{
????????????????????SC?=?0.95;
????????????????}
????????????????else
????????????????{
????????????????????SC?=?1.05;
????????????????}
????????????????//縮放后的長度
????????????????double?Lr?=?(ImagePart_X2?-?ImagePart_X1)?*?SC;
????????????????double?Lc?=?(ImagePart_Y2?-?ImagePart_Y1)?*?SC;

評論

共有 條評論