TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: Travaci on October 16, 2019, 03:11:05 AM

Title: Dcl Problem
Post by: Travaci on October 16, 2019, 03:11:05 AM
Hi everyone,
I can't put my .sld center
İt's looking diffrent on win7 and win10
What should i do ?

(https://cizimokulu.com/datas/users/207106-t-edit.png)

(https://cizimokulu.com/datas/users/207106-untitled-or.png)
Title: Re: Dcl Problem
Post by: roy_043 on October 16, 2019, 03:22:12 AM
You can get the dimensions of the tile and use them to correctly position the slide.
Maybe this helps:
Code - Auto/Visual Lisp: [Select]
  1. (defun KGA_Dcl_Image_FillSlide (tile slide scaleFactor lineColor backColor / xSize xSizeScaled ySize ySizeScaled)
  2.   (setq xSize (dimx_tile tile))
  3.   (setq ySize (dimy_tile tile))
  4.   (setq xSizeScaled (fix (* (- xSize 4) scaleFactor)))
  5.   (setq ySizeScaled (fix (* (- ySize 4) scaleFactor)))
  6.   (set_tile tile "")
  7.   (start_image tile)
  8.   (fill_image 0 0 xSize ySize lineColor)
  9.   (fill_image 1 1 (- xSize 2) (- ySize 2) backColor)
  10.   (if slide
  11.     (slide_image (/ (- xSize xSizeScaled) 2) (/ (- ySize ySizeScaled) 2) xSizeScaled ySizeScaled slide)
  12.   )
  13. )