Perhaps I'm not thinking of the word border in the same way, but I don't have a border when I run it on my Mac, nor do I want one. Can you post a screenshot? I have a feeling I'm about to feel dumb. LOL
You can see two things here:
Ah, I see what you mean about the border, and it would indeed be nice to add that (and the shadow) to the Windows version. I'll take a look. Although the newest version of the code should be making the popover darker than the main window (based on FillColor) so I'm not sure why it's showing up as the same color. Time to drag out an old XP machine and take a look.
I'm not sure what "The region cut for Windows doesn’t match with the picture." Does that mean when you took the screenshot it thought it was only taking a picture of the window, and grabbed all the space around it as well because a "normal" window would have stuff there?
Also, thank you for your help!
I’m using the standard background, that’s why you see it differently, it’s not XP.
Here it’s a closeup of the corner on Windows.
I believe here there are 2 problems:
- The FigureShape seems to ignore the
border property for the
AddQuad method. Indeed this method is a convenience method which draws a
CurveShape, and, stating the Language Reference, the
CurveShape default for
border is 100.
Here it’s what happen setting
fs.Border = 100 in
setWindowShape. You see the border is drawn ad 50% opacity and the corner is still at 100%.
- Second problem, I suspect the
CreateRoundRectRgn declare, makes a round rectangle with different shape, so the border doesn’t match with the clipped region. But it could be the clip is not well positioned. See the following closeup.
Also, the clip region may be too small, since the border is not visible on right-bottom part. See below:
If you scale the figureshape up to 4x and then back to the original size you nice rounded corners/smooth egdges.
That way I render my popover shapes:
const kScale = 6 // or 4 dim arcSize as integer = kArcSize*kScale dim polySize as integer = kPolySize*kScale dim p as new Picture(self.Width*kScale,self.Height*kScale) dim g as Graphics = p.Graphics f = new FigureShape // left top f.AddQuad(0,arcSize,arcSize,0,0,0) // right top f.AddQuad(g.Width-arcSize,0,g.Width,arcSize,g.Width,0) // right bottom f.AddQuad(g.Width,g.Height-polySize-arcSize,g.Width-arcSize,g.Height-polySize,g.Width,g.Height-polySize) // middle bottom curve f.AddQuad((g.Width/2)+polySize+(polySize/4),g.Height-polySize,(g.Width/2),g.Height, (g.Width/2)+polySize-(polySize/4),g.Height-polySize) f.AddQuad((g.Width/2),g.Height,(g.Width/2)-polySize-(polySize/4),g.Height-polySize, (g.Width/2)-polySize+(polySize/4),g.Height-polySize) // left bottom f.AddQuad(arcSize,g.Height-polySize,0,g.Height-polySize-arcSize,0,g.Height-polySize) g.DrawObject f,0,0 return p.scalePicture(self.Width,self.Height)
Simply draw in the window works well.
@Aurelian N Hello guys,
Any chance that we can have something like this but for web version ?
I saw an announcement about something for WE not long ago :)
The jquery library I made uses their tooltips and is pretty easy to use: