Giter Site home page Giter Site logo

theyangfan / wordpictureviewer Goto Github PK

View Code? Open in Web Editor NEW
20.0 3.0 1.0 11.21 MB

一款 MS Office Word VSTO 外接程序 (插件),用于双击放大浏览 Word 文档中的图片。An MS Office Word VSTO add-in program for double-click to enlarge browse pictures in Word documents.

License: MIT License

C# 100.00%
office-addin picture-viewer vsto word

wordpictureviewer's People

Contributors

theyangfan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

in-your-dreams

wordpictureviewer's Issues

调整可缩小的倍数

目前我看作者的代码好像是:当滚轮向上滚动(即 e.Delta > 0)时,代码会增加 _scaleStep 的值,从而增加 _scale 的值,实现放大。而当滚轮向下滚动时,代码会减少 _scaleStep 的值,但有一个条件限制 _scale + _scaleStep 必须大于或等于 100,这意味着 _scale 的值不能小于 100,因此不能实现缩小。

我想可不可以修改一下,缩小最小可以在50%或者70%左右,毕竟有的时候100%的放大也是很大的

if(e.Delta > 0) // zoom in
{
_scaleStep = Math.Abs(_scaleStep); // Ensure _scaleStep is positive
_scale += _scaleStep;
}
else // zoom out
{
_scaleStep = -Math.Abs(_scaleStep); // Ensure _scaleStep is negative
_scale += _scaleStep;
}

// Ensure _scale doesn't go below a certain minimum (e.g., 50%)
_scale = Math.Max(_scale, 50);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.