نمایش نتایج 1 تا 2 از 2

نام تاپیک: نوشتن تابع تبدیل اندازه میلیمتر به Pixel

  1. #1

    نوشتن تابع تبدیل اندازه میلیمتر به Pixel

    بجه ها چگونه می توانم تابعی بنویسم که ورودی را به میلیمتر بگیرد و آن را به pixel در چابگر تبدیل کند که در تمامی چابگر ها مکان چاپ تغییر نکند (لطفا رابطه آن را بیان کنید) متشکرم :?:

  2. #2

    Option Explicit

    Private Sub Form_Load()
    '
    MsgBox MillimeterToPixel(10, Printer.TwipsPerPixelX)
    '
    End Sub

    Private Function MillimeterToPixel(Millimeter As Single, TwipsPerPixel As Single) As Single
    '
    'There are approximately 1440 twips to an inch (the length of a screen item measuring one inch when printed).
    'As there are 2.54 centimeters to 1 inch, then there are approximately 567 twips to a centimeter
    '(the length of a screen item measuring one centimeter when printed).
    'Or in millimeters, as there are 25.4 millimeters to 1 inch, therefore there are approximately 56.7 twips to
    'a millimeter (the length of a screen item measuring one millimeter when printed).

    Const sngTwipsPerMillimeter As Single = 56.7

    MillimeterToPixel = Millimeter * (sngTwipsPerMillimeter / TwipsPerPixel)
    '
    End Function

تاپیک های مشابه

  1. بدست آوردن تعداد Pixel های یک عکس
    نوشته شده توسط Mahmood_M در بخش برنامه نویسی در Delphi
    پاسخ: 1
    آخرین پست: جمعه 01 دی 1385, 18:25 عصر
  2. رابطه بین طول کارکتر و تعداد Pixel
    نوشته شده توسط JavanSoft در بخش برنامه نویسی در Delphi
    پاسخ: 12
    آخرین پست: دوشنبه 07 آذر 1384, 16:44 عصر
  3. رسم Pixel در #c
    نوشته شده توسط mino در بخش C#‎‎
    پاسخ: 1
    آخرین پست: پنج شنبه 24 دی 1383, 11:00 صبح

قوانین ایجاد تاپیک در تالار

  • شما نمی توانید تاپیک جدید ایجاد کنید
  • شما نمی توانید به تاپیک ها پاسخ دهید
  • شما نمی توانید ضمیمه ارسال کنید
  • شما نمی توانید پاسخ هایتان را ویرایش کنید
  •