OberonPlace.com Forums

OberonPlace.com Forums (http://forum.oberonplace.com/index.php)
-   CorelDRAW/Corel DESIGNER VBA (http://forum.oberonplace.com/forumdisplay.php?f=16)
-   -   Is IsPointInside incorrected function? (http://forum.oberonplace.com/showthread.php?t=24651)

ager 09-01-2014 00:22

Is IsPointInside incorrected function?
 
1 Attachment(s)
If you download attached file and run this macro, applying to the figure from the file, you discover a sad mistake in "IsPointInside" function
Code:

Dim x As Double, y As Double, b As Boolean, s As Shape, Shift As Long, x1 As Double, y1 As Double, xSize As Double, ySize As Double
Dim xi As Double, yi As Double
ActiveDocument.Unit = cdrMillimeter
Set s = ActiveShape
s.GetBoundingBox x1, y1, xSize, ySize
For xi = x1 To x1 + xSize Step xSize / 20
 For yi = y1 To y1 + ySize Step ySize / 20
  If s.Curve.IsPointInside(xi, yi) Then ActiveLayer.CreateEllipse2 xi, yi, 0.5
  Next yi
Next xi


Plixo 12-01-2014 23:35

Tested, work OK with CorelDraw X6.4 64 bits
 
Tried on my computer and worked fine, no error :goggles:

ager 14-01-2014 04:00

1 Attachment(s)
Hmm... On my version of CorelDraw X4 it looks like this: :icon_frow


All times are GMT -5. The time now is 19:29.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
Copyright © 2011, Oberonplace.com