Book a Demo

Author Topic: Diagram cx/cy vs diagram size  (Read 5937 times)

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Diagram cx/cy vs diagram size
« on: May 07, 2020, 06:11:00 pm »
Hi all,


What do Diagram.cx and cy actually contain?

It says they hold the X and Y dimensions (X and Y aren't used anywhere else in the GUI, API or documentation as far as I'm aware, it's all Left and Top but never mind) and default to 800 and 1100. OK fine.
But I've got a diagram where the lowest-right element is located at left 1122, top 1545 (the topmost element is at top 10 and the leftmost at left 24), and if I query the diagram properties cx=795 and cy=1138.

In other words, the diagram is larger than what's in cx and cy.
So what are these properties supposed to tell me?


/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: Diagram cx/cy vs diagram size
« Reply #1 on: May 07, 2020, 06:39:37 pm »
My Inside tells me: Number of pixels in X-direction used at maximum (and y respectively). No guarantee for truth, though.

For your case: bug report.

q.
« Last Edit: May 07, 2020, 06:41:34 pm by qwerty »

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: Diagram cx/cy vs diagram size
« Reply #2 on: May 07, 2020, 08:22:33 pm »
No, cx/cy seem to be fixed and unrelated to anything.

They seem to be set initially to a little less than 800 and a little more than 1130. Different in different diagrams.

They don't change with either zoom function, and they don't reflect the actual size of the diagram (as I mentioned); in fact the only way I've been able to change them is by switching the diagram to landscape. This swaps the values.

Weird.

Has anyone ever used them for anything, and if so, what?
My theories are always correct, just apply them to the right reality.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Diagram cx/cy vs diagram size
« Reply #3 on: May 07, 2020, 08:49:46 pm »
Has anyone ever used them for anything, and if so, what?

No I don't think I have. I suspect it might be something left behind from ye olde days but no longer used now.

Geert

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Diagram cx/cy vs diagram size
« Reply #4 on: May 07, 2020, 09:45:52 pm »
I looked into a repo and found most of them being 791/1134 so some "default minimum" but definitely not the used amount. EA's rendering ever since has been some voodoo where you could not realy look behind. Probably you just can't trust those numbers. However, I'll investigate a bit.

q.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Diagram cx/cy vs diagram size
« Reply #5 on: May 07, 2020, 09:51:44 pm »
Well, it just looks like it reflects the pixel size for vertical paper orientation (A4 would be 791/1134 square px). Changing the paper also changes the px. But moving elements outside does not change anything.

(only a rough first test)

q.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Diagram cx/cy vs diagram size
« Reply #6 on: May 07, 2020, 10:00:10 pm »
Hmm. In my repo there are a lot of similar but slightly different px-sizes. Lots of authors. So my guess would be that it depends on the printer driver that very person had installed on their machine. They deliver different resolutions. On my machine it's the above setting (I have only one printer but I'm pretty sure that's the cause). Anyhow: the numbers are pretty useless.

q.

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: Diagram cx/cy vs diagram size
« Reply #7 on: May 07, 2020, 10:28:06 pm »
I hadn't noticed the effect of the paper size. But there's no point in using cx/cy to deduce the paper size since that's in PDATA anyway.

Thanks, guys.

/U
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: Diagram cx/cy vs diagram size
« Reply #8 on: May 07, 2020, 10:48:00 pm »
Especially if, as it seems, the printer drivers deliver different pixel resolutions. You might find out which printer was installed for the user creating the diagram. Well, there are more useless fields carried from version to version. Those are just two of them.

q.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Diagram cx/cy vs diagram size
« Reply #9 on: May 08, 2020, 08:27:39 am »
Especially if, as it seems, the printer drivers deliver different pixel resolutions. You might find out which printer was installed for the user creating the diagram. Well, there are more useless fields carried from version to version. Those are just two of them.

q.
Years ago, we standardised these values.  We have a query that works out the closest REAL paper size and sets the values accordingly to a standard set related to the size.  We have A3H, A3V, A4H, A4V etc.

Consistency, Consistency, Consistency! TM

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