How to allow a table to occupy the whole available canvas width? - asciidoc

I'm using asciidoctor with html5 backend.
Is it possible to allow a particular table to occupy the whole available canvas width, instead of obeying the document's width?

You would need to customize the CSS to achieve that.
See my answer to this question for the strategy to accomplish this.

Related

How to resize interactively layer in jCanvas

I would like to make anchor points (handlers like in FabricJS) for change the size, width and height of any element drawn on layers with jCanvas. Is it possible to do that?
Previously, there was no easy way to create a resizable shape in jCanvas. However, I have recently released a jCanvas plugin, called Handles, that will allow you to do just that. You can download and read the documentation for Handles on its plugin page.

CKEditor Defining custom margins for inserted image

I met a limit with quite typical operation. Simple document:
http://i.stack.imgur.com/JNI9v.png
As you can see, image has right and bottom margins. But... CKEditor image dialogue provides VSpace and HSpace parameters which influence together to Top-Bottom or Left-Right twin values and adds unnecessary top and left margins:
http://i.stack.imgur.com/vo3oC.png
Of course, users won't use pure code to define this in style="..." attribute. So, how to allow users insert images as shown on the first image? Maybe exists CKEditor plugin or patch... and i just can't find it.
Another, maybe even a simpler way, to achieve what you want would be to use a predefined set of styles for images and use the "Styles" combo to apply one of preselected classes. This way the styles used for images could be more consistent.
To see what I mean you can check the "Standard" demo - click on an Image and in the "Styles" combo select "Object styles -> Styled image (right)"

Region selection in canvas

I'm setting up an experimental html5 website using canvas.
I am drawing 3 circles all next to each other and all I want to know is how to be able to select them.
I'd like them to become links, in a way. Not tags, since everything's gonna be created using javascript.
Something like kinetic JS : http://www.kineticjs.com/, but without the extra library.
I have found some scripts that are using ghost canvas and contexts, but the examples are for dragging and stuff. I only want to be able to select my shape and execute some code.
Thank you!
I am thinking you might want to look into the IsPointInPath() method. It will help you figure out whether or not the mouse clicked on your canvas object.
See Detect mouseover of certain points within an HTML canvas?
if you are talented in xml i suggest you to use canvas + SVG (http://www.w3schools.com/svg/)
And follow this simple example.
http://jsvectoreditor.googlecode.com/svn/trunk/index.html
regarding to SVG and Canvas , the differences are obvious, as you can load bitmaps in SVG, and you can draw lines using the canvas API. However, creating the image may be easier using one technology over the other, depending on whether your graphic is mainly line-based or more image-like.

Fluid or fixed layout

I am working on a data entry application and I am considering using a fluid layout approach ala Swing and Silverlight where the controls resize based on the window size. My question is simple: what feedback if any have you received from users on each of these approaches? Screen size aside, I will still have a vertical scroll in place so I am wondering if I would be best served to simply go the fixed route and absolute position/size content.
Do not go the fixed route. If the user resizes the window, they do so for a reason. The widgets should resize appropriately. I can think of no valid reason to ever use a fixed layout except in vey specialized circumstances.
That being said, don't have a layout where input fields wrap. That would be very disconcerting. Just let your widgets grow and shrink naturally.

Qt - Drawing a Rect/Frame out of a bigger Pixmap image

I've been banging my head about this seemingly easy task and I could really use some help.
I have a wide Image loaded in the gui (using the designer..) and I want to be able to draw only a portion of it, a rectangle.
I need to be able to change this rectangle position over the large image, in order to draw a different part of the larger image at will. In this process the rect must maintain its size.
Using the Ui::MainWindow object I'm able to access the label holding the image and a solution that involves using this option is preferred (in order to keep up with the rest of the code I've already written )
Any solution will be much appreciated :)
Thanks,
Itamar
I would definitely (for ease of use) just place an empty label as placeholder in Designer.
Then implement the paintEvent for this label (delegate it to your own method). You'll have also have to look into QPainter, QPixMap, etc... Should be doable based on these hints and the documentation.
If you want more, I suggest you provide a small code snippet to work upon.
If you want to do this more or less purely through designer, you could put a QScrollArea where you want the portion of the image to appear. If you set the scroll area's scrollbar policy to be never shown, you can then manually change what part is visible via the scroll area widget. However, this would probably be more complex that creating a derived widget and reimplementing the paint function.

Resources