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);
        }
    
    
    }
  • 相关阅读:
    正则表达式
    寒假第三天
    起航
    写正则表达式心得(一)
    80后偷偷“变老”的20种表现
    数据库三大范式
    给从表添加主键。数据库备份方法
    appletouchicon 和 appletouchiconprecomposed的区别
    一些对前端开发有用的网站
    背景图可以随时自动调整大小jquery插件backstretch
  • 原文地址:https://www.cnblogs.com/perock/p/2558684.html
Copyright © 2011-2022 走看看