Line_width not working in Vulkan - vulkan

I enabled wide_line feature in VkPhysicalDeviceFeatures and i am giving appropriate value in pRasterizationState as well. But i dont see the width increased for the lines. What am I missing here?

Does the implementation support wide lines? Check the value of VkphysicalDeviceFeatures:: wideLines you get from vkGetPhysicalDeviceFeatures. Also check the lineWidthRange and lineWidthGranularity in VkPhysicalDeviceLimits.
Are you setting VK_DYNAMIC_STATE_LINE_WIDTH in VkPipelineDynamicStateCreateInfo::pDynamicStates? If so, you need to set the line width using vkCmdSetLineWidth rather than VkPipelineRasterizationStateCreateInfo::lineWidth.

Related

Pentaho PDI - Not setting constant

I can't for the life of me figure out why my transform which I have setting a 'constant' value is not setting it? Anywhere I can look for details?
Here's the add header - constant step
So WHY do I not get my test value in the output??
I even tried 'set field value to constant' step which takes the one row coming from my filer step and sets it to a constant value which also produces nothing! IDK whats going on here!
Thanks for the suggestions… I actually figured this out it has to do with the fact that the text output steps have a setting to not create when the transformation first starts I had to check that box…

Valid displayAt() range in GMS

Images can be displayed at a specific location with the DisplayAt() command.
Does anyone know the valid range?
For example, DisplayAt(-9000, -9000) is that valid? What is the total valid range?
Of course in the example the image would not be seen within the GMS frame, but that is exactly what I need.
Thanks
Yes, negative values are completely ok and will indeed "place" the image outside the visible range of the window.
There is nothing like a "valid" range - the coordindates are just numbers. ( There is likely a limit when the value exceeds the value-range of the internallly used variable type to store the coordinates, possiblye long (4 byte signed integer). )
Just be aware that concepts like "front most" window will also apply if an image is outside the "visible" range. Images will f.e. also show up in the ImageBrowser regardless of their position on the workspace. The same is true for iterating through images on a workspace using f.e. CountImageDocuments() and GetImageDocument()
Some commands ( I think ShowImage() ) might have addtional code to ensure that images stay "visible" and might therefore shift the image back into the workspace range. Also using "auto-arrange" will take images from the "off" and place them back into the visible range.
So if you deliberatly use "off-screen" display, this is ok, but it might create some unintended side-effects. What is the exact purpose of using it this way? There might be more suitable concepts. (f.e. one can create imageDocuments and add ImageDisplays to them without the need of showing the imageDocument.) Image may also be temporarilly "hidden". Finally, one might condiser shiftung "unwanted" images onto a separate workspace.

How to fill available tableview width with columns?

When tableview is created, the default behaviour of columns is to leave a lot of empty space. Is there a way to automatically fill the space?
One solution is described here:
JavaFX 2 Automatic Column Width
but this seems a little cumbersome.
TornadoFX comes with an advanced column resize policy called SmartResize. You assign it to a TableView like this:
columnResizePolicy = SmartResize.POLICY
By default it tries to do something useful depending on the data, and it will assign any left over width to the last column.
You can configure resizing options per column by calling the appropriate configurator function. For example, to tell the policy to give remaining width to a given column:
column("Name", Person::nameProperty).remainingWidth()
You can configure multiple columns to receive remaning width, so that they will share the remaining width between them.
contentWidth() will make sure the column width fits the content, with optional additional padding: contentWidth(padding = 50.0).
Most resize options also take an optional useAsMin parameter which will enforce the given setting as a minimum width for the column. useAsMax does the same for max width. You will get a fixed size by setting both useAsMin and useAsMax or specifying the fixedWidth(width) option.
You can distribute space using the weigthedWidth(weightNum) function, or even the pctWidth(pctNum) function. All these modes can be combined
Please see the TornadoFX Guide chapter about the resize policy for more information:

How to customize marker/symbol properties in matplotlib?

Example command:
prop = matplotlib.pyplot.scatter(x,y,s=s,c=c)
dir(prop) shows set_edgecolor, set_edgecolors, set_linestyle, set_linestyles - why so many variations on the same thing?
Also, how do I remove the edgecolors? Setting values to None does nothing. And how do I change the marker size after the plotting? There does not appear to be a markersize attribute that I can access...
Edit
If the symbols are generated through plyplot.plot, there is a markersize attribute to change it seems. But with pyplot.scatter, not present.
It'd give using 'none' a go to see if that solves your issue with edgecolor. That typically sets attributes to no color.

wxWidgets child sizer not expanding

I've got a very frustrating sizer problem.
I have two wxFlexGridSizers (and a few other things) inside a vertical wxBoxSizer, like so:
mMainSizer->Add(topsizer, wxSizerFlags(0).Expand());
mMainSizer->Add(1, lineheight);
mMainSizer->Add(mTypeLabel);
mMainSizer->Add(mTypeSizer, wxSizerFlags(0).Expand());
mMainSizer->Add(1, lineheight);
Each wxFlexGridSizer is filled using the same code:
sizer->Add(label, wxSizerFlags(1).Expand());
sizer->Add(fieldwidth, 1); // To separate label and data
sizer->Add(data, wxSizerFlags(0).Border(wxRIGHT, rborder).Right());
But the wxFlexGridSizers aren't being Expanded to the same width, as I intend. The lower one, with smaller labels, is always narrower than the upper one, leaving the data fields misaligned between them. Since they were both added with the Expand() flag, the narrower one should expand to the same width as the wider one, right?
(I've even tried adding the Right() flag to the lower one too, when adding it to the wxBoxSizer, but it did nothing, which really confused me.)
Can anyone save my sanity by pointing out where I'm going wrong?
EDIT: As far as I can tell, this is a wxWidgets bug. The Expand flag should tell items in a vertical sizer to expand themselves to their maximum width. If I'm wrong, someone please correct me.
As it turns out, the bug was mine. I thought I'd given the wxFlexGridSizers a growable column, with wxFlexGridSizer::AddGrowableCol, but that must have been in an earlier iteration of the code. Once I'd done that, they expanded just as I wanted them to.