Author Topic: Dcl Problem  (Read 206 times)

0 Members and 1 Guest are viewing this topic.

Travaci

  • Mosquito
  • Posts: 1
Dcl Problem
« 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 ?




roy_043

  • Water Moccasin
  • Posts: 1729
  • BricsCAD 18
Re: Dcl Problem
« Reply #1 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. )