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);
        }
    
    
    }
  • 相关阅读:
    团队开发day09
    团队开发day08
    团队开发day07
    python 字符串操作,获取任意字符串的方法(开头,结尾开始)
    ERIKA OS学习和使用总结
    解决win7无法正常进入睡眠的问题
    简单实用的Makefile
    js 签字插件
    html2canvas实现截取指定区域或iframe的区域
    jquery监听动态添加的input的change事件
  • 原文地址:https://www.cnblogs.com/perock/p/2558684.html
Copyright © 2011-2022 走看看