zoukankan      html  css  js  c++  java
  • setControl

     public static void setControl(ReportShapeControl _shape,ReportBitmapControl _bitmap,ItemId _itemId,BomId _bomId = "")
    {
        ItemId              curItemId;
        BomId               curBomId;
        InventBatch         curInventBatch;
        FilenameOpen        filename;
        Image               goodsImage = new image();
        EajZoomBitmap       zoomBitmap;
        int                 w,h;
        real                oldLeftValue,newLeftValue;
        real                oldTopValue,newTopValue;
        ;
    
        //curItemId       = InventBatch::findItemId(_inventBatchId);
        //curInventBatch  = InventBatch::find(_inventBatchId,curItemId);
        //curBomId        = curInventBatch.BOMId ;
    
        filename = EajPublic::EajGetPicFilename(_ItemId,_bomId);
        if (WinAPI::fileExists(filename))
        {
            goodsImage.loadImage(filename);
            W = goodsImage.width() ;
            H = goodsImage.height();
            _bitmap.resizeBitmap(true);
            zoomBitmap = new EajZoomBitmap(_shape.widthValue(),_shape.heightValue(),w,h);
            zoomBitmap.resize();
    
            oldLeftValue    = _shape.leftValue();
            newLeftValue    = oldLeftValue + _shape.widthValue()/2 - zoomBitmap.width()/2;
            oldTopValue     = _shape.topValue();
            newTopValue     = oldTopValue + _shape.heightValue()/2 - zoomBitmap.height()/2;
            _bitmap.top(newTopValue,Units::mm);
            _bitmap.left(newLeftValue,Units::mm);
    
            _bitmap.width(zoomBitmap.width(),units::mm);
            _bitmap.height(zoomBitmap.height(),units::mm);
        }
    
    
    }
  • 相关阅读:
    自主学习之RxSwift(一) -----Driver
    RxSwift:ReactiveX for Swift 翻译
    C简单实现动态顺序表
    C简单实现双向链表
    C实现单链表
    享受这一点点的平淡
    C文件读写
    大神都在看的RxSwift 的完全入坑手册
    字符串常量存在何处
    认识自己
  • 原文地址:https://www.cnblogs.com/perock/p/2558684.html
Copyright © 2011-2022 走看看