Book a Demo

Author Topic: Custom icons in stereotyped artifacts  (Read 5835 times)

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Custom icons in stereotyped artifacts
« on: November 23, 2016, 12:39:31 am »
Hi all,

Too lazy to try this for myself.

Is it possible to specify a custom icon for a stereotyped artifact, while retaining all other aspects of the base shape script?
In other words, is there a decoration sub-shape I can override and include my own image, or something along those lines?

Cheers,


/Uffe
My theories are always correct, just apply them to the right reality.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Custom icons in stereotyped artifacts
« Reply #1 on: November 23, 2016, 12:43:23 am »
Either DrawNativeShape or DrawParentShape seem to be the right candidates.

q.

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: Custom icons in stereotyped artifacts
« Reply #2 on: November 23, 2016, 01:26:26 am »
Well yes, I know I can call those to do the bulk of the work. But I'm concerned that will draw the artifact icon, which I want to avoid -- I want to avoid having to do pixel-by-pixel edits of my images to make sure they cover what's drawn by the native shape.

Put another way, I don't want to paint over the artifact icon. I want to override the drawing of it.

/U
My theories are always correct, just apply them to the right reality.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Custom icons in stereotyped artifacts
« Reply #3 on: November 23, 2016, 08:30:48 am »
The best you could do is to drawnativeshape and then draw explicitly over that corner including a fill for the entire icon background. Of course you'll want to disable gradients on the top or right if you take that approach.

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: Custom icons in stereotyped artifacts
« Reply #4 on: November 23, 2016, 05:38:13 pm »
OK. Thanks, Simon.

/U
My theories are always correct, just apply them to the right reality.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Custom icons in stereotyped artifacts
« Reply #5 on: November 23, 2016, 07:10:26 pm »
The best you could do is to drawnativeshape and then draw explicitly over that corner including a fill for the entire icon background. Of course, you'll want to disable gradients on the top or right if you take that approach.
That's what we do - because as Boss says:  "Sol, icons ain't icons".  That is to say that although there are icons on the shape, using the diagram "do not draw icons" property will not suppress them...

We have a shape named "label" that allows us to override the label.  We have a shape named "main" that allows us to override the main shape.  Why can't we have a shape named "icon" that will override the icon (if there is one)?

It's a rhetorical question.   ;)

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!