How to add double window trim (toolbar) in efxclipse e4? - e4

Is it possible to set a double toolbar in efxclipse e4 (both with side: top; one below second)?
<trimBars>
<children xsi:type="menu:ToolBar"/>
</trimBars>
<trimBars>
<children xsi:type="menu:ToolBar"/>
</trimBars>

Unfortunately it can't be render now:
answer from e(fx)clipse forum
Regards

Related

UI Grid Poor Vertical Scroll Performance

I'm using the new Angular UI Grid v3.0.7 and have an issue regarding vertical scrolling when using a custom cell template. My grid had 15 columns with 83 rows so it's not a large data set. My cell template is simply a span that has a class which adds either a checkmark or a cross (e.g. IcoMoon) based on a boolean. The cell template is fine when applied to a single column but rapidly deteriorates when adding more than 3. I have to apply it to 13 columns. Here is the cell template function:
function checkCrossCellTemplate() {
return '<span ng-class="{\'icon-checkmark\': row.entity[col.field]===true, \'icon-cross\': row.entity[col.field]===false}"></span>'
}
I think the issue relates to the condition being applied as it's killing the smooth scrolling, I've also tried a different approach using ng-if but the performance issue still stands. To prove my theory I've come up with another function:
function checkCrossCellTemplate() {
if(Math.random() <= 0.5 ) {
return "<span class='icon-checkmark'></span>"
} else {
return "<span class='icon-cross'></span>"
}
}
This is obviously a contrived example but solves the vertical scrolling issue.
Has anyone encountered this problem? Are there any workarounds?
I got around this performance issue by providing a cell class instead of a cell template. To be honest the first approach should of worked, it rendered the fonts correctly but you couldn't smoothly scroll.
function myCellClass(grid, row, col, rowRenderIndex, colRenderIndex) {
var value = grid.getCellValue(row, col),
cellClasses = [];
if(typeof value === 'boolean') {
if(value) {
cellClasses.push('icon-checkmark');
} else {
cellClasses.push('icon-cross');
}
}
if(rowRenderIndex % 2 !== 0) {
cellClasses.push('table-row');
}
return cellClasses.join(' ');
}

line graph Tickmarks and grid vertical lines are not aligned?

Okay. i have this problem in line graph. Tickmarks(data-points) are not aligned with vertical grid lines. is there a way to achieve that.please help?
you number of tick marks need to match the number of vlines. What I often do is I will get the count of my labels variable (with javascript) and so something like this.
var numTicks = labelVariable.length;
Then on draw of the graph
options: {
numxticks: num_ticks
}
var xticks = 10;
or with php
var xticks = "<php echo $yourvariable ;?>";
var line = .......
.set('chart.numxticks',xticks)

How to avoid x axis changed when add marks?

I have a problem to consult,when I use the Line of the Point style and show the marks, the x axis would have a problem.When annotate the code (lineSeries5.Add(5, 1,"ghgh");),the x axis shows normally like number 1,2.....,but when I use this code (lineSeries5.Add(5, 1,"ghgh"); ), the x axis becomes 'ghgh',I wonder if how to solve this problem. My purpose is showing the contents which I want to shows in the marks,but the x axis should not be changed. Waiting for your help, thank you very much!
private Steema.TeeChart.WPF.Styles.Points lineSeries5;
this.lineSeries5 = new Steema.TeeChart.WPF.Styles.Points();
this.tChart1.Series.Add(this.lineSeries5);
lineSeries5.Marks.Visible = true;
lineSeries5.Marks.Transparent = true;
lineSeries5.Pointer.Style = Steema.TeeChart.WPF.Styles.PointerStyles.Nothing;
**lineSeries5.Add(5, 1,"ghgh");**
lineSeries5.Add(9, 3);
If you want in your axis labels are values instead of labelsText, you must change the Axis labels style as I do in next line:
tChart1.Axes.Bottom.Labels.Style = AxisLabelStyle.Value;
Could you tell us if previous code solve your problem?
Thanks,

