Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » rectangle rendering artifact
rectangle rendering artifact [message #166145] Thu, 20 December 2007 23:49 Go to next message
Norbert  Schöpke is currently offline Norbert SchöpkeFriend
Messages: 63
Registered: July 2009
Member
This is a multi-part message in MIME format.
--------------050808080008000507070004
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

I get a thin greyish line on top of every standard rectangle I use.
It looks like a border or shadow (see attached screenshot), yet I can't seem to make it disappear.
It even shows when the rectangle is not filled and has no outline, i.e. should be transparent.
This is very ugly, as it also appears in exported SVG.
Any idea where this might come from?
Do I have to override the standard rectangle shape, or is there another workaround?

Thx for any advice
Norbert

--------------050808080008000507070004
Content-Type: image/gif;
name="artifact.gif"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
filename="artifact.gif"

R0lGODlhdgBUAPcAAAQCBLyWVGSCrMTCxKSqrISSnNzi3CRKhHRydIyixNyq XNTS1NSudMSu
jOzy7IyWpLSypDRajERmnPSuPGR6nLSytOSmTNzi7JyyzMTS5LyunNyubLTC 1CxSjHyWvGyG
tNSyhOSyXMSulPT69ExunOyuTMS+xNyydDxenLy6vOTq7KS6zMza5OyuVMTK xLSyrFx6rCxS
lISevOTq5Nza3OyuRKyyvHSOtOSyZOTq9HyKpIyivNTi5CRKjJSqxMyufNSy jOzy9JSepDxi
lERqnFx+pMyynLzK3NSylPT6/ExupKy61NTe7PyyVGSGrMzGzLyupNyuZMzW 3MyyjHyStMSy
pDRalFR2pLS2tKS21MzW5LyynNyybLzG3CxWjHyavGyKtPSyXMSylPyyTNyy fDxinOzu7NTe
5OyyVMzKzMSyrCxWlIyexPyyROTi5CROjJyuzNSyfPT29Pz+/MTGxOSuXNTW 1MyujIySrLyy
pExmnPyuPLyytNzm7KS2zMzS5LTG1Ly2vHyOvLSurPSyTGR+rOzu9JyuxFRy pDxelFx6pExy
nLy+vNze3Ky+1MzOzOTm5N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Y4ATonCUy
BXFBgbAkvOO1E2AtUkB8TLBKtWDlmdDpwBdMFf8RGhBLDEGiJR0rebYG5BFp zHyIFMr5GCrM
CSMnKgAUalADIRZyflnKhAi+Y4eEIsSVb4kBFabJkREERwcvCIGscFfJAoag iFgww2iOAgkP
mPMLkDhJcLwgQwIwQH4l06CnojAqVd6GJklwgAw6UKYb5DQlwVnDGeZwuAD9 bKCM+kF7dEmc
mMjhEF6AThGuApMb5EkKBjEAFgZRN+EF9VcajU8jfgOTFVihTIg4Ak2CE4Op EsQTjawABHAw
SbeVQEOBAKdvOImRLiDnAENwCVDy1AhKOcAFxNrAW8M4gTrE6XS7PEgSpAAD nFjhED3xwVuY
YJH/DKIUFW3iBIZlRoTf0ukiGXjlAWKwAxDGxBE4iUtG3PCCPVUUZYIiVkc9 BBGiAOIKjzkL
P3mykgPwaCQzYMQbJNCC2E4ADVuIDyXk9hAHZGEIONGnCpTSh0QcgAowYUGe XqDZznbrdIUL
ggzuhJ1DDMcnQSBCD64AppNwoAcUaM8UCDSINISWBzZ9ixL8ABU5KOIAifgv SUrzBfZYrVCs
1NFjivCHqDigtKjgAU0uwwGBWCi0I/DEW25wxKhwQkQdsERNOnEAFrh4DzCe w0iNo4ge5Hgn
b+iA0S7k0cwVwkk65skZvGIQFgU5IAA7
--------------050808080008000507070004--
Re: rectangle rendering artifact [message #166164 is a reply to message #166145] Fri, 21 December 2007 08:59 Go to previous messageGo to next message
Jacques LESCOT is currently offline Jacques LESCOTFriend
Messages: 247
Registered: July 2009
Senior Member
I think you are using a Compartment that contains then your Rectangle
(without border), and if you see into the code, the
ResizableCompartmentFigure define a single border at the top : this is
what you see in your diagram.

Cheers,
Jacques

Norbert Schöpke a écrit :
> I get a thin greyish line on top of every standard rectangle I use.
> It looks like a border or shadow (see attached screenshot), yet I can't seem to make it disappear.
> It even shows when the rectangle is not filled and has no outline, i.e. should be transparent.
> This is very ugly, as it also appears in exported SVG.
> Any idea where this might come from?
> Do I have to override the standard rectangle shape, or is there another workaround?
>
> Thx for any advice
> Norbert
>
>
> ------------------------------------------------------------ ------------
>
Re: rectangle rendering artifact [message #166211 is a reply to message #166164] Fri, 21 December 2007 14:40 Go to previous messageGo to next message
Norbert  Schöpke is currently offline Norbert SchöpkeFriend
Messages: 63
Registered: July 2009
Member
Thx, I see there is some margin border defined.
But what's the easiest way to override this behaviour? By means of modifying the .gmfgraph instead of hacking into the
generated code, preferably...

I'll look into it myself, but am under a little time pressure here, so if you know a quick way, that would be great!
thx again
Norbert
Re: rectangle rendering artifact [message #166219 is a reply to message #166211] Fri, 21 December 2007 14:52 Go to previous messageGo to next message
Jacques LESCOT is currently offline Jacques LESCOTFriend
Messages: 247
Registered: July 2009
Senior Member
First, I wonder whether it is really necessary that you create a
Compartment Figure ? If your label was directly contained in your figure
it would avoid generating the CompartmentFigure with its border.
Otherwise, I guess it should be possible to define a new empty border
for the Compartment figure, but this is just a supposition, maybe a GMF
guru could confirm that ?

Norbert Schöpke a écrit :
> Thx, I see there is some margin border defined.
> But what's the easiest way to override this behaviour? By means of modifying the .gmfgraph instead of hacking into the
> generated code, preferably...
>
> I'll look into it myself, but am under a little time pressure here, so if you know a quick way, that would be great!
> thx again
> Norbert
Re: rectangle rendering artifact [message #166228 is a reply to message #166219] Fri, 21 December 2007 15:46 Go to previous message
Norbert  Schöpke is currently offline Norbert SchöpkeFriend
Messages: 63
Registered: July 2009
Member
The screenshot shows a special case where indeed only one label is inside the diamond shape.
But I have the same problems with other figures, where a 1..* containment is modelled with compartments.

Luckily i found a workable solution. I extend all the affected CompartmentEditParts and override the createFigure()
method like so:

@Override
public IFigure createFigure() {
ResizableCompartmentFigure result =
(ResizableCompartmentFigure) super.createFigure();
result.setBorder(null);
return result;
}

This way the one-line border is reset to null.
For the modeller to use my extended edit parts, I add them to my Custom_XXX_EditPartFactory, overriding the
createEditPart() method to return my custom compartments instead of the generated default one.

Thx for the tip
Norbert
Previous Topic:UndoContext of an editor
Next Topic:one palette item
Goto Forum:
  


Current Time: Thu Apr 25 07:42:55 GMT 2024

Powered by FUDForum. Page generated in 0.05602 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top