How to use Sprite class in Microsoft.DirectX to draw text and allow the mouse to rotate the screen?

I am using Microsoft.DirectX.Direct3D and Microsoft.DirectX to render some data in 3D.
Now, I would like to draw text to indicate the height value inside the space. As shown the picture below:
Now I am facing two main problems:
Problem 1: As you can see, the draw text is set upside down. What can I do to make it to be show correctly?
Problem 2: I am getting Direct3DXException error when I tried to rotate the screen. The error message as per below:
Below is my code for DrawText() using Sprite class
Microsoft.DirectX.Direct3D Device = new Device(0, DeviceType.Hardware, this.panel1,
CreateFlags.HardwareVertexProcessing, presentationParameters);
private void Render()
{
device.BeginScene();
if(checkBox1.checked)
{
DrawText();
}
device.EndScene();
device.SetTexture(0, null);
device.Present();
}
private void DrawText()
{
Sprite fontsprite = new Sprite(device);
fontsprite.Begin(SpriteFlags.AlphaBlend | SpriteFlags.ObjectSpace);
_font = new Microsoft.DirectX.Direct3D.Font(device, 10, 10, FontWeight.Bold, 1, false, CharacterSet.Ansi, Precision.Default, FontQuality.ClearType, PitchAndFamily.DefaultPitch, "face1");
_font.DrawText(fontsprite, "1.5 Km", 120, 15, Color.Black);
_font.DrawText(fontsprite, "2.5 Km", 120, 25, Color.Black);
_font.DrawText(fontsprite, "3.5 Km", 120, 35, Color.Black);
fontsprite.Transform.Translate(120, 100, 100);
fontsprite.End();
}
Need some help on resolving problem 1 and problem 2. Thank you.
Update: Problem 1 has been solved by myself. Now left problem 2 only.
Code to solve problem 1:
fontsprite.Transform = Matrix.RotationZ((float)Math.PI);
fontsprite.Transform *= Matrix.Translation(heightBoxSize, heightValue, heightBoxSize);
fontsprite.Transform.Translate(100, 100, 100);
I think it is because high memory consumption because you are creating new Sprite in every frame. (and 60 frames for each second?)
This problem happened where, rotating the screen using the mouse event, it will constantly update the result of device in frontsprite.
Therefore I suggest you to move part of the codes out.
Move the declaration part to global and then move initialization to Initialization() part.
Also move the fontsprite.End() to the Final() part.
I hopes that help.

Rotating CGPoints; CIVector CGAffineTransform?

I have 4 CGPoints that form an irregular figure. How can I rotate that figure 90-degrees and get the new CGPoints?
FWIW, I was able to "fake" this when the figure is a CGRect by swapping origin.x and origin.y, and width and height. Will I need to do something similar (calculating distance/direction between points) or is there a AffineTransform I can apply to a CIVector?
Hints and/or pointers to tutorials/guides welcome.
Skippable Project Background:
Users will take pictures of documents and the app will OCR them. Since users have a great deal of trouble getting a non-skewed image, I allow them to create a 4-point figure around the text body and the app skews that back to a rectangle. The camera images coming in are CIImages and so have their origin already in lower-left, so the 4-point figure must be rotated from the UIView to match...
For the record, I used CGAffineTransforms to rotate the points:
CGAffineTransform t1 = CGAffineTransformMakeTranslation(0, cropView.frame.size.height);
CGAffineTransform s = CGAffineTransformMakeScale(1, -1);
CGAffineTransform r = CGAffineTransformMakeRotation(90 * M_PI/180);
CGAffineTransform t2 = CGAffineTransformMakeTranslation(0, -cropView.frame.size.height);
CGPoint a = CGPointMake(70, 23);
a = CGPointApplyAffineTransform(a, t1);
a = CGPointApplyAffineTransform(a, s);
a = CGPointApplyAffineTransform(a, r);
a = CGPointApplyAffineTransform(a, t2);
&c. for the other points.

Resources